Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

Add Shopify shopping assistant tests and documentation

nirholas32d326ee1a3e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b6440092..2e5595c51 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,11 +6,13 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
## 2026-07-23
+- **Tutorial · 3D AI Shopping Assistant for Shopify** (`/tutorials/shopify-shopping-assistant`) — Add a chat assistant with a 3D face to your Shopify store: it reads your live catalog, recommends real products as cards with add-to-cart, and answers shipping and returns, all from one script tag.
- **We Gave 11 AI Agents Their Own Wallets and Real SOL. Here Are All 90 Trades.** (`/blog/all-90-trades`) — Two weeks of fully autonomous pump.fun trading on Solana: 11 armed strategies, 90 closed real-money trades, every entry thesis, every exit, every mistake. Plus the 83,000 coins the fleet did not buy, the winners it missed, and a paperhands audit of every sell. Complete dataset included.
- **Agent wallet and portfolio views stay reliable when an RPC provider is capped** — Agent portfolio and wallet-balance reads no longer fail when a Solana RPC provider hits its daily request limit. Balance lookups now fall back across several free, unthrottled Solana nodes, so net-worth snapshots and holdings keep loading during provider throttling instead of erroring out. `[fix, infra]`
- **All 90 trades from the autonomous fleet, published and graded** — The autonomous sniper fleet has closed 90 real-money trades across 8 strategies and 8 wallets, and we published every single one: entry thesis, exit, on-chain receipts, and an honest grade per trade. The deep dive also audits everything the fleet did not do: the 83,000 launches it observed and declined, proof the conviction scorer’s top band hits 77.5% winners at scale (and why zero of those coins were bought), the missed monsters that were invisible at minute zero, and a paperhands check showing every one of the 90 sells was vindicated. Full dataset downloadable as JSON. (`/blog/all-90-trades`) `[docs, feature]`
- **Fixed: wallets showing $0 of $THREE on the tiers page** — Holders reported the site not recognising their $THREE balance: /three showed "You hold $0" (Member tier) for wallets with real bags, across Phantom, Solflare, and Brave Wallet. Root cause: when our primary balance provider ran out of quota, the backup on-chain read only queried the classic SPL token program, and $THREE (like all pump.fun coins) lives on Token-2022, so it was invisible. The backup path now reads both token programs and rides the same deep multi-provider RPC failover as the rest of the platform, so holder tiers, fee discounts, and quota boosts resolve correctly even when individual RPC providers are down. (`/three`) `[fix]`
- **Opening a 3D object gives you a viewer, not a chatbot** — Previewing a prop from the CC0 object library (a wrench, a vase, an ammo box) used to drop you into the embodied-agent surface, complete with an "Ask the agent" box and prompts like "Why are you embodied?" that make no sense for an inanimate object. Objects now open in a dedicated viewer mode: the agent chat and avatar controls are gone, replaced by the things you actually want for a 3D thing — Restyle to recolor or AI-restyle its materials, View in AR to place it in your room, and Download the CC0 GLB. Avatars are untouched and still open with the full agent experience. (`/objects`) `[improvement]`
+- **The Concierge becomes a Shopify shopping assistant, with product cards** — The embeddable AI concierge (the floating chat with a 3D avatar) now turns into a full shopping assistant on any Shopify store, from the same one script tag. It reads your live catalog and policies straight from Shopify's public endpoints, no app, no API key, and no product feed to keep in sync, then helps shoppers find the right thing and shows real product cards with the live image, price, and an add-to-cart button. It understands how people actually shop ("a gift under $75", "cheapest hoodie", "anything on sale?") and answers shipping and returns from your published policies. Because the cards are drawn from your real catalog, it can never invent a product, a price, or a discount. (`/tutorials/shopify-shopping-assistant`) `[feature, sdk]`
- **The sniper learns from its own postmortem: conviction-crossing entries and smarter trailing stops** — Two upgrades shipped straight from the 90-trade analysis. First, a new oracle_crossing trigger: instead of judging a coin at launch, when the conviction scorer has no signal yet, an arm can now buy the moment a coin first crosses its conviction bar. Measured over the fleet window, that band pumped or graduated 77.5% of the time versus an 11.8% base rate, and the crossing lands a median of two minutes after launch. The formerly idle strict arm is re-armed on it with a sell-the-initials ladder. Second, trailing stops now arm only once a position has been above breakeven; armed underwater they only converted recoverable dips into locked losses while the hard stop-loss already capped the downside. (`/blog/all-90-trades`) `[feature, improvement]`
## 2026-07-22
@@ -57,6 +59,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Legal** (`/legal`) — Every three.ws policy in one place, plus which address to use to report copyright, abuse, or privacy issues.
- **Reasoning Ledger** (`/ledger`) — An agent's every consequential decision (what it decided, why, what it predicted, and what actually happened) in a tamper-evident, on-chain-anchored, independently verifiable ledger. Open any agent's at /ledger/<agentId>. Being wrong is visible; honesty is the trust signal.
+- **Sign Language Avatars** (`/sign-language`) — three.ws avatars sign in American Sign Language: fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D.
- **Audit any agent's trade decisions, linked from the write-ups** — The first-autonomous-trade postmortem, the Agent Sniper doc, and the sniper tutorial now link straight to the agent's live, tamper-evident Reasoning Ledger and to the on-chain transactions, so you can verify the +42% trade yourself instead of taking our word for it. The Reasoning Ledger is now a discoverable page, and its landing view features a live example to open first. (`/ledger/4c0e4d18-0544-4c95-a0db-a16896b029be`) `[improvement, docs]`
- **Bonding curve progress reads correctly again in the MCP tools** — The agent tools that report a coin's bonding curve were showing every coin as 0% to graduation with zero reserves and a zero price. Pump renamed these on-chain fields when USDC became a possible trading pair, and the tools were still reading the old names, which quietly resolved to zero instead of failing. They now read the current fields, so graduation progress, reserves, and price reflect the real curve. Verified against live coins reading 2% through 70% to graduation. `[fix]`
- **Chat replies in American Sign Language** — Turn on the new sign-language toggle in the agent chat and the 3D avatar signs every reply in ASL: words with library signs are signed, everything else is fingerspelled, compiled instantly on your device into one smooth performance. Site embeds get the same power with a single sign-language attribute on the agent-3d component. Built as the signed counterpart of text-to-speech, with a dictionary layer ready to swap in real captured signs word by word as the sign library grows. (`/docs/sign-language`) `[feature]`
@@ -67,6 +70,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Graduated-coin prices now match PumpSwap exactly** — PumpSwap changed how pool prices are calculated: a pool can now hold quote-side liquidity that is not sitting in its vault, and prices have to count it. Every place we price a graduated coin has been updated to match, so quotes, price impact, market caps, and agent trade fills line up with what actually executes on-chain. Coins that have not graduated are unaffected, and the change is exact rather than approximate: where a pool carries none of this liquidity, prices are identical to before. `[fix, infra]`
- **hood-traders gains an LLM-piloted strategy, hood-alerts now posts to X** — The open-source Robinhood Chain trading fleet, hood-traders, shipped a fourth strategy: bring your own key (Claude, OpenAI, Groq, or OpenRouter) and an LLM weighs the same on-chain launch signals the mechanical sniper already checks, holistically instead of against fixed cutoffs, gated behind the exact same risk engine as every other trade. The real-time alert bot, hood-alerts, now posts to X in addition to Telegram and Discord, with a choice of the official X API or a free self-hosted xactions instance. A new `hood init` command in hood-cli walks through setting up the wallet, the LLM key, and Telegram/Discord/X in one pass, so getting the whole stack running is one command instead of hand-editing env files. (`/markets/robinhood`) `[feature, sdk]`
- **One page for every policy, and a clear way to report something** — three.ws had six legal documents and no index, so /legal itself went nowhere. It is now a real page: every policy listed with a plain-language summary and its effective date, plus which address actually reaches the right desk (copyright, abuse, privacy, general, support). Publishers who think we are showing too much of their work get a direct answer and a direct address instead of a search. (`/legal`) `[improvement, docs]`
+- **Sign Language gets its own home** — There is now a dedicated Sign Language page at three.ws/sign-language: a live avatar signing on arrival, an input that fingerspells anything you type (words and numbers), the three ways avatars use ASL explained, and a webcam demo that reads your own fingerspelling. Find it in the Build menu under 3D and avatars, or the new card on the home page. (`/sign-language`) `[feature]`
- **Sign to the chat with your camera** — The agent chat now understands fingerspelled ASL. Click the camera button, sign at your webcam with a live mirrored preview, and your fingerspelling is transcribed into the message box, ready to review and send. Recognition runs on the first-place model from Google’s ASL fingerspelling challenge, and your video never leaves your device: the browser extracts hand and body landmarks locally and only those coordinates are sent. Together with signed replies, the chat now works in both directions for sign language users. (`/docs/sign-language`) `[feature]`
- **Swap quotes now show the reserves they were priced from** — The pump.fun MCP swap-quote tool used to hand back a price and nothing else, so there was no way to check it. It now also returns the pool reserves the quote was computed from, including the virtual quote reserves PumpSwap added last week, so an agent or a person can reproduce the number instead of trusting it. The tool descriptions were also rewritten to keep the bonding curve and the PumpSwap pool apart: both now have a field called virtual_quote_reserves, they mean different things, and conflating them was an easy way to read a coin's price as zero. (`/docs/mcp`) `[improvement, sdk]`
- **The crypto news feed now filters out the noise** — three.ws pulls headlines from around 190 sources, and some of them (major financial outlets, regulators, world-news desks) run plenty of stories that have nothing to do with crypto. The news feed now shows only crypto-relevant articles from those broad sources, while still keeping every headline from crypto-native publishers. Off-topic items like general stock movers or world-politics headlines no longer clutter the feed. Sources below a quality bar are held back too. This is a display filter only: the full firehose still feeds the searchable archive and the agents behind the scenes. (`/markets/news`) `[improvement]`
diff --git a/STRUCTURE.md b/STRUCTURE.md
index 3c15b5c3e..afcf1d0ae 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -20,7 +20,7 @@ bottom.
| React avatar creator | [avatar-sdk/](avatar-sdk) `→ /react` `/creator` | Published as `@three-ws/avatar` | Same package, React subpath |
| Talking page guide | [page-agent-sdk/](page-agent-sdk) | Published as `@three-ws/page-agent` | Drop-in rigged 3D agent that narrates any page + visitor avatar picker. `<page-agent>` web component. Rigged-only catalog. `preset="…"` resolves one of 5 personas (greeting/role/suggested-prompt chips/tool allowlist) — see [page-agent-sdk/README.md#persona-presets](page-agent-sdk/README.md#persona-presets). See [page-agent-sdk/PUBLISHING.md](page-agent-sdk/PUBLISHING.md) |
| Guided site tour | [tour-sdk/](tour-sdk) | Published as `@three-ws/tour` | 3D guide walks a live site, spotlights sections, narrates each. One-tag CDN build + free roam |
-| Concierge (embeddable AI support chat) | [concierge-sdk/](concierge-sdk), backend [api/concierge.js](api/concierge.js) `→ /api/concierge`, landing [pages/concierge.html](pages/concierge.html) `→ /concierge`, first-party CDN copy `→ /concierge/concierge.global.js` (mirrored by [concierge-sdk/build.mjs](concierge-sdk/build.mjs)) | In-repo, npm publish pending | An AI concierge for ANY website: floating launcher, chat panel with a rigged 3D avatar bust (blink/idle/viseme lipsync via the page-agent stage lineage), SSE-streamed answers grounded in the live page (ask-time DOM harvest + host `knowledge`, no crawler), speaks while streaming (sentence-level TTS handoff), push-to-talk mic, themes/accent/position, avatar picker or custom GLB. Backend is anonymous + CORS-`*` (third-party origins by design) with its own rate buckets (`limits.conciergeIp`/`conciergeGlobal`), fail-open moderation, and streaming failover over the shared free-first chain (api/_lib/llm.js). `<three-concierge>` element, `data-concierge` one-tag auto-init, or `new Concierge({...})`. Also reachable from any AI agent via the MCP server [packages/concierge-mcp/](packages/concierge-mcp) (`@three-ws/concierge-mcp`, registry `io.github.nirholas/concierge-mcp`): `concierge_ask` (ask any site's concierge, grounded in the fetched page), `concierge_embed` (generate the embed), `concierge_avatars`. Examples: [concierge-sdk/examples/](concierge-sdk/examples) (one-tag, web component, imperative, custom avatar, React, self-hosted backend). Docs: [docs/concierge.md](docs/concierge.md), tutorial [docs/tutorials/build-a-site-concierge.md](docs/tutorials/build-a-site-concierge.md). Tests: [concierge-sdk/test/](concierge-sdk/test), [tests/api-concierge.test.js](tests/api-concierge.test.js), [packages/concierge-mcp/test/](packages/concierge-mcp/test) |
+| Concierge (embeddable AI support chat) | [concierge-sdk/](concierge-sdk), backend [api/concierge.js](api/concierge.js) `→ /api/concierge`, landing [pages/concierge.html](pages/concierge.html) `→ /concierge`, first-party CDN copy `→ /concierge/concierge.global.js` (mirrored by [concierge-sdk/build.mjs](concierge-sdk/build.mjs)) | In-repo, npm publish pending | An AI concierge for ANY website: floating launcher, chat panel with a rigged 3D avatar bust (blink/idle/viseme lipsync via the page-agent stage lineage), SSE-streamed answers grounded in the live page (ask-time DOM harvest + host `knowledge`, no crawler), speaks while streaming (sentence-level TTS handoff), push-to-talk mic, themes/accent/position, avatar picker or custom GLB. Backend is anonymous + CORS-`*` (third-party origins by design) with its own rate buckets (`limits.conciergeIp`/`conciergeGlobal`), fail-open moderation, and streaming failover over the shared free-first chain (api/_lib/llm.js). Shopping mode (Shopify): when embedded on a Shopify storefront it auto-detects the store (`window.Shopify` / `shop` config) and becomes a shopping assistant, reading the store's public `/products.json` + `/collections.json` + `/policies/*` at ask-time (no key, no crawler, same-origin), retrieving the relevant products per question via keyword+intent search ([concierge-sdk/src/shopify.js](concierge-sdk/src/shopify.js)), grounding the answer in them, and rendering real product cards (image/live price/link + on-store `/cart/add.js` add-to-cart). The endpoint accepts a bounded `shopping` payload and swaps the system prompt to a store assistant. `<three-concierge>` element, `data-concierge` one-tag auto-init, or `new Concierge({...})`. Also reachable from any AI agent via the MCP server [packages/concierge-mcp/](packages/concierge-mcp) (`@three-ws/concierge-mcp`, registry `io.github.nirholas/concierge-mcp`): `concierge_ask` (ask any site's concierge, grounded in the fetched page), `concierge_embed` (generate the embed), `concierge_avatars`. Examples: [concierge-sdk/examples/](concierge-sdk/examples) (one-tag, web component, imperative, custom avatar, React, self-hosted backend). Docs: [docs/concierge.md](docs/concierge.md), tutorial [docs/tutorials/build-a-site-concierge.md](docs/tutorials/build-a-site-concierge.md). Tests: [concierge-sdk/test/](concierge-sdk/test), [tests/api-concierge.test.js](tests/api-concierge.test.js), [packages/concierge-mcp/test/](packages/concierge-mcp/test) |
| Assistant widget (3D avatar assistant for any website) | Loader [public/assistant/v1.js](public/assistant/v1.js) `-> /assistant/v1.js`, iframe app [pages/assistant-frame.html](pages/assistant-frame.html) + [src/assistant-frame.js](src/assistant-frame.js) `-> /assistant-frame`, builder [pages/assistant.html](pages/assistant.html) + [src/assistant-page.js](src/assistant-page.js) `-> /assistant`, shared validators [src/assistant-widget-core.js](src/assistant-widget-core.js). npm SDK [assistant-sdk/](assistant-sdk) (`@three-ws/assistant`) is the single source for the loader; its [build.mjs](assistant-sdk/build.mjs) emits the npm ESM + the mirrored one-tag build at `public/assistant/v1.js`. MCP server [packages/assistant-mcp/](packages/assistant-mcp) (`@three-ws/assistant-mcp`, registry `io.github.nirholas/assistant-widget`): `build_assistant_widget` (config -> paste-ready snippet + frame URL + JS-API call), `list_assistant_options` (avatars, backgrounds, modes, attributes). | In-repo | One script tag adds a floating launcher to any site; clicking it pops up a full-body animated avatar against the host page (transparent) or a color/gradient. Two modes: chatbot (free chain via POST /api/chat, or the visitor's own Groq/OpenRouter key sent browser-to-provider, stored in the frame's localStorage only) and speak mode (avatar repeats typed text out loud via Web Speech + head-anchored speech bubble + talking clip). All params re-validated in-frame (CSS/URL injection safe). Sibling of Concierge (chat panel) - this one is the full-body, avatar-first widget. Install three ways: one-tag CDN, `npm i @three-ws/assistant`, or the MCP server for AI agents. Examples: [assistant-sdk/examples/](assistant-sdk/examples). Docs: [docs/assistant-widget.md](docs/assistant-widget.md) `-> /docs/assistant-widget`, tutorial [docs/tutorials/add-a-3d-assistant.md](docs/tutorials/add-a-3d-assistant.md). Tests: [tests/assistant-widget.test.js](tests/assistant-widget.test.js), [assistant-sdk/test/](assistant-sdk/test), [packages/assistant-mcp/test/](packages/assistant-mcp/test) |
| three.ws's own guided tour + onboarding | [src/feature-tour/](src/feature-tour) `→ /feature-tour.js`, entry [src/feature-tour.js](src/feature-tour.js), curriculum [public/tour/curriculum.json](public/tour/curriculum.json) generated by [scripts/build-tour.mjs](scripts/build-tour.mjs), landing [pages/tour.html](pages/tour.html) `→ /tour` | Live | A hardened, site-native fork of the [tour-sdk/](tour-sdk) engine (same curriculum schema — stops/sections/tracks/highlight/narration/targets), lazy-injected only when a tour is starting/active (`feature-tour-boot` Vite plugin) so pages that never tour pay no Three.js cost. Three tracks share one curriculum: `full` (every feature, chapter by chapter), `quick` (highlighted heroes), and `onboarding` (added 2026-07-12) — a 6-stop, hand-authored new-account walkthrough chaining `/start` → make an avatar (`/create/selfie`) → build a world (`/diorama`) → live `/markets` data → an optional coin launch (`/create-agent`, clearly skippable) → the new creator's own `/profile`. Auto-offered once to a signed-in account with zero creations across avatars/agents/forged models/worlds (`GET /api/me` → `show_onboarding_tour`, backed by `users.onboarding_tour_seen_at`/`onboarding_tour_completed_at`, migration [api/_lib/migrations/20260712030000_onboarding_tour_state.sql](api/_lib/migrations/20260712030000_onboarding_tour_state.sql)); always reachable afterward via "🎬 Replay guided tour" in the [public/getting-started.js](public/getting-started.js) checklist panel. Tests: [tests/feature-tour-curriculum.test.js](tests/feature-tour-curriculum.test.js), [tests/api-me-onboarding-tour.test.js](tests/api-me-onboarding-tour.test.js) |
| Tour Builder (no-code playground) | [pages/tour-builder.html](pages/tour-builder.html) `→ /tour-builder` | Live | Point-and-click editor over a demo storefront: pick avatar, add stops, preview the real tour, export curriculum + Shopify snippets. Also ships **Templates** — ready-made tours (Sperax's DeFi protocol tour is the first) that load straight into the editor. Logic: [public/tour-builder/builder.js](public/tour-builder/builder.js), presets: [public/tour-builder/presets/](public/tour-builder/presets). Sperax template doc: [docs/tutorials/sperax-tour.md](docs/tutorials/sperax-tour.md) |
@@ -79,7 +79,8 @@ bottom.
| Character Library | [pages/character-library.html](pages/character-library.html) + [src/character-library.js](src/character-library.js) → `/character-library`, API [api/avatars/library.js](api/avatars/library.js) | Live at `/character-library` | 106 professionally rigged Mixamo characters (skinned GLB + thumbnails on R2, `avatars/mixamo/`), each drives the full animation library. Pipeline: [scripts/fetch-mixamo-avatars.mjs](scripts/fetch-mixamo-avatars.mjs) → [scripts/convert-mixamo-avatars.mjs](scripts/convert-mixamo-avatars.mjs) → [scripts/fetch-mixamo-avatar-thumbnails.mjs](scripts/fetch-mixamo-avatar-thumbnails.mjs) → [scripts/build-mixamo-avatar-library.mjs](scripts/build-mixamo-avatar-library.mjs) publishes `avatars/library/manifest.json`. Cards deep-link into the 3D viewer (`/app#model=`), Widget Studio (`/studio?model=`), and Animation Studio (`/pose?src=`). Mirrors the animation-library R2-manifest pattern (no DB). See [public/avatars/mixamo/README.md](public/avatars/mixamo/README.md) |
| Object Library | [pages/objects.html](pages/objects.html) + [src/objects-library.js](src/objects-library.js) → `/objects`, API [api/objects/library.js](api/objects/library.js) | Live at `/objects` | Hundreds of CC0 (public-domain) 3D props from Poly Haven (packed to GLB on R2, `objects/polyhaven/`). Pipeline: [scripts/fetch-polyhaven-objects.mjs](scripts/fetch-polyhaven-objects.mjs) (glTF→GLB via @gltf-transform) → [scripts/render-glb-thumbnails.mjs](scripts/render-glb-thumbnails.mjs) → [scripts/build-object-library.mjs](scripts/build-object-library.mjs) publishes `objects/library/manifest.json`. Same R2-manifest pattern as the Character/animation libraries (no DB). Cards preview in the 3D viewer (`/app#model=`), place into AR Studio (`/ar/studio?src=`), and download the GLB directly (CC0). AR Studio's tray also has an Objects tab over the same manifest. |
| Motion Swap (avatar body-swap in video) | [pages/motion-swap.html](pages/motion-swap.html) `→ /motion-swap` + [src/motion-swap.js](src/motion-swap.js), API [api/motion-swap.js](api/motion-swap.js), worker [workers/model-video2motion/](workers/model-video2motion) | Live | Upload a video of one person, get it back with a 3D avatar performing their motion. The worker (CPU Cloud Run, MediaPipe pose + selfie segmentation, both Apache-2.0) tracks 33 world landmarks per frame, solves them onto the canonical Wolf3D skeleton with an in-house bend-plane IK solver ([pose_solver.py](workers/model-video2motion/pose_solver.py), pure NumPy, unit-tested), and emits a standard `AnimationClip.toJSON()` + person-mask video + per-frame screen anchors. The browser composites in one WebGL scene: footage on a shader quad with the subject pixelated under the mask, avatar retargeted via [src/animation-retarget.js](src/animation-retarget.js) and pinned to the subject's anchor each frame, MediaRecorder export with original audio. Provider mode `video2motion` (`GCP_VIDEO2MOTION_URL`) in [api/_providers/gcp.js](api/_providers/gcp.js). Docs: [docs/motion-swap.md](docs/motion-swap.md). Tests: [workers/model-video2motion/test_pose_solver.py](workers/model-video2motion/test_pose_solver.py). |
-| ASL recognition (webcam signing → text) | worker [workers/model-asl-recognition/](workers/model-asl-recognition) | Built, undeployed | The reverse direction of [sign speech](docs/sign-language.md): the browser extracts MediaPipe landmarks from the webcam (video never leaves the device) and the worker transcribes continuous ASL fingerspelling to text on CPU via LiteRT. Model: Kaggle 2023 ASLFR 1st-place (Apache-2.0 code + weights, FSboard CC BY 4.0 corpus — the license-clean chain most ASL models lack). Verified locally end to end; deploy is one cloudbuild submit. Next: webcam capture UI wired into chat input, then word-level signs (PopSign retrain). Tests: [workers/model-asl-recognition/test_decode.py](workers/model-asl-recognition/test_decode.py). |
+| Sign Language (feature home) | [pages/sign-language.html](pages/sign-language.html) `→ /sign-language` + [src/sign-language-page.js](src/sign-language-page.js) | Live | The front door for signing avatars: a live avatar signing on arrival (PoseStage + [src/sign-speech.js](src/sign-speech.js) SignSpeaker, portrait-framed), an input that fingerspells any word or number, the three ASL capabilities explained, and an embedded webcam sign-recognition demo. Engines: [src/fingerspelling.js](src/fingerspelling.js) (26 letters + 0–9 handshapes), [src/sign-speech.js](src/sign-speech.js) (text→one signing clip, dictionary + fingerspell fallback), [src/sign-input.js](src/sign-input.js) (browser Holistic landmarks → text). Docs: [docs/sign-language.md](docs/sign-language.md). Tests: `tests/{fingerspelling,sign-speech,sign-input}.test.js`. |
+| ASL recognition (webcam signing → text) | worker [workers/model-asl-recognition/](workers/model-asl-recognition), API [api/asl-recognition.js](api/asl-recognition.js) (`GCP_ASL_RECOGNITION_URL`) | Live | The reverse direction of [sign speech](docs/sign-language.md): the browser extracts MediaPipe landmarks from the webcam (video never leaves the device) and the worker transcribes continuous ASL fingerspelling to text on CPU via LiteRT, with a decode-confidence score and an LLM cleanup pass on the API. Model: Kaggle 2023 ASLFR 1st-place (Apache-2.0 code + weights, FSboard CC BY 4.0 corpus — the license-clean chain most ASL models lack). Cloud Run gen2 + `patchelf --clear-execstack` on the LiteRT .so. Next: word-level signs (PopSign retrain). Tests: [workers/model-asl-recognition/test_decode.py](workers/model-asl-recognition/test_decode.py). |
| Avatar thumbnail coverage | [api/_lib/avatar-thumbs.js](api/_lib/avatar-thumbs.js) + crons [api/cron/avatar-thumbnail-backfill.js](api/cron/avatar-thumbnail-backfill.js) (absent thumbnails, `*/5`) and [api/cron/avatar-thumbnail-render.js](api/cron/avatar-thumbnail-render.js) (stale marketplace thumbnails, `*/10`) | Live | The single owner of `avatars.thumbnail_key`. Enforces the invariant that a thumbnail key is persisted **only after** its R2 object is confirmed to exist — a key pointing at a missing object makes R2 return 404 `text/plain`, which Chrome blocks as `ERR_BLOCKED_BY_ORB` inside an `<img>`. Fills coverage cheapest-first: zero-copy adoption of `forge_creations.preview_key`, then a headless-chromium GLB→PNG render to `thumb/<avatarId>.png` ([api/_lib/render-glb.js](api/_lib/render-glb.js)). Bounded retries via the `avatar_thumbnail_backfill` claim ledger ([migration](api/_lib/migrations/20260709120000_avatar_thumbnail_backfill.sql)), with `isBrowserInfrastructureError()` separating an OOM-killed browser from a genuinely broken model so a crash never retires healthy avatars. Bulk runner: [scripts/backfill-avatar-thumbnails.mjs](scripts/backfill-avatar-thumbnails.mjs) (`--status`, `--adopt-only`, `--loop`, `--reset-infra`). Docs: [docs/avatar-thumbnails.md](docs/avatar-thumbnails.md). Tests: [tests/avatar-thumbs.test.js](tests/avatar-thumbs.test.js), [tests/home-thumbnail-orb.test.js](tests/home-thumbnail-orb.test.js) |
| Forge model categorization | Classifier [api/_lib/forge-classify.js](api/_lib/forge-classify.js), wired at generation in [api/_lib/forge-store.js](api/_lib/forge-store.js) (`createCreation`), backfill [scripts/backfill-forge-categories.mjs](scripts/backfill-forge-categories.mjs), coloured badges in [src/forge-showcase.js](src/forge-showcase.js) + `/forge-studio` twin | Live | Assigns every forge model a `model_category` (avatar/accessory/item/scene/creature/vehicle/other) from its prompt with a deterministic, dependency-free keyword classifier — most-specific-first so "a knight riding a horse" is an avatar, not a creature. Nothing set the category before, so ~99.8% of the corpus was `other` and the category badges, filters, and Forge-Off category dimension were dead; the classifier now runs inline on every generation (all lanes) and reclassifies ~85% of the 9.8k-row back catalogue (dry-run verified). Coloured category pills render across the showcase/gallery/community feed. Tests: [tests/forge-classify.test.js](tests/forge-classify.test.js). |
| Forge thumbnail coverage | [api/_lib/forge-thumbs.js](api/_lib/forge-thumbs.js) + cron [api/cron/forge-thumbnail-backfill.js](api/cron/forge-thumbnail-backfill.js) (`*/5`) | Live | Gives every finished forge model a real picture. The dominant free NVIDIA/TRELLIS lane is geometry-first and paints no reference image, so ~83% of finished `forge_creations` land with `preview_image_url = NULL` and render as gradient placeholders on every browse surface (showcase, gallery, `/community`, `/search`, creator portfolios). This cron claims the newest previewless models, renders each GLB to a 768² PNG via the shared headless-chromium renderer ([api/_lib/render-glb.js](api/_lib/render-glb.js)), uploads it, and fills the preview slot — object confirmed in R2 **before** the key is committed (same ORB-safety invariant as avatars), and **fill-only** so a maker's captured poster always wins. Self-provisioning claim ledger (`forge_thumbnail_backfill`, created at runtime), bounded attempts, lease-based reclaim, browser-death batch abort with attempt refund. `?dry_run=1` reports coverage. Tests: [tests/forge-thumbs.test.js](tests/forge-thumbs.test.js). |
diff --git a/api/concierge.js b/api/concierge.js
index ded9d7efa..93fca17f3 100644
--- a/api/concierge.js
+++ b/api/concierge.js
@@ -52,6 +52,22 @@ const siteSchema = z
.partial()
.default({});
+// Shopping mode: a bounded snapshot of the store the widget already retrieved
+// against the question (see @three-ws/concierge shopify.js). Only the handful
+// of relevant products, a store summary, collection names, and the pertinent
+// policy travel here, never the whole catalog.
+const shoppingSchema = z
+ .object({
+ store: z.string().max(160).optional(),
+ currency: z.string().max(10).optional(),
+ summary: z.string().max(600).optional(),
+ collections: z.array(z.string().max(80)).max(40).optional(),
+ policies: z.string().max(4000).optional(),
+ products: z.string().max(4000).optional(),
+ })
+ .partial()
+ .optional();
+
const bodySchema = z.object({
message: z.string().trim().min(1).max(2000),
history: z
@@ -64,6 +80,7 @@ const bodySchema = z.object({
.max(20)
.default([]),
site: siteSchema,
+ shopping: shoppingSchema,
persona: z.string().trim().max(200).optional(),
lang: z.string().trim().max(20).optional(),
});
@@ -72,19 +89,47 @@ const bodySchema = z.object({
// below understands; skip them (see header note).
const NON_OPENAI_STYLES = new Set(['anthropic', 'vertex-anthropic']);
-function buildSystemPrompt({ site, persona, lang }) {
- const name = site.name || site.title || 'this website';
+function buildSystemPrompt({ site, shopping, persona, lang }) {
+ const shop = shopping && (shopping.products || shopping.summary) ? shopping : null;
+ const name = (shop && shop.store) || site.name || site.title || 'this website';
+
+ const role = shop
+ ? [
+ `You are the AI shopping assistant for ${name}, embedded as a chat widget on the store.`,
+ 'Help the shopper find the right product, compare options, and answer questions about products, pricing, shipping, and returns.',
+ 'Be warm, concise, and genuinely helpful, like a great in-store associate: two short paragraphs at most, or a compact list.',
+ 'The shopper is ALSO shown clickable product cards for the products listed below, with images, live prices, and links. Recommend from those products by name, say why each fits their need, and mention the price. Do not paste raw URLs or restate the price list as a table; the cards already show them.',
+ 'If none of the listed products fit, say so honestly and point them to a relevant collection to browse or to contact the store. Never invent products, prices, variants, or stock status, and never promise a discount that is not stated.',
+ ]
+ : [
+ `You are the AI concierge for ${name}, embedded as a chat widget on the site itself.`,
+ "Answer the visitor's questions about the site, its product, content, and how to use it.",
+ 'Be genuinely helpful, warm, and concise: two short paragraphs at most, or a compact list.',
+ 'Ground every claim in the site information below. If it does not contain the answer, say so honestly and point the visitor to the closest thing that does (a nav item, a page, or contacting the team). Never invent prices, features, or policies.',
+ ];
+
const lines = [
- `You are the AI concierge for ${name}, embedded as a chat widget on the site itself.`,
- 'Answer the visitor\'s questions about the site, its product, content, and how to use it.',
- 'Be genuinely helpful, warm, and concise: two short paragraphs at most, or a compact list.',
- 'Ground every claim in the site information below. If it does not contain the answer, say so honestly and point the visitor to the closest thing that does (a nav item, a page, or contacting the team). Never invent prices, features, or policies.',
+ ...role,
'You may use light markdown: **bold**, `code`, links, and bullet lists.',
- 'Only link to URLs that appear in the site information.',
- persona ? `Tone instruction from the site owner: ${persona}` : '',
+ 'Only link to URLs that appear in the information below.',
+ persona ? `Tone instruction from the store owner: ${persona}` : '',
lang ? `Reply in the visitor's language (${lang}) when their message is in it.` : '',
+ ];
+
+ if (shop) {
+ lines.push(
+ '',
+ `--- ${name.toUpperCase()} STORE ---`,
+ shop.summary ? `Store overview: ${shop.summary}` : '',
+ shop.collections?.length ? `Collections available to browse: ${shop.collections.join(', ')}` : '',
+ shop.products ? `Products matching the shopper's question (these are shown as cards):\n${shop.products}` : 'No products in the catalog matched this question.',
+ shop.policies ? `\nStore policies (authoritative):\n${shop.policies}` : '',
+ );
+ }
+
+ lines.push(
'',
- '--- SITE INFORMATION ---',
+ '--- PAGE THE SHOPPER IS ON ---',
site.url ? `URL: ${site.url}` : '',
site.title ? `Page title: ${site.title}` : '',
site.description ? `Description: ${site.description}` : '',
@@ -92,7 +137,7 @@ function buildSystemPrompt({ site, persona, lang }) {
site.headings?.length ? `Page headings: ${site.headings.join(' · ')}` : '',
site.knowledge ? `Curated site knowledge (authoritative):\n${site.knowledge}` : '',
site.content ? `Current page content:\n${site.content}` : '',
- ];
+ );
return lines.filter(Boolean).join('\n');
}
@@ -256,6 +301,7 @@ export default wrap(async (req, res) => {
model: provider.model,
anonymous: true,
site: siteHostname(body.site?.url),
+ shopping: !!(body.shopping && (body.shopping.products || body.shopping.summary)),
reply_chars: reply.length,
history_turns: body.history.length,
},
diff --git a/blog/autonomous-trading-experiment-series.json b/blog/autonomous-trading-experiment-series.json
new file mode 100644
index 000000000..e6e3b103e
--- /dev/null
+++ b/blog/autonomous-trading-experiment-series.json
@@ -0,0 +1 @@
+{"generated":"2026-07-23","cap_minutes":240,"note":"prices normalized so the first candle after entry = 1.0; candle closes, minute resolution, no slippage/fee/curve-depth modeling","trades":[{"n":1,"arm":"rules-classic","mode":"rules","symbol":"Dronenald","entry_sol":0.002,"opened_at":"2026-07-03T16:19:54.672Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"trailing_stop","pnl_pct":-28.10815,"hold_s":377674},"series":[[0,1],[2,0.9412]]},{"n":2,"arm":"intel-quality","mode":"rules","symbol":"Enthuist","entry_sol":0.15,"opened_at":"2026-07-18T00:21:46.296Z","fleet_cfg":{"sl":35,"ts":30,"tp":200,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-8.018305333333334,"hold_s":135136},"series":[[0,1],[29,0.9897],[60,0.9882]]},{"n":3,"arm":"rules-proven","mode":"rules","symbol":"BITS","entry_sol":0.05,"opened_at":"2026-07-19T02:26:00.801Z","fleet_cfg":{"sl":30,"ts":25,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":42.382276000000005,"hold_s":1804},"series":[[0,1],[1,1.2044],[2,1.2282],[3,1.2271],[4,1.2217],[5,1.2168],[7,1.2182],[9,1.1997],[12,1.2002],[17,1.1972],[30,1.1957],[50,1.1905],[70,1.189],[85,1.191],[106,1.1889],[126,1.1886]]},{"n":4,"arm":"rules-proven","mode":"rules","symbol":"looong","entry_sol":0.05,"opened_at":"2026-07-20T22:52:19.485Z","fleet_cfg":{"sl":30,"ts":25,"tp":0,"mh":30},"actual":{"exit_reason":"trailing_stop","pnl_pct":-26.086327999999998,"hold_s":46},"series":[[0,1],[1,0.8795],[2,1.0634],[3,1.0564],[4,1.1004],[5,1.1635],[6,1.0508],[7,1.0432],[8,1.136],[9,0.8295],[10,0.5694],[11,0.4381],[12,0.5861],[13,0.4802],[14,0.4345],[15,0.583],[16,0.6484],[17,0.5831],[18,0.4164],[19,0.2781],[20,0.277],[21,0.2744],[22,0.2713],[23,0.2691],[24,0.3315],[25,0.3231],[26,0.3087],[27,0.2594],[28,0.2569],[29,0.2678],[30,0.2674],[32,0.2586],[34,0.2579],[35,0.2536],[41,0.2513],[46,0.2498],[55,0.2477],[56,0.2474],[61,0.2466],[62,0.2455],[69,0.2435],[71,0.2435],[74,0.2317],[77,0.2163],[101,0.2056],[106,0.2053],[132,0.2053],[134,0.2054],[157,0.217],[159,0.2176],[162,0.2116],[167,0.2115],[182,0.2092],[197,0.216],[198,0.2091],[214,0.2112],[215,0.2112],[224,0.2131]]},{"n":5,"arm":"intel-quality","mode":"rules","symbol":"Smoke","entry_sol":0.15,"opened_at":"2026-07-21T00:00:08.526Z","fleet_cfg":{"sl":35,"ts":30,"tp":200,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-7.12357,"hold_s":1806},"series":[[0,1],[1,0.9514],[24,0.9542],[29,0.9539],[30,0.9449],[33,0.9464],[34,0.9466],[38,0.9459],[39,0.9459],[41,0.947],[42,0.9473],[51,0.9474],[53,0.9471],[54,0.9453],[55,0.9468],[59,0.9468],[60,0.9463],[61,0.9465],[65,0.9462],[66,0.9469],[67,0.9464]]},{"n":6,"arm":"intel-quality","mode":"rules","symbol":"YES YOU","entry_sol":0.15,"opened_at":"2026-07-21T01:02:21.759Z","fleet_cfg":{"sl":35,"ts":30,"tp":200,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.469138,"hold_s":1805},"series":[[0,1],[30,0.9884]]},{"n":7,"arm":"intel-quality","mode":"rules","symbol":"KYDEN","entry_sol":0.15,"opened_at":"2026-07-21T01:34:06.393Z","fleet_cfg":{"sl":35,"ts":30,"tp":200,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-4.9940066666666665,"hold_s":1802},"series":[[0,1],[2,0.9739],[30,0.9637],[130,1.0603],[135,1.0628],[180,1.0199]]},{"n":8,"arm":"rules-proven","mode":"rules","symbol":"Meowpin","entry_sol":0.05,"opened_at":"2026-07-21T01:41:43.015Z","fleet_cfg":{"sl":30,"ts":25,"tp":0,"mh":30},"actual":{"exit_reason":"trailing_stop","pnl_pct":-14.305202,"hold_s":29},"series":[[0,1],[1,0.9409],[2,0.9602],[3,1.0277],[4,1.5956],[5,1.0011],[6,1.0279],[7,0.9769],[8,0.9571],[9,1.311],[10,0.9567],[12,0.9499],[15,0.9452],[16,0.9449],[17,0.9502],[18,0.954],[19,0.9547],[21,0.944],[40,0.943],[42,0.9363],[47,0.8782],[81,0.826],[109,0.6767],[111,1.1411],[112,1.08],[113,1.7127],[115,2.0175],[116,2.0433],[117,0.7351],[119,0.7197],[201,0.7037]]},{"n":9,"arm":"rules-proven","mode":"rules","symbol":"Clouseau","entry_sol":0.05,"opened_at":"2026-07-21T03:56:24.205Z","fleet_cfg":{"sl":30,"ts":25,"tp":0,"mh":30},"actual":{"exit_reason":"trailing_stop","pnl_pct":-13.404022,"hold_s":117},"series":[[0,1],[1,0.9397],[2,0.7841],[3,0.7661],[4,0.8828],[5,0.9284],[6,0.2968],[7,0.2757],[8,0.2361],[9,0.2343],[10,0.2347],[12,0.2341],[13,0.2336],[14,0.2216],[17,0.2986],[18,0.2479],[19,0.3053],[20,0.2743],[21,0.2274],[23,0.2278],[26,0.2207],[27,0.2145]]},{"n":10,"arm":"oracle-open","mode":"rules","symbol":"ANSEM","entry_sol":0.01,"opened_at":"2026-07-21T05:56:12.250Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-4.4981800000000005,"hold_s":1806},"series":[[0,1],[1,0.9947],[4,0.9941],[9,0.9846],[30,0.9837]]},{"n":11,"arm":"oracle-open","mode":"rules","symbol":"Jimothy","entry_sol":0.01,"opened_at":"2026-07-21T06:26:38.282Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"stop_loss","pnl_pct":-57.44218,"hold_s":15},"series":[[0,1],[6,1.0321],[8,1.0017],[29,1.0019]]},{"n":12,"arm":"oracle-open","mode":"rules","symbol":"PJT","entry_sol":0.01,"opened_at":"2026-07-21T06:26:55.428Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-7.382569999999999,"hold_s":1804},"series":[[0,1],[21,0.9967],[25,0.9518],[29,0.9533]]},{"n":13,"arm":"oracle-open","mode":"rules","symbol":"$DELU","entry_sol":0.01,"opened_at":"2026-07-21T06:56:59.495Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.46916,"hold_s":1805},"series":[[0,1],[1,1.0456],[4,1.0458],[7,1.0011],[30,0.9975]]},{"n":14,"arm":"oracle-open","mode":"rules","symbol":"Poze","entry_sol":0.01,"opened_at":"2026-07-21T07:27:36.735Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"stop_loss","pnl_pct":-38.9361,"hold_s":63},"series":[[0,1],[30,0.9979]]},{"n":15,"arm":"oracle-open","mode":"rules","symbol":"MELON","entry_sol":0.01,"opened_at":"2026-07-21T07:28:41.199Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.53589,"hold_s":1803},"series":[[0,1],[6,1.0085],[7,0.9993],[29,0.9985]]},{"n":16,"arm":"oracle-open","mode":"rules","symbol":"TrippleBBL","entry_sol":0.01,"opened_at":"2026-07-21T07:58:54.772Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":10.38374,"hold_s":1805},"series":[[0,1],[2,0.9995],[5,0.9997],[6,1.0569],[9,1.124],[10,1.1334],[29,1.1295],[36,1.0545],[43,1.0563],[52,1.0456],[60,1.0393]]},{"n":17,"arm":"oracle-open","mode":"rules","symbol":"SKE","entry_sol":0.01,"opened_at":"2026-07-21T08:29:01.121Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"stop_loss","pnl_pct":-32.53964,"hold_s":29},"series":[[0,1],[1,0.9923]]},{"n":18,"arm":"oracle-open","mode":"rules","symbol":"test","entry_sol":0.01,"opened_at":"2026-07-21T08:29:40.502Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.46916,"hold_s":1805},"series":[[0,1],[29,0.9988]]},{"n":19,"arm":"oracle-open","mode":"rules","symbol":"JARRETT","entry_sol":0.01,"opened_at":"2026-07-21T09:00:10.039Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.46917,"hold_s":1806},"series":[[0,1],[30,0.9982]]},{"n":20,"arm":"rules-proven","mode":"rules","symbol":"AG","entry_sol":0.05,"opened_at":"2026-07-21T12:54:31.220Z","fleet_cfg":{"sl":30,"ts":25,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-25.278346000000003,"hold_s":1897},"series":[[0,1],[1,0.9866],[2,0.9459],[3,0.9391],[4,0.9319],[7,0.9334],[8,0.9296],[9,0.9342],[10,0.9343],[11,0.9458],[12,0.9476],[14,0.9483],[17,0.9456],[20,0.9444],[21,0.8769],[24,0.877],[26,0.8767],[28,0.8781],[29,0.8801],[31,0.8776],[32,0.8773],[34,0.8793],[35,0.8911],[36,0.857],[37,0.8738],[38,0.9025],[39,0.9042],[40,0.9187],[41,0.9212],[42,0.9181],[44,0.9183],[47,0.9397],[49,0.9394],[50,1.0025],[51,1.1063],[53,0.9484],[54,1.0062],[55,1.0442],[56,1.0947],[57,1.1024],[58,1.1045],[59,1.1197],[60,1.1577],[61,1.1595],[62,1.1603],[63,1.1439],[64,1.1561],[66,1.139],[67,1.1538],[68,1.1582],[69,1.1578],[70,1.1424],[72,1.1224],[74,1.1067],[83,1.1184],[87,1.1148],[98,1.1142],[99,1.0524],[107,1.0488],[115,1.0466],[120,1.0471],[125,1.0706],[126,1.0562],[128,1.0692],[131,1.0546],[133,1.0569],[134,1.0578],[135,1.0574],[136,1.0579],[144,1.0433],[146,1.0422],[149,1.0396],[158,1.0396],[162,1.0382],[165,1.0463],[170,1.0318],[171,1.022],[173,1.0223],[174,1.0217],[175,1.0005],[178,0.9912],[179,0.9904],[180,0.9891],[183,0.9894],[185,0.9862],[190,0.9911],[195,0.9913],[196,0.9869],[200,0.9802],[201,0.9741],[208,0.9744],[209,0.9963],[212,0.9965],[214,0.9859],[215,0.9865],[216,0.9881],[220,0.9892],[223,1.0033],[229,1.0081],[230,1.0058],[231,1.0019]]},{"n":21,"arm":"llm-claude","mode":"llm","symbol":"ROGERS","entry_sol":0.01,"opened_at":"2026-07-21T13:17:06.618Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.7257,"hold_s":1806},"series":[[0,1],[10,0.9957],[30,0.9944]]},{"n":22,"arm":"llm-grok","mode":"llm","symbol":"ROGERS","entry_sol":0.01,"opened_at":"2026-07-21T13:17:06.624Z","fleet_cfg":{"sl":30,"ts":20,"tp":45,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-5.5661000000000005,"hold_s":1809},"series":[[0,1],[10,0.9957],[30,0.9944]]},{"n":23,"arm":"llm-auto","mode":"llm","symbol":"House","entry_sol":0.01,"opened_at":"2026-07-21T13:18:41.412Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"take_profit","pnl_pct":73.87507,"hold_s":68},"series":[[0,1],[1,0.4504],[2,0.4188],[3,0.4193],[4,0.4176],[7,0.4175],[10,0.4037],[12,0.4143],[17,0.4042],[21,0.4011],[24,0.4002],[35,0.4016],[42,0.3776],[44,0.3779],[49,0.3767],[97,0.3744],[231,0.3748]]},{"n":24,"arm":"llm-auto","mode":"llm","symbol":"GABRIEL","entry_sol":0.01,"opened_at":"2026-07-21T13:19:49.713Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-4.36845,"hold_s":1803},"series":[[0,1],[29,0.9989]]},{"n":25,"arm":"llm-claude","mode":"llm","symbol":"HOME","entry_sol":0.01,"opened_at":"2026-07-21T18:59:15.991Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.9896599999999998,"hold_s":1802},"series":[[0,1],[1,0.9936],[30,0.9928]]},{"n":26,"arm":"llm-auto","mode":"llm","symbol":"HOME","entry_sol":0.01,"opened_at":"2026-07-21T18:59:16.021Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-3.0531200000000003,"hold_s":1804},"series":[[0,1],[1,0.9936],[30,0.9928]]},{"n":27,"arm":"boost-ride","mode":"rules","symbol":"ocFkqj","entry_sol":0.01,"opened_at":"2026-07-21T19:23:23.903Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"timeout","pnl_pct":5.225910000000001,"hold_s":245},"series":[[0,1],[1,1.0112],[2,1.0228],[3,1.0381],[4,1.0519],[5,1.0692],[6,1.0791],[7,1.0909],[8,1.1035],[9,1.1186],[10,1.127],[11,1.1425],[12,1.1497],[13,1.1579],[14,1.1765],[15,1.1897],[16,1.1992],[17,1.2099],[18,1.2193],[19,1.2341],[20,1.2514],[21,1.2605],[22,1.2688],[23,1.2842],[24,1.2911],[25,1.3034],[26,1.3085],[27,1.3234],[28,1.3319],[29,1.3469],[30,1.3579],[31,1.3722],[32,1.3758],[33,1.3954],[34,1.4086],[35,1.4296],[36,1.4461],[37,1.4604],[38,1.477],[39,1.4894],[40,1.5029],[41,1.5274],[42,1.5412],[43,1.5642],[44,1.5657],[45,1.1446],[46,0.8115],[47,0.8188],[48,0.0001],[49,0.0001],[50,0.0001],[51,0.0001],[52,0.0001],[57,0.0001],[61,0.0001],[72,0.0001],[84,0.0001],[140,0.0001],[147,0.0001],[175,0.0001]]},{"n":28,"arm":"boost-ride","mode":"rules","symbol":"xjcfSQ","entry_sol":0.01,"opened_at":"2026-07-21T19:28:55.122Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"timeout","pnl_pct":4.69215,"hold_s":243},"series":[[0,1],[1,1.0161],[2,1.0295],[3,1.0455],[4,1.0628],[5,1.0809],[6,1.0857],[7,1.0965],[8,1.1006],[9,1.1132],[10,1.1271],[11,1.1423],[12,1.1599],[13,1.1754],[14,1.1937],[15,1.1946],[16,1.2066],[17,1.2217],[18,1.225],[19,1.244],[20,1.2615],[21,1.278],[22,1.2854],[23,0.1509],[24,0.156],[25,0.0001],[26,0.0001],[27,0.0001],[31,0.0001],[60,0.0001]]},{"n":29,"arm":"boost-ride","mode":"rules","symbol":"Ux3UY8","entry_sol":0.01,"opened_at":"2026-07-21T19:45:30.615Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"take_profit","pnl_pct":20.85189,"hold_s":153},"series":[[0,1],[1,1.0803],[2,1.1669],[3,1.2352],[4,1.3053],[5,1.3786],[6,1.443],[7,1.5004],[8,1.555],[9,1.6593],[10,0.0017],[11,0.0017],[12,0.0017],[59,0.0017],[114,0.0017],[140,0.0017]]},{"n":30,"arm":"llm-claude","mode":"llm","symbol":"one","entry_sol":0.01,"opened_at":"2026-07-21T19:49:10.891Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"trailing_stop","pnl_pct":-21.69801,"hold_s":133},"series":[[0,1],[1,0.9758],[2,0.8445],[3,0.9995],[4,0.4885],[5,0.4747],[6,0.4561],[7,0.62],[8,0.382],[9,0.4343],[10,0.4404],[11,0.4097],[12,0.4059],[13,0.4026],[14,0.3946],[15,0.4151],[16,0.4001],[18,0.402],[19,0.4193],[20,0.4453],[21,0.4444],[22,0.4476],[23,0.3532],[25,0.3525],[26,0.3492],[28,0.3407],[32,0.3156],[35,0.314],[36,0.2922],[37,0.276],[38,0.2727],[42,0.2751],[47,0.2744],[49,0.2742],[108,0.2743],[192,0.2735],[223,0.2722]]},{"n":31,"arm":"llm-auto","mode":"llm","symbol":"one","entry_sol":0.01,"opened_at":"2026-07-21T19:49:11.195Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"trailing_stop","pnl_pct":-21.72068,"hold_s":136},"series":[[0,1],[1,0.9758],[2,0.8445],[3,0.9995],[4,0.4885],[5,0.4747],[6,0.4561],[7,0.62],[8,0.382],[9,0.4343],[10,0.4404],[11,0.4097],[12,0.4059],[13,0.4026],[14,0.3946],[15,0.4151],[16,0.4001],[18,0.402],[19,0.4193],[20,0.4453],[21,0.4444],[22,0.4476],[23,0.3532],[25,0.3525],[26,0.3492],[28,0.3407],[32,0.3156],[35,0.314],[36,0.2922],[37,0.276],[38,0.2727],[42,0.2751],[47,0.2744],[49,0.2742],[108,0.2743],[192,0.2735],[223,0.2722]]},{"n":32,"arm":"boost-ride","mode":"rules","symbol":"2UDry5","entry_sol":0.01,"opened_at":"2026-07-21T19:49:57.987Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"stop_loss","pnl_pct":-84.29065,"hold_s":6},"series":[[0,1],[1,1.0669],[2,1.0138],[3,1.0189],[4,1.0813],[5,0.9989],[6,0.1804],[7,0.1802],[52,0.1809],[53,0.181],[137,0.1723]]},{"n":33,"arm":"llm-auto","mode":"llm","symbol":"掌握","entry_sol":0.01,"opened_at":"2026-07-21T20:10:10.838Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"take_profit","pnl_pct":58.778600000000004,"hold_s":84},"series":[[0,1],[1,1.7977],[2,1.5985],[3,1.9576],[4,1.5535],[5,1.4966],[6,1.941],[7,1.761],[8,1.9239],[9,0.9504],[10,0.807],[11,0.7558],[12,1.0841],[13,1.1398],[14,0.4474],[15,0.6389],[16,0.7091],[17,0.7495],[18,0.702],[19,0.7063],[20,0.8307],[21,0.9255],[22,0.9061],[23,0.8894],[24,0.6947],[25,0.707],[26,0.7505],[27,0.6084],[28,0.6926],[29,0.7242],[30,0.7528],[31,0.8627],[32,0.8011],[33,0.8418],[34,0.779],[35,0.7864],[36,0.6681],[37,0.7234],[38,0.7488],[39,0.6648],[40,0.6007],[41,0.8539],[42,0.8821],[43,0.8104],[44,0.9703],[45,1.0645],[46,1.1441],[47,1.1752],[48,1.1577],[49,1.1884],[50,1.1152],[51,1.1455],[52,1.1341],[53,1.0981],[54,0.9389],[55,0.9106],[56,0.8556],[57,0.8401],[58,0.8197],[59,0.8179],[60,0.7911],[61,0.7347],[62,0.6883],[63,0.763],[64,0.7083],[65,0.8479],[66,0.8375],[67,0.7961],[68,0.7211],[69,0.7217],[70,0.764],[71,0.7666],[72,0.7588],[73,0.7594],[74,0.7619],[75,0.7679],[77,0.7629],[79,0.7428],[80,0.6864],[81,0.7511],[82,0.7517],[83,0.9048],[85,0.8826],[87,0.7682],[88,0.7415],[89,0.6878],[91,0.4517],[92,0.4578],[93,0.4438],[95,0.392],[96,0.3932],[97,0.3834],[98,0.3908],[99,0.4116],[101,0.4495],[102,0.3959],[103,0.4474],[104,0.4562],[105,0.4563],[106,0.4063],[111,0.3859],[112,0.3858],[113,0.3654],[115,0.4671],[117,0.4544],[118,0.4758],[119,0.4892],[120,0.4654],[121,0.465],[122,0.4637],[123,0.4639],[128,0.4622],[138,0.4624],[140,0.4619],[145,0.4621],[148,0.3983],[152,0.3968],[153,0.4181],[158,0.4093],[159,0.3996],[169,0.4429],[170,0.4696],[171,0.4425],[172,0.4204],[173,0.419],[194,0.4388],[199,0.4309],[200,0.4297],[202,0.4273],[205,0.4162],[207,0.4146],[208,0.4154],[217,0.3816]]},{"n":34,"arm":"llm-auto","mode":"llm","symbol":"Elon","entry_sol":0.01,"opened_at":"2026-07-21T20:24:11.413Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"stop_loss","pnl_pct":-37.44032,"hold_s":23},"series":[[0,1],[1,1.0439],[2,0.8403],[3,1.7863],[4,1.8144],[5,1.777],[6,0.9876],[7,0.7808],[8,0.4853],[9,0.5036],[10,0.4958],[11,0.4505],[12,0.4593],[13,0.5227],[14,0.5125],[15,0.5119],[16,0.5419],[17,0.5728],[18,0.5958],[19,0.627],[20,0.6595],[21,0.7097],[22,0.4798],[23,0.4311],[24,0.426],[27,0.4257],[28,0.4189],[29,0.4112],[37,0.4085],[39,0.3969],[52,0.3983],[53,0.3983],[85,0.3984],[114,0.3976],[120,0.3969],[121,0.36],[133,0.3572],[160,0.3569],[185,0.3568]]},{"n":35,"arm":"boost-ride","mode":"rules","symbol":"DBrD6t","entry_sol":0.01,"opened_at":"2026-07-21T20:42:55.696Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"stop_loss","pnl_pct":-15.7776,"hold_s":5},"series":[[0,1],[1,0.9689],[2,0.9028],[3,1.003],[4,0.8931],[5,0.8883],[6,0.0205],[7,0.0176],[8,0.0179],[9,0.0177],[10,0.0177],[11,0.0177],[12,0.0176],[13,0.0173],[14,0.0173],[15,0.0173],[21,0.0173],[24,0.017],[27,0.0171],[29,0.0171],[37,0.0171],[54,0.0171],[55,0.0171],[64,0.0171],[153,0.0171],[159,0.0171],[182,0.0171]]},{"n":36,"arm":"llm-claude","mode":"llm","symbol":"Pink","entry_sol":0.01,"opened_at":"2026-07-21T20:58:03.617Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.69512,"hold_s":1804},"series":[[0,1],[4,0.9971],[13,0.9973],[30,0.9958],[37,0.9963]]},{"n":37,"arm":"llm-auto","mode":"llm","symbol":"Pink","entry_sol":0.01,"opened_at":"2026-07-21T20:58:03.702Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.7589200000000003,"hold_s":1806},"series":[[0,1],[4,0.9971],[13,0.9973],[30,0.9958],[37,0.9963]]},{"n":38,"arm":"llm-grok","mode":"llm","symbol":"Pink","entry_sol":0.01,"opened_at":"2026-07-21T20:58:03.770Z","fleet_cfg":{"sl":30,"ts":20,"tp":45,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.82267,"hold_s":1808},"series":[[0,1],[4,0.9971],[13,0.9973],[30,0.9958],[37,0.9963]]},{"n":39,"arm":"llm-claude","mode":"llm","symbol":"CQUACK","entry_sol":0.01,"opened_at":"2026-07-21T23:57:10.445Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.69358,"hold_s":1806},"series":[[0,1],[8,0.9987],[30,1.0002]]},{"n":40,"arm":"oracle-open","mode":"rules","symbol":"MrSue","entry_sol":0.01,"opened_at":"2026-07-22T00:00:06.388Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.53336,"hold_s":1806},"series":[[0,1],[30,1.0028]]},{"n":41,"arm":"boost-ride","mode":"rules","symbol":"HMimvR","entry_sol":0.01,"opened_at":"2026-07-22T00:04:32.381Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"stop_loss","pnl_pct":-20.058329999999998,"hold_s":8},"series":[[0,1],[1,0.9475],[2,0.8265],[3,0.926],[4,0.9594],[5,0.0127],[6,0.0127],[9,0.0126],[13,0.0126],[19,0.0126]]},{"n":42,"arm":"boost-ride","mode":"rules","symbol":"Y4HEU5","entry_sol":0.01,"opened_at":"2026-07-22T00:07:35.835Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"timeout","pnl_pct":11.675,"hold_s":245},"series":[[0,1],[1,1.0293],[2,1.0568],[3,1.0919],[4,1.122],[5,1.0845],[6,1.1039],[7,1.1389],[8,1.1666],[9,1.1918],[10,1.2173],[11,1.2382],[12,1.2559],[13,1.2692],[14,1.2868],[15,1.3125],[16,1.3474],[17,1.3818],[18,1.411],[19,1.4445],[20,1.4647],[21,1.4825],[22,1.5157],[23,1.5367],[24,1.5643],[25,1.5964],[26,1.6298],[27,1.6631],[28,1.6832],[29,1.7338],[30,1.7686],[31,1.8056],[32,1.8245],[33,1.8588],[34,1.8863],[35,1.9275],[36,1.9592],[37,1.9718],[38,1.9998],[39,2.0451],[40,2.0739],[41,2.1405],[42,0.0001],[43,0.0001],[104,0.0001]]},{"n":43,"arm":"llm-auto","mode":"llm","symbol":"WhiteBull","entry_sol":0.01,"opened_at":"2026-07-22T00:16:05.000Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"take_profit","pnl_pct":60.84188,"hold_s":172},"series":[[0,1],[1,0.8909],[2,1.0361],[3,0.1414],[4,0.1417],[5,0.1413],[9,0.1408],[27,0.1407]]},{"n":44,"arm":"llm-grok","mode":"llm","symbol":"DEPE","entry_sol":0.01,"opened_at":"2026-07-22T00:20:14.835Z","fleet_cfg":{"sl":30,"ts":20,"tp":45,"mh":30},"actual":{"exit_reason":"take_profit","pnl_pct":71.26499,"hold_s":112},"series":[[0,1],[1,1.0982],[2,1.0739],[3,1.0954],[4,1.5164],[5,1.129],[6,1.3443],[7,1.3992],[8,0.6379],[9,0.6299],[10,0.461],[11,0.5536],[12,0.5545],[13,0.5045],[14,0.4663],[15,0.4671],[16,0.5093],[17,0.5125],[18,0.5139],[19,0.6534],[20,0.7742],[21,0.7849],[22,0.9169],[23,0.7499],[24,0.5733],[25,0.5628],[26,0.4703],[27,0.4668],[28,0.5233],[29,0.5691],[30,0.5009],[31,0.5501],[32,0.5773],[33,0.8458],[34,0.5967],[35,0.5769],[36,0.5883],[37,0.6162],[38,0.6098],[39,0.524],[40,0.4583],[41,0.4521],[42,0.4039],[43,0.4179],[44,0.4431],[45,0.4465],[47,0.4427],[48,0.426],[49,0.5082],[50,0.5299],[51,0.5347],[52,0.5597],[53,0.5555],[54,0.5858],[55,0.5774],[56,0.4605],[57,0.4477],[58,0.4197],[59,0.4192],[60,0.4114],[61,0.3948],[62,0.3856],[63,0.3984],[65,0.3984],[67,0.3917],[68,0.3622],[69,0.3354],[70,0.3262],[71,0.3179],[72,0.3096],[73,0.3028],[74,0.2938],[76,0.2808],[78,0.2791],[79,0.2835],[81,0.2764],[82,0.2698],[84,0.2698],[86,0.2699],[88,0.273],[93,0.2733],[96,0.2723],[100,0.2631],[104,0.2626],[107,0.2772],[110,0.315],[111,0.3084],[112,0.2998],[113,0.3114],[114,0.3153],[116,0.3072],[120,0.3069],[121,0.2916],[123,0.2911],[126,0.2897],[128,0.2763],[130,0.2763],[133,0.2757],[135,0.2297],[142,0.2289],[144,0.2287],[159,0.2282],[169,0.2281],[177,0.2279],[179,0.2275],[209,0.2271]]},{"n":45,"arm":"oracle-open","mode":"rules","symbol":"FLIPPENING","entry_sol":0.01,"opened_at":"2026-07-22T00:30:13.985Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-18.73254,"hold_s":1804},"series":[[0,1],[1,0.9997],[30,1.0008]]},{"n":46,"arm":"llm-auto","mode":"llm","symbol":"Moon","entry_sol":0.01,"opened_at":"2026-07-22T00:42:01.566Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-4.07484,"hold_s":1807},"series":[[0,1],[3,0.9839],[30,0.9818]]},{"n":47,"arm":"boost-ride","mode":"rules","symbol":"aQzS8b","entry_sol":0.01,"opened_at":"2026-07-22T00:46:35.139Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"timeout","pnl_pct":12.00722,"hold_s":244},"series":[[0,1],[1,1.0263],[2,1.0264],[3,1.0517],[4,1.0883],[5,1.0868],[6,1.1181],[7,1.134],[8,1.1475],[9,1.1531],[10,1.1691],[11,1.1866],[12,1.1917],[13,1.1823],[14,1.2015],[15,1.2176],[16,0.0009],[17,0.0009],[18,0.0009],[20,0.0009],[72,0.0009],[88,0.0009]]},{"n":48,"arm":"llm-claude","mode":"llm","symbol":"Diamond","entry_sol":0.01,"opened_at":"2026-07-22T01:38:13.748Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.46917,"hold_s":1803},"series":[[0,1],[30,0.998],[130,0.9945]]},{"n":49,"arm":"boost-ride","mode":"rules","symbol":"JMBush","entry_sol":0.01,"opened_at":"2026-07-22T01:54:10.725Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"timeout","pnl_pct":5.02356,"hold_s":246},"series":[[0,1],[1,1.005],[2,1.0087],[3,1.022],[4,1.0587],[5,1.1165],[6,1.1589],[7,1.2138],[8,1.2753],[9,1.3254],[10,1.3864],[11,1.4224],[12,1.507],[13,1.5646],[14,1.6237],[15,1.6876],[16,1.7401],[17,1.8062],[18,1.8843],[19,1.9592],[20,2.0254],[21,2.0882],[22,2.1412],[23,2.1603],[24,2.2057],[25,2.2746],[26,2.3557],[27,2.5037],[28,0.0008],[29,0.0004],[30,0.0001],[33,0.0001],[34,0.0001],[35,0.0001],[36,0.0001],[38,0.0001],[39,0.0001],[43,0.0001],[64,0.0001],[222,0.0001]]},{"n":50,"arm":"boost-ride","mode":"rules","symbol":"yMDueA","entry_sol":0.01,"opened_at":"2026-07-22T02:01:40.197Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"stop_loss","pnl_pct":-99.92168,"hold_s":177},"series":[[0,1],[1,1.0296],[2,0.0008],[3,0.0009],[4,0.001],[5,0.001],[6,0.001],[7,0.0001],[8,0.0001],[10,0.0001],[15,0.0001],[62,0.0001],[183,0.0001]]},{"n":51,"arm":"boost-ride","mode":"rules","symbol":"6dAqWB","entry_sol":0.01,"opened_at":"2026-07-22T02:11:14.587Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"stop_loss","pnl_pct":-22.03106,"hold_s":18},"series":[[0,1],[1,1.2401],[2,1.1397],[3,0.9705],[4,0.8895],[5,0.5422],[6,0.8786],[7,0.0354],[8,0.0351],[9,0.0369],[10,0.0368],[11,0.0367],[12,0.0367],[20,0.0366],[21,0.0347],[22,0.0348],[23,0.0347],[36,0.0347],[76,0.0346],[127,0.0345]]},{"n":52,"arm":"llm-auto","mode":"llm","symbol":"tutu","entry_sol":0.01,"opened_at":"2026-07-22T02:12:10.874Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"trailing_stop","pnl_pct":-17.55941,"hold_s":121},"series":[[0,1],[1,1.1938],[2,1.2978],[3,1.5535],[4,1.2397],[5,1.1572],[6,1.426],[7,1.3243],[8,1.1333],[9,0.9952],[10,0.9544],[11,0.7826],[12,0.5844],[13,0.5403],[14,0.5375],[15,0.4912],[16,0.4884],[17,0.4851],[18,0.4645],[19,0.498],[20,0.4979],[24,0.4966],[25,0.4921],[26,0.4879],[27,0.4876],[29,0.4875],[32,0.4706],[35,0.443],[36,0.4423],[41,0.4194],[45,0.4187],[46,0.3923],[95,0.3801],[102,0.3775],[112,0.3759],[131,0.3776],[143,0.3727],[144,0.3745],[157,0.3706],[158,0.3694]]},{"n":53,"arm":"boost-ride","mode":"rules","symbol":"fxppSy","entry_sol":0.01,"opened_at":"2026-07-22T02:26:40.936Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"timeout","pnl_pct":11.29637,"hold_s":247},"series":[[0,1],[1,1.0251],[2,1.0562],[3,1.0778],[4,1.0183],[5,1.0335],[6,1.0581],[7,1.082],[8,1.1153],[9,1.1436],[10,1.1747],[11,1.2015],[12,1.2429],[13,1.2677],[14,1.306],[15,1.3313],[16,1.3594],[17,1.3898],[18,1.4262],[19,1.4554],[20,1.4882],[21,1.5028],[22,1.5384],[23,1.5685],[24,1.5992],[25,1.631],[26,1.6882],[27,1.7226],[28,1.7777],[29,1.801],[30,1.8302],[31,0.0001],[32,0.0001],[33,0.0001],[35,0.0001],[36,0.0001],[40,0.0001],[43,0.0001],[45,0.0001],[46,0.0001],[130,0.0001]]},{"n":54,"arm":"boost-ride","mode":"rules","symbol":"Awyjqw","entry_sol":0.01,"opened_at":"2026-07-22T02:43:51.110Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"stop_loss","pnl_pct":-17.413890000000002,"hold_s":7},"series":[[0,1],[1,1.0508],[2,1.0369],[3,1.0403],[4,1.078],[5,1.1505],[6,1.2902],[7,0.9863],[8,0.7557],[9,0.8763],[10,0.5464],[11,0.7843],[12,0.7999],[13,0.8178],[14,0.0119],[18,0.0119],[22,0.0119],[25,0.0119]]},{"n":55,"arm":"boost-ride","mode":"rules","symbol":"5V3eh6","entry_sol":0.01,"opened_at":"2026-07-22T03:13:01.406Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"stop_loss","pnl_pct":-98.69732,"hold_s":8},"series":[[0,1],[1,1.301],[2,1.4376],[3,1.6472],[4,1.6996],[5,1.4695],[6,1.4552],[7,1.3473],[10,1.3446],[11,1.3369],[14,1.3387],[97,1.3908]]},{"n":56,"arm":"boost-ride","mode":"rules","symbol":"ChRFYk","entry_sol":0.01,"opened_at":"2026-07-22T03:37:26.505Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"stop_loss","pnl_pct":-93.15899,"hold_s":9},"series":[[0,1],[1,0.9018],[2,1.0322],[3,1.1134],[4,0.9923],[5,1.1246],[10,1.0521],[24,1.0593],[30,1.0578],[39,1.052],[55,1.1326],[145,1.1219]]},{"n":57,"arm":"llm-claude","mode":"llm","symbol":"birry","entry_sol":0.01,"opened_at":"2026-07-22T03:38:37.591Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-3.65916,"hold_s":1803},"series":[[0,1],[1,0.9958],[4,0.9955],[29,0.9958]]},{"n":58,"arm":"boost-ride","mode":"rules","symbol":"qFJmT1","entry_sol":0.01,"opened_at":"2026-07-22T03:51:50.253Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"take_profit","pnl_pct":20.390349999999998,"hold_s":206},"series":[[0,1],[1,1.0451],[2,1.0987],[3,1.0484],[4,1.0736],[5,1.1158],[6,1.14],[7,1.1661],[8,1.1844],[9,1.2087],[10,1.2377],[11,1.2597],[12,1.2822],[13,1.3083],[14,1.3292],[15,1.3556],[16,1.3767],[17,1.4048],[18,1.4236],[19,1.4534],[20,1.4742],[21,1.4952],[22,1.5169],[23,1.5432],[24,1.5681],[25,1.5984],[26,1.6216],[27,1.6532],[28,1.6738],[29,0.0001],[30,0.0001],[31,0.0001],[32,0.0001],[33,0.0001],[36,0.0001],[37,0.0001],[38,0.0001],[40,0.0001],[44,0.0001]]},{"n":59,"arm":"boost-ride","mode":"rules","symbol":"4Wkuhs","entry_sol":0.01,"opened_at":"2026-07-22T03:59:56.829Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"trailing_stop","pnl_pct":-8.71937,"hold_s":19},"series":[[0,1],[1,0.8882],[2,1.0014],[3,1.0983],[4,0.9724],[5,0.0394],[6,0.0392],[7,0.0392],[9,0.0398],[11,0.0398],[13,0.0398],[14,0.0404],[15,0.0404],[18,0.0394],[19,0.039],[46,0.039],[50,0.0389],[64,0.0389]]},{"n":60,"arm":"boost-ride","mode":"rules","symbol":"u8oLcb","entry_sol":0.01,"opened_at":"2026-07-22T04:03:22.484Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"take_profit","pnl_pct":20.180519999999998,"hold_s":224},"series":[[0,1],[1,1.0512],[2,1.1106],[3,1.1693],[4,1.2182],[5,1.273],[6,1.3312],[7,1.3676],[8,1.4356],[9,1.4823],[10,1.5306],[11,1.5914],[12,1.6466],[13,1.6791],[14,1.6963],[15,1.7341],[16,1.7914],[17,1.8565],[18,1.9175],[19,1.9425],[20,1.9575],[21,1.9698],[22,1.991],[23,2.0054],[24,2.0195],[25,2.051],[26,2.117],[27,2.177],[28,2.2417],[29,2.2985],[30,2.4083],[31,2.4229],[32,2.4568],[33,0.3845],[34,0.0001],[35,0.0001],[36,0.0001],[41,0.0001],[46,0.0001],[91,0.0001]]},{"n":61,"arm":"llm-grok","mode":"llm","symbol":"BLACKHOLE","entry_sol":0.01,"opened_at":"2026-07-22T05:29:13.292Z","fleet_cfg":{"sl":30,"ts":20,"tp":45,"mh":30},"actual":{"exit_reason":"take_profit","pnl_pct":63.12553,"hold_s":114},"series":[[0,1],[1,1.2162],[2,1.3542],[3,1.1591],[4,1.2881],[5,0.7171],[6,1.2549],[7,1.2253],[8,1.1776],[9,1.3512],[10,0.7709],[11,0.7303],[12,0.8332],[13,0.4554],[14,0.458],[15,0.4763],[16,0.457],[17,0.3335],[18,0.3171],[19,0.2899],[20,0.2852],[21,0.2786],[22,0.2789],[23,0.2768],[24,0.2755],[25,0.2744],[26,0.2738],[27,0.2678],[29,0.2675],[30,0.2626],[32,0.2614],[36,0.2561],[37,0.2708],[38,0.2731],[42,0.2626],[43,0.2544],[47,0.2523],[48,0.252],[50,0.2521],[64,0.2516],[65,0.2509],[70,0.251],[71,0.2513],[83,0.2511],[116,0.2511],[118,0.2271],[150,0.2272]]},{"n":62,"arm":"llm-auto","mode":"llm","symbol":"boss","entry_sol":0.01,"opened_at":"2026-07-22T05:48:07.022Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-4.67428,"hold_s":1803},"series":[[0,1],[1,0.982],[12,0.9806],[30,0.9771]]},{"n":63,"arm":"llm-auto","mode":"llm","symbol":"$RUGHUNTER","entry_sol":0.01,"opened_at":"2026-07-22T08:34:03.301Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.46916,"hold_s":1802},"series":[[0,1],[22,0.979],[30,0.9791]]},{"n":64,"arm":"llm-auto","mode":"llm","symbol":"RCC","entry_sol":0.01,"opened_at":"2026-07-22T09:42:16.492Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.46917,"hold_s":1806},"series":[[0,1],[30,1.0018]]},{"n":65,"arm":"llm-grok","mode":"llm","symbol":"COOK","entry_sol":0.01,"opened_at":"2026-07-22T14:16:05.493Z","fleet_cfg":{"sl":30,"ts":20,"tp":45,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":14.237739999999999,"hold_s":1804},"series":[[0,1],[1,1.0605],[2,1.1049],[9,1.1449],[30,1.1453]]},{"n":66,"arm":"llm-grok","mode":"llm","symbol":"doge","entry_sol":0.01,"opened_at":"2026-07-22T15:13:02.564Z","fleet_cfg":{"sl":30,"ts":20,"tp":45,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-4.08709,"hold_s":1804},"series":[[0,1],[3,0.9853],[30,0.9872]]},{"n":67,"arm":"llm-grok","mode":"llm","symbol":"REC","entry_sol":0.01,"opened_at":"2026-07-22T17:29:48.453Z","fleet_cfg":{"sl":30,"ts":20,"tp":45,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.6495,"hold_s":1804},"series":[[0,1],[29,0.9988]]},{"n":68,"arm":"llm-grok","mode":"llm","symbol":"DUCK","entry_sol":0.01,"opened_at":"2026-07-22T22:36:09.029Z","fleet_cfg":{"sl":30,"ts":20,"tp":45,"mh":30},"actual":{"exit_reason":"take_profit","pnl_pct":65.58952000000001,"hold_s":72},"series":[[0,1],[1,1.8011],[2,2.7765],[3,2.2229],[4,1.7072],[5,0.6583],[6,0.5654],[7,0.6288],[8,0.3822],[9,0.4839],[10,0.4662],[11,0.5428],[12,0.8211],[13,0.9785],[14,1.0045],[15,0.735],[16,0.7248],[17,0.4506],[18,0.4104],[19,0.3522],[20,0.2814],[21,0.3031],[22,0.3438],[23,0.3437],[24,0.3902],[25,0.3374],[26,0.2738],[27,0.2615],[28,0.2226],[29,0.2161],[30,0.2264],[31,0.2405],[32,0.2102],[33,0.1999],[34,0.1977],[36,0.2883],[37,0.2987],[38,0.2936],[40,0.2171],[41,0.2152],[42,0.2002],[44,0.2067],[45,0.199],[46,0.2086],[47,0.2104],[48,0.2036],[49,0.1934],[55,0.1969],[58,0.1896],[59,0.1854],[63,0.186],[66,0.1857],[75,0.1856],[78,0.1677],[79,0.1701],[87,0.1697],[91,0.1731],[93,0.17],[94,0.1901],[99,0.2461],[101,0.2141],[102,0.1816],[103,0.1776],[106,0.1773],[108,0.1742],[111,0.1741],[112,0.1712],[114,0.168],[116,0.1611],[120,0.1615],[121,0.1689],[122,0.168],[123,0.1682],[133,0.1709],[135,0.1694],[136,0.1683],[139,0.1669],[141,0.1664],[177,0.1657],[185,0.173],[186,0.1732],[195,0.173],[214,0.1703],[222,0.1697],[224,0.1775]]},{"n":69,"arm":"oracle-open","mode":"rules","symbol":"Jrool","entry_sol":0.01,"opened_at":"2026-07-23T00:00:06.582Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.47069,"hold_s":1804},"series":[[0,1],[30,1.0053]]},{"n":70,"arm":"oracle-open","mode":"rules","symbol":"Free","entry_sol":0.01,"opened_at":"2026-07-23T00:30:13.231Z","fleet_cfg":{"sl":30,"ts":0,"tp":0,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.46917,"hold_s":1807},"series":[[0,1],[30,0.9972]]},{"n":71,"arm":"llm-claude","mode":"llm","symbol":"RACOIN","entry_sol":0.01,"opened_at":"2026-07-23T00:37:41.576Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"stop_loss","pnl_pct":-78.27683,"hold_s":128},"series":[[0,1],[1,0.1739],[2,0.1738],[91,0.1725]]},{"n":72,"arm":"llm-auto","mode":"llm","symbol":"SAVIOUR","entry_sol":0.01,"opened_at":"2026-07-23T00:50:19.030Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-2.46917,"hold_s":1806},"series":[[0,1],[30,0.9954]]},{"n":73,"arm":"llm-grok","mode":"llm","symbol":"APE","entry_sol":0.01,"opened_at":"2026-07-23T01:21:34.909Z","fleet_cfg":{"sl":30,"ts":20,"tp":45,"mh":30},"actual":{"exit_reason":"timeout","pnl_pct":-9.2284,"hold_s":1802},"series":[[0,1],[1,0.9625],[4,0.9603],[19,0.957],[29,0.9567]]},{"n":74,"arm":"llm-claude","mode":"llm","symbol":"MCP","entry_sol":0.01,"opened_at":"2026-07-23T01:24:04.814Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"trailing_stop","pnl_pct":10.64506,"hold_s":61},"series":[[0,1],[1,1.1012],[2,1.4109],[3,1.8759],[4,2.2373],[5,2.7973],[6,0.2068],[7,0.2105],[8,0.1754],[9,0.1715],[10,0.1737],[11,0.1722],[14,0.1723],[15,0.1751],[16,0.1748],[17,0.1746],[20,0.1746],[24,0.1975],[27,0.1747],[28,0.1739],[31,0.1738],[33,0.1719],[35,0.1717],[37,0.1714],[41,0.1722],[43,0.1707],[53,0.1681],[72,0.1672],[90,0.1673],[92,0.1669],[126,0.1665],[159,0.1663]]},{"n":75,"arm":"llm-auto","mode":"llm","symbol":"COREY","entry_sol":0.01,"opened_at":"2026-07-23T01:40:08.504Z","fleet_cfg":{"sl":30,"ts":20,"tp":60,"mh":30},"actual":{"exit_reason":"trailing_stop","pnl_pct":-26.38929,"hold_s":22},"series":[[0,1],[4,0.9994],[7,0.9862],[8,0.9564],[9,0.9431]]},{"n":76,"arm":"boost-ride","mode":"rules","symbol":"DrqyFF","entry_sol":0.01,"opened_at":"2026-07-23T02:21:54.676Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"timeout","pnl_pct":7.72537,"hold_s":243},"series":[[0,1],[1,1.0373],[2,1.003],[3,1.0456],[4,1.096],[5,1.1351],[6,1.1622],[7,1.1919],[8,1.2172],[9,1.2392],[10,1.2743],[11,1.2982],[12,1.314],[13,1.3356],[14,1.3681],[15,1.4005],[16,1.426],[17,1.4482],[18,1.4821],[19,1.5104],[20,1.5312],[21,1.5757],[22,1.6042],[23,1.631],[24,1.6717],[25,1.6961],[26,1.7145],[27,1.7606],[28,1.7945],[29,1.8294],[30,1.8643],[31,1.9048],[32,1.9381],[33,1.9639],[34,2.0265],[35,2.0705],[36,2.1158],[37,2.1491],[38,2.1919],[39,2.2369],[40,2.2844],[41,2.3125],[42,2.3412],[43,2.4043],[44,2.4439],[45,2.476],[46,2.5112],[47,2.5534],[48,2.5856],[49,2.632],[50,2.6683],[51,2.7151],[52,0.0001],[53,0.0001],[54,0.0001],[55,0.0001],[56,0.0001],[61,0.0001],[68,0.0001],[69,0.0001],[71,0.0001],[88,0.0001],[98,0.0001],[99,0.0001],[109,0.0001]]},{"n":77,"arm":"boost-ride","mode":"rules","symbol":"moHcoC","entry_sol":0.01,"opened_at":"2026-07-23T02:26:48.858Z","fleet_cfg":{"sl":15,"ts":8,"tp":20,"mh":4},"actual":{"exit_reason":"trailing_stop","pnl_pct":-6.36575,"hold_s":114},"series":[[0,1],[1,0.7954],[2,0.6313],[3,0.7703],[4,0.7971],[5,0.0152],[6,0.0152],[20,0.0152],[31,0.0152]]}],"coverage":{"simulated":77,"total":90,"skipped_hourly_granularity":11,"skipped_no_minute_candles":2}}
\ No newline at end of file
diff --git a/blog/autonomous-trading-experiment.html b/blog/autonomous-trading-experiment.html
new file mode 100644
index 000000000..9c345d61f
--- /dev/null
+++ b/blog/autonomous-trading-experiment.html
@@ -0,0 +1,2634 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>We Gave 11 AI Agents Their Own Wallets and Real SOL. Here Are All 90 Trades.</title>
+ <meta name="description" content="Two weeks of fully autonomous pump.fun trading on Solana: 11 armed strategies, 90 closed real-money trades, every entry thesis, every exit, every mistake. Plus the 83,000 coins the fleet did not buy, the winners it missed, and a paperhands audit of every sell. Complete dataset included.">
+ <meta name="keywords" content="autonomous trading agent, AI agent trading, LLM trading, pump.fun sniper, Solana trading bot, agent wallet, decision ledger, trade firewall, self-improving agent, three.ws">
+ <link rel="canonical" href="https://three.ws/blog/autonomous-trading-experiment">
+ <meta property="og:title" content="We Gave 11 AI Agents Their Own Wallets and Real SOL. Here Are All 90 Trades.">
+ <meta property="og:description" content="Two weeks of fully autonomous pump.fun trading on Solana: 11 armed strategies, 90 closed real-money trades, every entry thesis, every exit, every mistake. Plus the 83,000 coins the fleet did not buy, the winners it missed, and a paperhands audit of every sell. Complete dataset included.">
+ <meta property="og:url" content="https://three.ws/blog/autonomous-trading-experiment">
+ <meta property="og:type" content="article">
+ <meta property="og:image" content="https://three.ws/og-image.png">
+ <meta name="twitter:card" content="summary_large_image">
+ <meta name="twitter:title" content="We Gave 11 AI Agents Their Own Wallets and Real SOL. Here Are All 90 Trades.">
+ <meta name="twitter:description" content="Two weeks of fully autonomous pump.fun trading on Solana: 11 armed strategies, 90 closed real-money trades, every entry thesis, every exit, every mistake. Plus the 83,000 coins the fleet did not buy, the winners it missed, and a paperhands audit of every sell. Complete dataset included.">
+ <meta name="twitter:image" content="https://three.ws/og-image.png">
+ <link rel="shortcut icon" href="/favicon.ico">
+ <link rel="stylesheet" href="/nav.css">
+ <link rel="stylesheet" href="/footer.css">
+ <style>
+ :root { color-scheme: dark; }
+ body { margin: 0; background: #060611; color: #e7e7f5; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
+ .post-wrap { max-width: 760px; margin: 0 auto; padding: 96px 24px 80px; }
+ .post-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: #7a85a8; font-size: 13px; margin-bottom: 28px; }
+ .post-date { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
+ .post-tag { padding: 2px 8px; border-radius: 999px; background: rgba(154,212,255,.08); color: #9ad4ff; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; }
+ h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 20px; }
+ h2 { font-size: 22px; font-weight: 600; margin: 48px 0 12px; letter-spacing: -0.01em; }
+ h3 { font-size: 18px; font-weight: 600; margin: 36px 0 8px; }
+ p { color: #c8c8e0; line-height: 1.7; margin: 0 0 18px; font-size: 16px; }
+ ul, ol { color: #c8c8e0; line-height: 1.7; margin: 0 0 18px; padding-left: 24px; font-size: 16px; }
+ li { margin-bottom: 8px; }
+ a { color: #9ad4ff; text-decoration: none; }
+ a:hover { text-decoration: underline; }
+ code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: rgba(154,212,255,.07); color: #9ad4ff; padding: 2px 6px; border-radius: 4px; word-break: break-all; }
+ pre { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 0 0 18px; }
+ pre code { background: none; padding: 0; color: #c8d6f0; font-size: 12.5px; line-height: 1.55; word-break: normal; }
+ strong { color: #e7e7f5; }
+ blockquote { margin: 0 0 18px; padding: 14px 18px; border-left: 3px solid #9ad4ff; background: rgba(154,212,255,.05); border-radius: 0 8px 8px 0; color: #c8c8e0; font-size: 15px; line-height: 1.7; }
+ .pos { color: #6ee7a0; } .neg { color: #ff7a8a; }
+ .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 24px; }
+ .stat { padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.015); }
+ .stat b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
+ .stat span { color: #7a85a8; font-size: 12.5px; }
+ .chart { margin: 0 0 24px; padding: 8px 0 0; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.015); }
+ .chart svg { display: block; width: 100%; height: auto; }
+ .trade-table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 14px; }
+ .trade-table th, .trade-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,.07); color: #c8c8e0; vertical-align: top; }
+ .trade-table th { color: #7a85a8; font-weight: 500; white-space: nowrap; }
+ .table-scroll { overflow-x: auto; margin: 0 0 18px; }
+ .league { width: 100%; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
+ .league th, .league td { text-align: right; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.07); color: #c8c8e0; }
+ .league th { color: #7a85a8; font-weight: 500; }
+ .league td:first-child, .league th:first-child, .league td:nth-child(2), .league th:nth-child(2) { text-align: left; }
+ .mode-tag { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
+ .mode-llm { background: rgba(183,166,255,.12); color: #b7a6ff; }
+ .mode-rules { background: rgba(255,180,84,.1); color: #ffb454; }
+ .arm { margin-bottom: 8px; }
+ .arm-line { font-size: 14.5px; }
+ .arm-cfg { font-size: 13.5px; color: #7a85a8; }
+ details.trade { border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.015); margin-bottom: 8px; transition: border-color .15s, background .15s; }
+ details.trade:hover { border-color: rgba(154,212,255,.25); }
+ details.trade[open] { background: rgba(154,212,255,.03); }
+ details.trade summary { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; padding: 10px 14px; cursor: pointer; list-style: none; font-size: 14px; }
+ details.trade summary::-webkit-details-marker { display: none; }
+ details.trade summary:focus-visible { outline: 2px solid #9ad4ff; border-radius: 10px; }
+ .t-n { color: #7a85a8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; min-width: 34px; }
+ .t-sym { font-weight: 600; }
+ .t-pnl { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
+ .t-exit { color: #7a85a8; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
+ .t-when { color: #7a85a8; font-size: 12.5px; margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
+ .t-body { padding: 4px 16px 14px; border-top: 1px solid rgba(255,255,255,.06); }
+ .t-verdict { font-size: 14.5px; }
+ .thesis { font-size: 14px; }
+ .post-back { display: inline-flex; align-items: center; gap: 6px; color: #7a85a8; font-size: 14px; margin-bottom: 40px; text-decoration: none; }
+ .post-back:hover { color: #9ad4ff; }
+ hr { border: none; border-top: 1px solid rgba(255,255,255,.08); margin: 48px 0; }
+ .post-cta { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; background: linear-gradient(120deg, #ffb454, #ff6ad5 60%, #8b5cf6); color: #060611; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
+ .post-cta:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255,106,213,.25); }
+ .toc { border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.015); padding: 18px 22px; margin: 0 0 28px; }
+ .toc ol { margin: 8px 0 0; font-size: 14.5px; }
+ .dl-box { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
+ .dl-box a { padding: 8px 14px; border: 1px solid rgba(154,212,255,.3); border-radius: 8px; font-size: 14px; }
+ .dl-box a:hover { background: rgba(154,212,255,.08); text-decoration: none; }
+ @media (max-width: 480px) { .t-when { margin-left: 0; } }
+ .abstract { border: 1px solid rgba(154,212,255,.25); border-radius: 12px; background: rgba(154,212,255,.04); padding: 20px 24px; margin: 0 0 28px; font-size: 15px; line-height: 1.75; color: #c8c8e0; }
+ .glossary p { margin: 0 0 10px; font-size: 14.5px; }
+ .league.sortable th { cursor: pointer; user-select: none; white-space: nowrap; }
+ .league.sortable th:hover { color: #9ad4ff; }
+ .league.sortable th.sorted-asc::after { content: " \2191"; color: #9ad4ff; }
+ .league.sortable th.sorted-desc::after { content: " \2193"; color: #9ad4ff; }
+ .wallet-cell code { font-size: 11px; }
+ #toggle-cards { padding: 8px 14px; border: 1px solid rgba(154,212,255,.3); border-radius: 8px; background: none; color: #9ad4ff; font-size: 14px; cursor: pointer; font-family: inherit; }
+ #toggle-cards:hover { background: rgba(154,212,255,.08); }
+ .bt-panel { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.02); padding: 20px 22px; margin: 0 0 18px; }
+ .bt-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 22px; margin-bottom: 14px; }
+ .bt-controls label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: #c8c8e0; }
+ .bt-controls label span { color: #9ad4ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
+ .bt-controls input[type=range] { width: 100%; accent-color: #9ad4ff; }
+ .bt-check { flex-direction: row !important; align-items: center; }
+ .bt-check input { accent-color: #9ad4ff; }
+ .bt-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
+ .bt-presets button { padding: 6px 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: none; color: #d8d8ee; font-size: 12.5px; cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s; }
+ .bt-presets button:hover { background: rgba(154,212,255,.08); border-color: rgba(154,212,255,.4); }
+ .bt-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
+ .bt-results .stat b { font-size: 19px; }
+ .bt-note { font-size: 12.5px; color: #7a85a8; margin: 0; }
+ #bt-chart:empty { display: none; }
+ </style>
+ <script type="application/ld+json">{"@context":"https://schema.org","@type":"BlogPosting","headline":"We Gave 11 AI Agents Their Own Wallets and Real SOL. Here Are All 90 Trades.","description":"Two weeks of fully autonomous pump.fun trading on Solana: 11 armed strategies, 90 closed real-money trades, every entry thesis, every exit, every mistake. Plus the 83,000 coins the fleet did not buy, the winners it missed, and a paperhands audit of every sell. Complete dataset included.","image":"https://three.ws/og-image.png","datePublished":"2026-07-23T12:00:00.000Z","dateModified":"2026-07-23T12:00:00.000Z","author":{"@type":"Organization","name":"three.ws","url":"https://three.ws"},"publisher":{"@type":"Organization","name":"three.ws","url":"https://three.ws","logo":{"@type":"ImageObject","url":"https://three.ws/og-image.png"}},"mainEntityOfPage":{"@type":"WebPage","@id":"https://three.ws/blog/autonomous-trading-experiment"},"keywords":"autonomous trading agent, LLM trading, pump.fun sniper, Solana trading bot, decision ledger, three.ws"}</script>
+ <script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://three.ws/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https://three.ws/blog"},{"@type":"ListItem","position":3,"name":"We Gave 11 AI Agents Their Own Wallets and Real SOL. Here Are All 90 Trades.","item":"https://three.ws/blog/autonomous-trading-experiment"}]}</script>
+</head>
+<body>
+ <div id="nav-container"></div>
+ <main class="post-wrap">
+ <a class="post-back" href="/blog">&larr; Blog</a>
+ <div class="post-meta">
+ <span class="post-date">2026-07-23</span>
+ <span class="post-tag">Postmortem</span>
+ <span class="post-tag">Agents</span>
+ <span class="post-tag">Trading</span>
+ <span class="post-tag">Data</span>
+ </div>
+ <h1>We Gave 11 AI Agents Their Own Wallets and Real SOL. Here Are All 90 Trades.</h1>
+
+ <p>Two weeks ago, an agent on three.ws closed <a href="/blog/first-autonomous-trade">its first autonomous trade</a>. Four days ago we scaled that single agent into a fleet: eleven strategies, each with its own AI agent, its own Solana wallet, and real SOL in it, and we stopped touching the keyboard. Each agent watches the live pump.fun launch firehose, decides on its own which brand-new tokens to buy, sizes the position, and decides when to sell. No human approves anything. Every decision is written to a tamper-evident ledger next to the on-chain transaction that proves it happened.</p>
+ <p>This post is the complete record of every closed real-money trade the program has ever made, from the first cautious test on July 3rd through the fleet's four days of full autonomy: <strong>90 trades across 8 strategies and 8 wallets</strong>, every entry thesis, every exit, every configuration knob, and a grade for every single trade. And because the trades are only half the story, we also audited everything the fleet did <em>not</em> do: the 82,994 launches it saw and declined, the monsters it missed and whether they were catchable, and a coin-by-coin check of whether any of our 90 sells was too early. The dataset is downloadable at the bottom, every transaction links to a Solana explorer, and every agent's reasoning ledger is public. Nothing here is backtested, simulated, or cherry-picked.</p>
+ <p>The headline, stated honestly: <strong>the fleet is down -0.1034 SOL</strong> (about $20 at the time of writing) on 1.93 SOL deployed across those 90 trades. That is a small tuition bill. What the tuition bought is the interesting part: <strong>the two profitable strategies are both the ones where a language model, not a rulebook, makes the buy decision</strong>, and they own six of the seven biggest wins. The rest of this post is the evidence.</p>
+
+ <div class="stat-grid">
+ <div class="stat"><b>90</b><span>closed real trades</span></div>
+ <div class="stat"><b>8</b><span>strategies that traded</span></div>
+ <div class="stat"><b>25</b><span>winners (28%)</span></div>
+ <div class="stat"><b class="neg">-0.103 SOL</b><span>fleet net PnL</span></div>
+ <div class="stat"><b class="pos">+0.015 SOL</b><span>LLM-judged arms (33 trades)</span></div>
+ <div class="stat"><b class="neg">-0.118 SOL</b><span>rules arms (57 trades)</span></div>
+ <div class="stat"><b>+73.9%</b><span>best trade</span></div>
+ <div class="stat"><b>4m</b><span>median hold</span></div>
+ <div class="stat"><b>82,994</b><span>launches seen, 72 bought</span></div>
+ <div class="stat"><b class="pos">0</b><span>sells the market later proved early</span></div>
+ </div>
+
+ <div class="abstract">
+ <strong>Abstract.</strong> We armed eleven autonomous trading strategies, each with its own AI agent and custodial Solana wallet, against the live pump.fun launch firehose, and audited everything they did and did not do. Over the study window the fleet observed 82,994 token launches, submitted 12,770 of them to LLM buy-side judges, and closed 90 real-money positions across 8 strategies for a net of -0.1034 SOL on 1.93 SOL deployed. The LLM-judged cohort was the only profitable one (+0.0147 SOL over 33 trades) despite a lower win rate than the rules cohort, an expectancy effect driven by selection rather than prediction: judged coins the models bought went on to pump or graduate 53.3% of the time versus 11.7% for coins they skipped. The platform's conviction scorer proved strongly predictive at scale (its 50-plus band hit 77.5% good outcomes across 71 labeled coins, seven times the base rate) yet the fleet traded none of that band because two gate thresholds bracketed it. A candle-verified paperhands audit found zero premature sells in 90 exits. Five stop-losses overshot by 48 to 85 points on liquidity collapse. Two autonomous learning loops ran silently dead for two days behind healthy status codes. All raw data, on-chain receipts, per-trade grades, and an interactive exit-policy replay are included below.
+ </div>
+
+ <div class="toc">
+ <strong>Contents</strong>
+ <ol>
+ <li><a href="#theory">The theory: why race rules against a model</a></li>
+ <li><a href="#machine">The machine: how a buy actually happens</a></li>
+ <li><a href="#speed">Speed: from token creation to our buy landing</a></li>
+ <li><a href="#regime">The market we traded in</a></li>
+ <li><a href="#results">The results, in five charts</a></li>
+ <li><a href="#league">The league table, and every wallet in full</a></li>
+ <li><a href="#exits">How trades ended, and what each exit reason teaches</a></li>
+ <li><a href="#vanity">Win rate is a vanity metric</a></li>
+ <li><a href="#judges">What the judges said no to: 12,770 verdicts</a></li>
+ <li><a href="#oracle">The Oracle's report card</a></li>
+ <li><a href="#didnt-buy">The 82,994 coins we did not buy</a></li>
+ <li><a href="#got-away">The ones that got away</a></li>
+ <li><a href="#paperhands">The paperhands audit: did we sell too early?</a></li>
+ <li><a href="#disasters">The disasters: when a stop-loss is a request, not a guarantee</a></li>
+ <li><a href="#cost">The cost of doing business</a></li>
+ <li><a href="#signals">Which entry signals actually separated winners from losers</a></li>
+ <li><a href="#silent">The two silent failures that faked autonomy for two days</a></li>
+ <li><a href="#decisions">The fleet's own decisions so far</a></li>
+ <li><a href="#backtest">Interactive: replay every exit with your own rules</a></li>
+ <li><a href="#all-trades">All 90 trades, graded</a></li>
+ <li><a href="#learned">Everything we learned</a></li>
+ <li><a href="#next">What happens next</a></li>
+ <li><a href="#methods">Methods, data, and glossary</a></li>
+ </ol>
+ </div>
+
+ <h2 id="theory">1. The theory: why race rules against a model</h2>
+ <p>When our first agent closed its <a href="/blog/first-autonomous-trade">first autonomous trade at +42%</a>, we wrote that most of that exit was luck and that the honest way to find out what actually works is a controlled experiment. This fleet is that experiment. It is a multi-armed A/B test where each arm is a full strategy with its own wallet, its own budget, and one deliberately different idea about how to pick entries:</p>
+ <ul>
+ <li><strong>Rules arms</strong> encode a human hypothesis as frozen numbers: market-cap bands, socials requirements, creator-history filters, quality-score thresholds. They are fast, cheap, deterministic, and cannot adapt to anything.</li>
+ <li><strong>Oracle arms</strong> gate entries on our conviction scorer, a model trained on labeled outcomes of past launches (did the coin graduate, pump, or die). One arm requires modest conviction, one requires high conviction.</li>
+ <li><strong>Intel arms</strong> wait out the first minutes of trading and only enter once the intel engine confirms a real two-sided market rather than a painted chart.</li>
+ <li><strong>LLM arms</strong> throw the rulebook away. Every new launch is put in front of a language model with the coin's metadata, the creator's history, and a structured read of the live chart. The model returns <code>{buy, confidence, thesis}</code> and the thesis is stored on the ledger next to the trade. One arm is piloted by a Grok-class model, one by a Claude-class model, one lets the router pick.</li>
+ <li><strong>A graduation arm</strong> ignores new launches entirely and buys tokens at the moment they complete the bonding curve, riding the migration flow with tight exits.</li>
+ </ul>
+ <p>Every arm sits on the identical execution stack, the identical safety rails, and the identical exit ladder machinery, so the only variable being tested is the entry judgment. Position sizes are deliberately small (0.002 to 0.15 SOL per trade) because the point of this phase is information per SOL, not profit.</p>
+ <p>Three armed strategies (<code>oracle-strict</code>, <code>rules-no-socials</code>, <code>rules-wide-band</code>) never closed a real trade in the window: their filters rejected everything the firehose offered. That is not a malfunction. A strategy that mostly refuses to trade is a strategy expressing an opinion, and the skip log records a reason for every rejection.</p>
+
+ <h2 id="machine">2. The machine: how a buy actually happens</h2>
+ <p>A long-lived worker holds a websocket open to the pump.fun firehose and sees every token on Solana the second it exists. From there, a launch has to survive a gauntlet before any wallet key is touched:</p>
+ <ol>
+ <li><strong>The strategy's own entry logic.</strong> Rules arms check their filters; Oracle arms ask the conviction scorer; LLM arms ask their model. This is the experimental variable.</li>
+ <li><strong>The fleet safety bands.</strong> Platform-wide clamps individual strategies can tighten but never loosen. A coin whose market cap cannot be read fails closed.</li>
+ <li><strong>The Mayhem gate.</strong> Pump.fun's adversarial launch mode is excluded unconditionally, read straight from the on-chain bonding curve.</li>
+ <li><strong>The trade firewall.</strong> Before spending, the executor simulates the full buy <em>and sell</em> round trip on-chain. If the token cannot be sold back, it is a honeypot and the buy aborts. 65 of the 90 trades in this dataset carry an explicit <code>allow</code> verdict with a score.</li>
+ <li><strong>Budgets and concurrency.</strong> Per-trade size, daily budget, max concurrent positions, SOL headroom. Only then does the agent's encrypted key sign.</li>
+ </ol>
+ <p>Exits run on a strict priority ladder. It is thirty lines of code and it governed every one of the 90 closes below, so here it is in full:</p>
+ <pre><code>// workers/agent-sniper/exit-logic.js: the single source of truth for
+// &quot;should this position exit, and why&quot;. Priority order is load-bearing.
+export function decideExit(pos, value, peak, now = Date.now(), sentiment = null) {
+ const entry = BigInt(pos.entry_quote_lamports || '0');
+ if (entry &lt;= 0n) return null;
+ const ev = Number(entry);
+ const sl = pct(pos.stop_loss_pct);
+ const ts = pct(pos.trailing_stop_pct);
+ const tp = pct(pos.take_profit_pct);
+
+ if (sl != null &amp;&amp; value &lt;= ev * (1 - sl / 100)) return 'stop_loss';
+ if (isBearishFlip(sentiment) &amp;&amp; value &lt; ev) return 'signal_flip';
+ if (ts != null &amp;&amp; peak &gt; 0 &amp;&amp; value &lt;= peak * (1 - ts / 100)) return 'trailing_stop';
+ if (tp != null &amp;&amp; value &gt;= ev * (1 + tp / 100)) return 'take_profit';
+
+ const heldS = (now - new Date(pos.opened_at).getTime()) / 1000;
+ if (pos.max_hold_seconds != null &amp;&amp; heldS &gt;= pos.max_hold_seconds) return 'timeout';
+ return null;
+}</code></pre>
+ <p>The order is load-bearing. The stop-loss always wins, a trailing stop outranks a take-profit, and the timeout is the backstop that guarantees no position outlives its policy. Wherever you see <code>timeout</code> in the trade list, it means "no other rule fired and the clock ran out".</p>
+ <p>For the LLM arms, this is the prompt doing the judging. Note what it is being asked to do: not to predict the future, but to read a chart shape and a creator history the way a discretionary trader would:</p>
+ <pre><code>// workers/agent-sniper/llm-judge.js: what the model is actually told.
+const SYSTEM_PROMPT = [
+ 'You are the buy-side judge for an autonomous pump.fun sniper on Solana.',
+ 'You will be shown one brand-new token launch. Decide whether a small,',
+ 'time-boxed momentum position (held minutes, hard stop-loss) is worth taking.',
+ // ...
+ 'CRUCIAL: when market data is shown, judge the CHART like an experienced trader.',
+ 'A big opening candle that then stairsteps up on a handful of wallets with no',
+ 'sellers is a PAINTED chart meant to trap momentum bots, not real demand: skip',
+ 'it. Genuine momentum has a real two-sided market.',
+ // ...
+ 'Respond with ONLY a JSON object, no prose, no code fences:',
+ '{&quot;buy&quot;: true|false, &quot;confidence&quot;: &lt;0..1&gt;, &quot;thesis&quot;: &quot;&lt;one short sentence&gt;&quot;}',
+].join(' ');</code></pre>
+ <p>One honest infrastructure note: the fleet's LLM calls route through a failover chain, and during much of this window the named primary models were falling back to cheaper chain models (you will see <code>fallback:ovh</code> and <code>fallback:groq#instant</code> in the trade receipts). So this data does not yet cleanly separate "Grok vs Claude"; what it does separate cleanly is <strong>model judgment vs frozen rules</strong>, because whichever model answered, it was a model reading each launch fresh.</p>
+ <p>Finally, every buy writes a decision to the agent's hash-chained reasoning ledger: rationale, confidence, firewall verdict, prediction. When the position closes, a reconciliation job scores the prediction against realized PnL. That loop is what makes the rest of this article possible, and it is why none of it required reconstruction from memory.</p>
+
+ <h2 id="speed">3. Speed: from token creation to our buy landing</h2>
+ <p>Before any question about judgment, a sniper has to answer a question about physics: how long after a token exists can the machine own it? We measured it for every trade with a recoverable creation timestamp, as the gap between the token's on-chain creation and our buy transaction landing:</p>
+ <figure class="chart"><svg viewBox="0 0 720 256" role="img" aria-label="How fast the machine is, by entry trigger" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">How fast the machine is, by entry trigger</text><text x="140" y="71" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">new_mint</text><rect x="150" y="54" width="85.18268881425904" height="24" rx="5" fill="#9ad4ff" opacity="0.9"/><text x="245.18268881425905" y="71" fill="#e7e7f5" font-size="13" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">3s median (n=20)</text><text x="140" y="113" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">graduation_ride</text><rect x="150" y="96" width="126.92779494428004" height="24" rx="5" fill="#9ad4ff" opacity="0.78"/><text x="286.92779494428004" y="113" fill="#e7e7f5" font-size="13" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">4s median (n=31)</text><text x="140" y="155" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">intel_confirmed</text><rect x="150" y="138" width="406.57628388625506" height="24" rx="5" fill="#9ad4ff" opacity="0.66"/><text x="566.576283886255" y="155" fill="#e7e7f5" font-size="13" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">1.5m median (n=10)</text><text x="140" y="197" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">llm_intel</text><rect x="150" y="180" width="409.78422015709043" height="24" rx="5" fill="#9ad4ff" opacity="0.54"/><text x="569.7842201570904" y="197" fill="#e7e7f5" font-size="13" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">1.6m median (n=29)</text><text x="704" y="246" fill="#7a85a8" font-size="10.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">token creation to our buy landing; log-scale bars</text></svg></figure>
+ <p>The raw-feed paths are effectively instant: <strong>the median <code>new_mint</code> entry landed 3 seconds after the token was created</strong>, and graduation rides caught the migration window in 4 seconds. That covers the full pipeline: firehose event, strategy evaluation, safety bands, the on-chain firewall's simulated buy-and-sell round trip, and transaction confirmation. The intel-mediated paths (<code>intel_confirmed</code>, <code>llm_intel</code>) land around 1.6 minutes by design: they deliberately spend the coin's first ninety seconds watching the market before deciding anything.</p>
+ <p>Two implications. First, execution speed is not this system's bottleneck and never was; nothing in the loss column is explained by being late. Second, the speed made the LLM arms possible at all: a judge that answers in 2.1s median (section 9) still gets its winning entries filled seconds to minutes into a coin's life, comfortably inside the window where the crossing analysis (section 12) says the upside still exists.</p>
+
+ <h2 id="regime">4. The market we traded in</h2>
+ <p>Numbers without their environment mislead, so here is the environment. During the 76 hours the fleet ran, pump.fun produced <strong>82,994 new tokens</strong>, roughly 1,092 per hour around the clock:</p>
+ <figure class="chart"><svg viewBox="0 0 720 300" role="img" aria-label="pump.fun launches per hour while the fleet ran" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">pump.fun launches per hour while the fleet ran</text><line x1="56" y1="236" x2="704" y2="236" stroke="rgba(255,255,255,.06)"/><text x="48" y="240" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0</text><line x1="56" y1="176.46865104496516" x2="704" y2="176.46865104496516" stroke="rgba(255,255,255,.06)"/><text x="48" y="180.46865104496516" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">500</text><line x1="56" y1="116.93730208993033" x2="704" y2="116.93730208993033" stroke="rgba(255,255,255,.06)"/><text x="48" y="120.93730208993033" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">1000</text><line x1="56" y1="57.4059531348955" x2="704" y2="57.4059531348955" stroke="rgba(255,255,255,.06)"/><text x="48" y="61.4059531348955" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">1500</text><polyline fill="rgba(154,212,255,.12)" stroke="#9ad4ff" stroke-width="1.5" points="56,236 56.0,111.6 64.6,106.1 73.3,107.7 81.9,128.8 90.6,130.5 99.2,131.3 107.8,161.2 116.5,155.9 125.1,149.4 133.8,144.9 142.4,108.5 151.0,79.2 159.7,83.1 168.3,109.8 177.0,101.1 185.6,56.1 194.2,56.6 202.9,79.1 211.5,96.1 220.2,58.2 228.8,73.5 237.4,93.5 246.1,79.6 254.7,79.2 263.4,83.0 272.0,123.8 280.6,121.5 289.3,111.2 297.9,117.2 306.6,155.6 315.2,135.4 323.8,151.6 332.5,157.3 341.1,135.3 349.8,142.3 358.4,130.3 367.0,116.3 375.7,89.8 384.3,70.4 393.0,63.6 401.6,88.1 410.2,101.3 418.9,104.0 427.5,89.9 436.2,54.8 444.8,72.6 453.4,85.1 462.1,91.2 470.7,81.6 479.4,68.2 488.0,95.6 496.6,125.2 505.3,137.8 513.9,131.0 522.6,158.0 531.2,149.0 539.8,156.3 548.5,144.7 557.1,135.6 565.8,116.8 574.4,102.8 583.0,98.7 591.7,100.9 600.3,105.4 609.0,54.7 617.6,99.6 626.2,84.0 634.9,98.2 643.5,65.7 652.2,65.3 660.8,89.7 669.4,89.1 678.1,107.5 686.7,48.0 695.4,135.4 704.0,137.2 704,236"/><line x1="246.1" y1="242" x2="246.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="263.4" y1="242" x2="263.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="263.4" y1="242" x2="263.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="272.0" y1="242" x2="272.0" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="272.0" y1="242" x2="272.0" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="272.0" y1="242" x2="272.0" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="280.6" y1="242" x2="280.6" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="289.3" y1="242" x2="289.3" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="306.6" y1="242" x2="306.6" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="315.2" y1="242" x2="315.2" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="315.2" y1="242" x2="315.2" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="315.2" y1="242" x2="315.2" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="323.8" y1="242" x2="323.8" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="323.8" y1="242" x2="323.8" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="323.8" y1="242" x2="323.8" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="332.5" y1="242" x2="332.5" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="332.5" y1="242" x2="332.5" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="341.1" y1="242" x2="341.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="367.0" y1="242" x2="367.0" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="375.7" y1="242" x2="375.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="375.7" y1="242" x2="375.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="375.7" y1="242" x2="375.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="375.7" y1="242" x2="375.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="418.9" y1="242" x2="418.9" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="418.9" y1="242" x2="418.9" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="427.5" y1="242" x2="427.5" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="427.5" y1="242" x2="427.5" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="427.5" y1="242" x2="427.5" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="427.5" y1="242" x2="427.5" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="427.5" y1="242" x2="427.5" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="427.5" y1="242" x2="427.5" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="436.2" y1="242" x2="436.2" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="436.2" y1="242" x2="436.2" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="436.2" y1="242" x2="436.2" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="436.2" y1="242" x2="436.2" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="436.2" y1="242" x2="436.2" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="436.2" y1="242" x2="436.2" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="462.1" y1="242" x2="462.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="470.7" y1="242" x2="470.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="470.7" y1="242" x2="470.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="470.7" y1="242" x2="470.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="470.7" y1="242" x2="470.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="470.7" y1="242" x2="470.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="470.7" y1="242" x2="470.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="470.7" y1="242" x2="470.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="470.7" y1="242" x2="470.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="479.4" y1="242" x2="479.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="479.4" y1="242" x2="479.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="488.0" y1="242" x2="488.0" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="488.0" y1="242" x2="488.0" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="488.0" y1="242" x2="488.0" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="488.0" y1="242" x2="488.0" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="488.0" y1="242" x2="488.0" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="496.6" y1="242" x2="496.6" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="496.6" y1="242" x2="496.6" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="496.6" y1="242" x2="496.6" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="496.6" y1="242" x2="496.6" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="496.6" y1="242" x2="496.6" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="505.3" y1="242" x2="505.3" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="513.9" y1="242" x2="513.9" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="513.9" y1="242" x2="513.9" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="539.8" y1="242" x2="539.8" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="548.5" y1="242" x2="548.5" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="591.7" y1="242" x2="591.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="600.3" y1="242" x2="600.3" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="617.6" y1="242" x2="617.6" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="660.8" y1="242" x2="660.8" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="678.1" y1="242" x2="678.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="678.1" y1="242" x2="678.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="678.1" y1="242" x2="678.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="678.1" y1="242" x2="678.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="678.1" y1="242" x2="678.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="678.1" y1="242" x2="678.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="678.1" y1="242" x2="678.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="678.1" y1="242" x2="678.1" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="686.7" y1="242" x2="686.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="686.7" y1="242" x2="686.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="686.7" y1="242" x2="686.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="686.7" y1="242" x2="686.7" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="695.4" y1="242" x2="695.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="695.4" y1="242" x2="695.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="695.4" y1="242" x2="695.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="695.4" y1="242" x2="695.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="695.4" y1="242" x2="695.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="695.4" y1="242" x2="695.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="695.4" y1="242" x2="695.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><line x1="695.4" y1="242" x2="695.4" y2="252" stroke="#ffb454" stroke-width="2" opacity=".7"/><text x="56" y="270" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">07-20T00h</text><text x="384.32000000000005" y="270" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">07-21T14h</text><text x="704" y="270" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">07-23T03h</text><text x="56" y="292" fill="#ffb454" font-size="11" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">orange ticks: our 87 fleet-window entries</text></svg></figure>
+ <p>Of the 42,995 launches our intel engine watched to a labeled conclusion, <strong>84.6% rugged</strong>, 3.5% went flat, 9.5% pumped meaningfully, and 2.4% graduated to a full DEX listing. That is the deck every strategy in this experiment was drawing from: a market where roughly seven of eight coins are designed to take your money, where the median coin is dead within the hour, and where the winners, when they happen, can run four or five orders of magnitude. Every result below should be read against that base rate, and it is why this article spends as much time on the coins we skipped as the coins we bought.</p>
+ <p>One regime note for anyone reproducing this: pump.fun's BOOST mechanic (a five-minute post-migration buyback window) went live mid-July, shortly before our window. It is the reason the <code>boost-ride</code> arm exists, and it means graduation-adjacent outcome statistics from before that change are not directly comparable to ours.</p>
+
+ <h2 id="results">5. The results, in five charts</h2>
+ <figure class="chart"><svg viewBox="0 0 720 320" role="img" aria-label="Cumulative realized PnL (SOL)" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Cumulative realized PnL (SOL)</text><line x1="56" y1="280" x2="704" y2="280" stroke="rgba(255,255,255,.06)"/><text x="48" y="284" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.12</text><line x1="56" y1="221" x2="704" y2="221" stroke="rgba(255,255,255,.06)"/><text x="48" y="225" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.08</text><line x1="56" y1="162" x2="704" y2="162" stroke="rgba(255,255,255,.06)"/><text x="48" y="166" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.05</text><line x1="56" y1="103" x2="704" y2="103" stroke="rgba(255,255,255,.06)"/><text x="48" y="107" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.01</text><line x1="56" y1="44" x2="704" y2="44" stroke="rgba(255,255,255,.06)"/><text x="48" y="48" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0.03</text><line x1="56" y1="84.64831307148651" x2="704" y2="84.64831307148651" stroke="rgba(255,255,255,.18)"/><polyline fill="none" stroke="#ffb454" stroke-width="2" stroke-linejoin="round" points="56.0,85.6 63.3,51.5 70.6,70.8 77.8,91.8 85.1,108.9 92.4,114.9 99.7,120.8 107.0,132.3 114.2,144.4 121.5,150.3 128.8,161.1 136.1,161.8 143.4,171.0 150.7,172.2 157.9,172.6 165.2,178.9 172.5,179.3 179.8,177.6 187.1,182.8 194.3,183.2 201.6,183.6 208.9,183.6 216.2,203.9 223.5,203.9 230.7,203.9 238.0,203.9 245.3,203.1 252.6,203.1 259.9,203.1 267.1,202.3 274.4,199.0 281.7,212.5 289.0,212.5 296.3,212.5 303.6,212.5 310.8,212.5 318.1,215.1 325.4,215.1 332.7,215.1 340.0,215.1 347.2,218.3 354.5,216.4 361.8,216.4 369.1,216.4 376.4,216.4 383.6,216.8 390.9,214.9 398.2,217.9 405.5,217.9 412.8,217.1 420.0,233.1 427.3,233.1 434.6,236.7 441.9,236.7 449.2,234.9 456.4,237.7 463.7,253.5 471.0,268.5 478.3,265.2 485.6,266.6 492.9,263.4 500.1,263.4 507.4,263.4 514.7,263.4 522.0,263.4 529.3,263.4 536.5,263.4 543.8,263.4 551.1,263.4 558.4,263.4 565.7,263.0 572.9,263.4 580.2,263.8 587.5,263.8 594.8,260.8 602.1,257.6 609.3,258.0 616.6,258.0 623.9,258.0 631.2,263.7 638.5,263.7 645.8,263.7 653.0,269.0 660.3,274.5 667.6,280.0 674.9,278.8 682.2,279.8 689.4,272.9 696.7,277.7 704.0,274.5"/><polyline fill="none" stroke="#b7a6ff" stroke-width="2" stroke-linejoin="round" points="56.0,84.6 63.3,84.6 70.6,84.6 77.8,84.6 85.1,84.6 92.4,84.6 99.7,84.6 107.0,84.6 114.2,84.6 121.5,84.6 128.8,84.6 136.1,84.6 143.4,84.6 150.7,84.6 157.9,84.6 165.2,84.6 172.5,84.6 179.8,84.6 187.1,84.6 194.3,84.6 201.6,84.6 208.9,72.8 216.2,72.8 223.5,73.2 230.7,74.1 238.0,74.8 245.3,74.8 252.6,75.3 259.9,75.8 267.1,75.8 274.4,75.8 281.7,75.8 289.0,79.3 296.3,82.8 303.6,73.3 310.8,79.3 318.1,79.3 325.4,79.8 332.7,80.2 340.0,80.7 347.2,80.7 354.5,80.7 361.8,70.9 369.1,59.4 376.4,59.9 383.6,59.9 390.9,59.9 398.2,59.9 405.5,60.5 412.8,60.5 420.0,60.5 427.3,60.9 434.6,60.9 441.9,63.7 449.2,63.7 456.4,63.7 463.7,63.7 471.0,63.7 478.3,63.7 485.6,63.7 492.9,63.7 500.1,64.3 507.4,54.2 514.7,54.9 522.0,55.3 529.3,55.7 536.5,53.5 543.8,54.1 551.1,54.5 558.4,44.0 565.7,44.0 572.9,44.0 580.2,44.0 587.5,56.6 594.8,56.6 602.1,56.6 609.3,56.6 616.6,57.0 623.9,55.3 631.2,55.3 638.5,59.5 645.8,61.0 653.0,61.0 660.3,61.0 667.6,61.0 674.9,61.0 682.2,61.0 689.4,61.0 696.7,61.0 704.0,61.0"/><polyline fill="none" stroke="#e7e7f5" stroke-width="2.5" stroke-linejoin="round" points="56.0,85.6 63.3,51.5 70.6,70.8 77.8,91.8 85.1,108.9 92.4,114.9 99.7,120.8 107.0,132.3 114.2,144.4 121.5,150.3 128.8,161.1 136.1,161.8 143.4,171.0 150.7,172.2 157.9,172.6 165.2,178.9 172.5,179.3 179.8,177.6 187.1,182.8 194.3,183.2 201.6,183.6 208.9,171.8 216.2,192.1 223.5,192.5 230.7,193.4 238.0,194.1 245.3,193.3 252.6,193.7 259.9,194.2 267.1,193.5 274.4,190.1 281.7,203.7 289.0,207.1 296.3,210.6 303.6,201.2 310.8,207.2 318.1,209.7 325.4,210.2 332.7,210.6 340.0,211.1 347.2,214.3 354.5,212.4 361.8,202.6 369.1,191.2 376.4,191.6 383.6,192.0 390.9,190.1 398.2,193.1 405.5,193.8 412.8,193.0 420.0,209.0 427.3,209.4 434.6,212.9 441.9,215.8 449.2,214.0 456.4,216.8 463.7,232.6 471.0,247.6 478.3,244.3 485.6,245.7 492.9,242.5 500.1,243.0 507.4,232.9 514.7,233.7 522.0,234.0 529.3,234.4 536.5,232.2 543.8,232.8 551.1,233.2 558.4,222.7 565.7,222.4 572.9,222.8 580.2,223.1 587.5,235.7 594.8,232.7 602.1,229.5 609.3,229.9 616.6,230.3 623.9,228.6 631.2,234.3 638.5,238.5 645.8,240.0 653.0,245.3 660.3,250.8 667.6,256.3 674.9,255.1 682.2,256.1 689.4,249.2 696.7,254.1 704.0,250.8"/><text x="56" y="306" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">07-08</text><text x="383.64044943820227" y="306" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">07-22</text><text x="704" y="306" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">07-23</text><text x="56" y="306" fill="#7a85a8" font-size="0"></text><circle cx="400" cy="20" r="4" fill="#e7e7f5"/><text x="410" y="24" fill="#c8c8e0" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">fleet</text><circle cx="470" cy="20" r="4" fill="#b7a6ff"/><text x="480" y="24" fill="#c8c8e0" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">LLM arms</text><circle cx="570" cy="20" r="4" fill="#ffb454"/><text x="580" y="24" fill="#c8c8e0" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">rules arms</text><text x="16" y="36" fill="#7a85a8" font-size="11" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">SOL</text></svg></figure>
+ <p>The white line is the fleet's cumulative realized PnL across all 90 closes (the horizontal axis is trade sequence, labeled by close date); purple is the LLM arms alone; orange is everything rules-driven. The story is visible at a glance: the rules cohort bleeds slowly and steadily, while the LLM cohort chops sideways and then steps up in discrete jumps. Those jumps are take-profit exits in the +45% to +74% range. The fleet line is the sum of an orange slope and purple stairs.</p>
+ <figure class="chart"><svg viewBox="0 0 720 332" role="img" aria-label="Net realized PnL per arm (SOL)" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Net realized PnL per arm (SOL)</text><line x1="380" y1="38" x2="380" y2="320" stroke="rgba(255,255,255,.18)"/><text x="122" y="64" fill="#b7a6ff" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">llm-grok</text><rect x="380" y="50" width="114.88822301199295" height="20" rx="4" fill="#6ee7a0" opacity=".85"/><text x="502.888223011993" y="64" fill="#6ee7a0" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">+0.0190</text><text x="122" y="98" fill="#b7a6ff" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">llm-auto</text><rect x="380" y="84" width="38.756400105492105" height="20" rx="4" fill="#6ee7a0" opacity=".85"/><text x="426.7564001054921" y="98" fill="#6ee7a0" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">+0.0064</text><text x="122" y="132" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">rules-classic</text><rect x="376.5983071403897" y="118" width="3.401692859610314" height="20" rx="4" fill="#ff7a8a" opacity=".85"/><text x="388" y="132" fill="#ff7a8a" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.0006</text><text x="122" y="166" fill="#b7a6ff" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">llm-claude</text><rect x="315.51838651893127" y="152" width="64.48161348106875" height="20" rx="4" fill="#ff7a8a" opacity=".85"/><text x="388" y="166" fill="#ff7a8a" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.0107</text><text x="122" y="200" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">oracle-open</text><rect x="279.2107613651855" y="186" width="100.78923863481455" height="20" rx="4" fill="#ff7a8a" opacity=".85"/><text x="388" y="200" fill="#ff7a8a" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.0167</text><text x="122" y="234" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">rules-proven</text><rect x="268.9880438903657" y="220" width="111.01195610963431" height="20" rx="4" fill="#ff7a8a" opacity=".85"/><text x="388" y="234" fill="#ff7a8a" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.0183</text><text x="122" y="268" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">boost-ride</text><rect x="130.15893764735577" y="254" width="249.84106235264423" height="20" rx="4" fill="#ff7a8a" opacity=".85"/><text x="388" y="268" fill="#ff7a8a" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.0413</text><text x="122" y="302" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">intel-quality</text><rect x="130" y="288" width="250" height="20" rx="4" fill="#ff7a8a" opacity=".85"/><text x="388" y="302" fill="#ff7a8a" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.0413</text></svg></figure>
+ <p>Per arm, the split is stark. The two profitable arms are both LLM-judged (purple labels). Every rules arm is flat to negative, and the two worst performers lost money in completely different ways: <code>intel-quality</code> took a small number of large losses on coins whose charts looked confirmed, while <code>boost-ride</code> took 31 small trades and got wrecked by four catastrophic liquidity collapses (section 14).</p>
+ <figure class="chart"><svg viewBox="0 0 720 300" role="img" aria-label="Win rate vs avg winner, per arm" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Win rate vs avg winner, per arm</text><line x1="56" y1="234" x2="704" y2="234" stroke="rgba(255,255,255,.06)"/><text x="48" y="238" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0</text><line x1="56" y1="188.5" x2="704" y2="188.5" stroke="rgba(255,255,255,.06)"/><text x="48" y="192.5" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">25</text><line x1="56" y1="143" x2="704" y2="143" stroke="rgba(255,255,255,.06)"/><text x="48" y="147" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">50</text><rect x="68.96000000000001" y="153.92000000000002" width="24.3" height="80.08" rx="3" fill="#9ad4ff" opacity=".8"/><rect x="98.12" y="136.53091009999997" width="24.3" height="97.46908990000001" rx="3" fill="#6ee7a0" opacity=".8"/><text x="96.5" y="250" fill="#b7a6ff" font-size="10.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace" transform="rotate(-24 96.5 250)">llm-grok</text><rect x="149.96" y="197.6" width="24.3" height="36.4" rx="3" fill="#9ad4ff" opacity=".8"/><rect x="179.12" y="116.61269966666666" width="24.3" height="117.38730033333334" rx="3" fill="#6ee7a0" opacity=".8"/><text x="177.5" y="250" fill="#b7a6ff" font-size="10.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace" transform="rotate(-24 177.5 250)">llm-auto</text><rect x="230.96" y="234" width="24.3" height="1" rx="3" fill="#9ad4ff" opacity=".8"/><rect x="260.12" y="234" width="24.3" height="1" rx="3" fill="#6ee7a0" opacity=".8"/><text x="258.5" y="250" fill="#7a85a8" font-size="10.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace" transform="rotate(-24 258.5 250)">rules-classic</text><rect x="311.96" y="213.98" width="24.3" height="20.02" rx="3" fill="#9ad4ff" opacity=".8"/><rect x="341.12" y="214.6259908" width="24.3" height="19.3740092" rx="3" fill="#6ee7a0" opacity=".8"/><text x="339.5" y="250" fill="#b7a6ff" font-size="10.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace" transform="rotate(-24 339.5 250)">llm-claude</text><rect x="392.96" y="221.26" width="24.3" height="12.740000000000002" rx="3" fill="#9ad4ff" opacity=".8"/><rect x="422.12" y="215.1015932" width="24.3" height="18.8984068" rx="3" fill="#6ee7a0" opacity=".8"/><text x="420.5" y="250" fill="#7a85a8" font-size="10.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace" transform="rotate(-24 420.5 250)">oracle-open</text><rect x="473.96" y="197.6" width="24.3" height="36.4" rx="3" fill="#9ad4ff" opacity=".8"/><rect x="503.12" y="156.86425767999998" width="24.3" height="77.13574232" rx="3" fill="#6ee7a0" opacity=".8"/><text x="501.5" y="250" fill="#7a85a8" font-size="10.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace" transform="rotate(-24 501.5 250)">rules-proven</text><rect x="554.96" y="146.64" width="24.3" height="87.36" rx="3" fill="#9ad4ff" opacity=".8"/><rect x="584.12" y="206.92816854666665" width="24.3" height="27.071831453333335" rx="3" fill="#6ee7a0" opacity=".8"/><text x="582.5" y="250" fill="#7a85a8" font-size="10.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace" transform="rotate(-24 582.5 250)">boost-ride</text><rect x="635.96" y="234" width="24.3" height="1" rx="3" fill="#9ad4ff" opacity=".8"/><rect x="665.12" y="234" width="24.3" height="1" rx="3" fill="#6ee7a0" opacity=".8"/><text x="663.5" y="250" fill="#7a85a8" font-size="10.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace" transform="rotate(-24 663.5 250)">intel-quality</text><circle cx="410" cy="20" r="4" fill="#9ad4ff"/><text x="420" y="24" fill="#c8c8e0" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">win rate %</text><circle cx="530" cy="20" r="4" fill="#6ee7a0"/><text x="540" y="24" fill="#c8c8e0" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">avg winner %</text></svg></figure>
+ <p>This chart is the argument against judging a strategy by its win rate. <code>boost-ride</code> wins 48% of the time and is still net negative; <code>llm-auto</code> wins only 20% of the time and is net positive, because its average winner is +64.5%. Win rate tells you how often you were right. It says nothing about what being right was worth.</p>
+ <figure class="chart"><svg viewBox="0 0 720 280" role="img" aria-label="How the 90 positions closed" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">How the 90 positions closed</text><text x="214.5" y="42" fill="#7a85a8" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">count</text><text x="561.5" y="42" fill="#7a85a8" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">net SOL</text><text x="48" y="76.75" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">timeout</text><rect x="56" y="58" width="257" height="29.5" rx="4" fill="#9ad4ff" opacity=".75"/><text x="321" y="76.75" fill="#9ad4ff" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">47</text><line x1="526.5" y1="56" x2="526.5" y2="89.5" stroke="rgba(255,255,255,.15)"/><rect x="475.1029196436077" y="58" width="51.39708035639225" height="29.5" rx="4" fill="#ff7a8a" opacity=".85"/><text x="467.1029196436077" y="76.75" fill="#ff7a8a" font-size="12" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.036</text><text x="48" y="122.25" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">stop_loss</text><rect x="56" y="103.5" width="98.42553191489361" height="29.5" rx="4" fill="#9ad4ff" opacity=".75"/><text x="162.4255319148936" y="122.25" fill="#9ad4ff" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">18</text><line x1="526.5" y1="101.5" x2="526.5" y2="135" stroke="rgba(255,255,255,.15)"/><rect x="403" y="103.5" width="123.5" height="29.5" rx="4" fill="#ff7a8a" opacity=".85"/><text x="395" y="122.25" fill="#ff7a8a" font-size="12" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.086</text><text x="48" y="167.75" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">take_profit</text><rect x="56" y="149" width="71.08510638297872" height="29.5" rx="4" fill="#9ad4ff" opacity=".75"/><text x="135.08510638297872" y="167.75" fill="#9ad4ff" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">13</text><line x1="526.5" y1="147" x2="526.5" y2="180.5" stroke="rgba(255,255,255,.15)"/><rect x="526.5" y="149" width="79.67067902815907" height="29.5" rx="4" fill="#6ee7a0" opacity=".85"/><text x="614.170679028159" y="167.75" fill="#6ee7a0" font-size="12" text-anchor="start" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">+0.056</text><text x="48" y="213.25" fill="#c8c8e0" font-size="12.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">trailing_stop</text><rect x="56" y="194.5" width="65.61702127659574" height="29.5" rx="4" fill="#9ad4ff" opacity=".75"/><text x="129.61702127659572" y="213.25" fill="#9ad4ff" font-size="12" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">12</text><line x1="526.5" y1="192.5" x2="526.5" y2="226" stroke="rgba(255,255,255,.15)"/><rect x="473.754535605421" y="194.5" width="52.745464394578995" height="29.5" rx="4" fill="#ff7a8a" opacity=".85"/><text x="465.754535605421" y="213.25" fill="#ff7a8a" font-size="12" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-0.037</text></svg></figure>
+ <p>47 of 90 trades (52%) ended on <code>timeout</code>: the coin did nothing definitive and the clock expired. Take-profit exits are the only category that is meaningfully net positive (+0.056 SOL across 13 trades), and stop-losses are the biggest single drain (-0.086 SOL across 18).</p>
+ <figure class="chart"><svg viewBox="0 0 720 340" role="img" aria-label="Hold time vs realized PnL" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Hold time vs realized PnL</text><line x1="56" y1="152.56620863163437" x2="704" y2="152.56620863163437" stroke="rgba(255,255,255,.18)"/><line x1="56" y1="223.33853320041945" x2="704" y2="223.33853320041945" stroke="rgba(255,255,255,.06)"/><text x="48" y="227.33853320041945" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">-50%</text><line x1="56" y1="152.56620863163437" x2="704" y2="152.56620863163437" stroke="rgba(255,255,255,.06)"/><text x="48" y="156.56620863163437" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0%</text><line x1="56" y1="81.79388406284927" x2="704" y2="81.79388406284927" stroke="rgba(255,255,255,.06)"/><text x="48" y="85.79388406284927" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">50%</text><text x="199.35554780334928" y="322" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">1m</text><line x1="199.35554780334928" y1="48" x2="199.35554780334928" y2="294" stroke="rgba(255,255,255,.06)"/><text x="332.19287084651023" y="322" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">10m</text><line x1="332.19287084651023" y1="48" x2="332.19287084651023" y2="294" stroke="rgba(255,255,255,.06)"/><text x="435.560399870162" y="322" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">1h</text><line x1="435.560399870162" y1="48" x2="435.560399870162" y2="294" stroke="rgba(255,255,255,.06)"/><text x="618.9039664532088" y="322" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">1d</text><line x1="618.9039664532088" y1="48" x2="618.9039664532088" y2="294" stroke="rgba(255,255,255,.06)"/><circle cx="704.0" cy="192.4" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="395.7" cy="92.6" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="644.7" cy="163.9" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="184.0" cy="189.5" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="395.8" cy="162.6" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="157.4" cy="172.8" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="395.6" cy="159.6" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.8" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="237.9" cy="171.5" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="395.8" cy="158.9" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="119.4" cy="233.9" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="395.7" cy="163.0" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="202.2" cy="207.7" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="395.7" cy="156.2" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="137.9" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="157.4" cy="198.6" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="395.7" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.8" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="206.6" cy="48.0" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="398.6" cy="188.3" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.8" cy="156.4" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.9" cy="160.4" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="158.7" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="280.5" cy="145.2" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.6" cy="156.8" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="156.9" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="280.0" cy="145.9" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="253.4" cy="123.1" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="66.5" cy="271.9" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="245.3" cy="183.3" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="246.6" cy="183.3" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="218.8" cy="69.4" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="144.0" cy="205.6" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="56.0" cy="174.9" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="395.7" cy="156.4" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.8" cy="156.5" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.8" cy="156.6" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="83.1" cy="181.0" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="280.5" cy="136.0" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="260.1" cy="66.4" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="235.4" cy="51.7" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="395.8" cy="156.4" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.8" cy="156.2" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="280.3" cy="135.6" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="179.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.8" cy="158.3" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="280.8" cy="145.5" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="261.8" cy="294.0" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="395.7" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="129.9" cy="183.7" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="239.8" cy="177.4" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="281.0" cy="136.6" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="75.4" cy="177.2" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="83.1" cy="292.3" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="89.9" cy="284.4" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="270.5" cy="123.7" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="133.0" cy="164.9" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="275.4" cy="124.0" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="395.7" cy="157.7" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="236.4" cy="63.2" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="395.7" cy="159.2" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.6" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.8" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="132.4" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="158.4" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="156.3" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="209.9" cy="59.7" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="280.0" cy="149.7" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.7" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="119.4" cy="155.8" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="243.1" cy="263.4" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="262.4" cy="126.1" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="257.4" cy="124.2" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="395.8" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="395.8" cy="156.1" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="200.3" cy="137.5" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="237.4" cy="203.0" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="141.5" cy="189.9" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="395.6" cy="165.6" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="266.2" cy="199.0" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="265.2" cy="201.1" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="265.9" cy="201.3" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="280.0" cy="141.6" r="4.5" fill="#9ad4ff" opacity=".72"/><circle cx="236.4" cy="161.6" r="4.5" fill="#ffb454" opacity=".72"/><circle cx="290.8" cy="91.8" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="282.6" cy="195.2" r="4.5" fill="#ff7a8a" opacity=".72"/><circle cx="246.1" cy="123.7" r="4.5" fill="#6ee7a0" opacity=".72"/><circle cx="300" cy="40" r="4" fill="#6ee7a0"/><text x="309" y="44" fill="#c8c8e0" font-size="11.5" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">take_profit</text><circle cx="401.2" cy="40" r="4" fill="#ff7a8a"/><text x="410.2" y="44" fill="#c8c8e0" font-size="11.5" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">stop_loss</text><circle cx="488" cy="40" r="4" fill="#ffb454"/><text x="497" y="44" fill="#c8c8e0" font-size="11.5" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">trailing_stop</text><circle cx="603.6" cy="40" r="4" fill="#9ad4ff"/><text x="612.6" y="44" fill="#c8c8e0" font-size="11.5" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">timeout</text></svg></figure>
+ <p>Each dot is one trade, horizontal axis is hold time on a log scale, vertical is realized PnL. The structure worth noticing: green take-profit dots cluster between ten minutes and half an hour (winners need time to run), red stop-loss dots stack in the first minutes (losers announce themselves fast), and the long right tail is <code>graduation_ride</code> positions that survived hours or days. The five red dots at the very bottom are the liquidity-collapse disasters.</p>
+
+ <h2 id="league">6. The league table</h2>
+ <div class="table-scroll">
+ <table class="league">
+ <tr><th>arm</th><th>mode</th><th>trades</th><th>wins</th><th>net SOL</th><th>avg win</th><th>avg loss</th><th>best</th><th>worst</th><th>med hold</th></tr>
+ <tr>
+<td><a href="#arm-llm-grok">llm-grok</a></td>
+<td>llm</td><td>9</td><td>4 (44%)</td>
+<td class="pos">+0.0190 SOL</td>
+<td>+53.6%</td><td>-4.9%</td>
+<td>+71.3%</td><td>-9.2%</td><td>30m</td>
+</tr>
+<tr>
+<td><a href="#arm-llm-auto">llm-auto</a></td>
+<td>llm</td><td>15</td><td>3 (20%)</td>
+<td class="pos">+0.0064 SOL</td>
+<td>+64.5%</td><td>-10.8%</td>
+<td>+73.9%</td><td>-37.4%</td><td>30m</td>
+</tr>
+<tr>
+<td><a href="#arm-rules-classic">rules-classic</a></td>
+<td>rules</td><td>1</td><td>0 (0%)</td>
+<td class="neg">-0.0006 SOL</td>
+<td>+0.0%</td><td>-28.1%</td>
+<td>-28.1%</td><td>-28.1%</td><td>4.4d</td>
+</tr>
+<tr>
+<td><a href="#arm-llm-claude">llm-claude</a></td>
+<td>llm</td><td>9</td><td>1 (11%)</td>
+<td class="neg">-0.0107 SOL</td>
+<td>+10.6%</td><td>-14.7%</td>
+<td>+10.6%</td><td>-78.3%</td><td>30m</td>
+</tr>
+<tr>
+<td><a href="#arm-oracle-open">oracle-open</a></td>
+<td>rules</td><td>14</td><td>1 (7%)</td>
+<td class="neg">-0.0167 SOL</td>
+<td>+10.4%</td><td>-13.6%</td>
+<td>+10.4%</td><td>-57.4%</td><td>30m</td>
+</tr>
+<tr>
+<td><a href="#arm-rules-proven">rules-proven</a></td>
+<td>rules</td><td>5</td><td>1 (20%)</td>
+<td class="neg">-0.0183 SOL</td>
+<td>+42.4%</td><td>-19.8%</td>
+<td>+42.4%</td><td>-26.1%</td><td>2m</td>
+</tr>
+<tr>
+<td><a href="#arm-boost-ride">boost-ride</a></td>
+<td>rules</td><td>31</td><td>15 (48%)</td>
+<td class="neg">-0.0413 SOL</td>
+<td>+14.9%</td><td>-39.8%</td>
+<td>+42.9%</td><td>-99.9%</td><td>3m</td>
+</tr>
+<tr>
+<td><a href="#arm-intel-quality">intel-quality</a></td>
+<td>rules</td><td>6</td><td>0 (0%)</td>
+<td class="neg">-0.0413 SOL</td>
+<td>+0.0%</td><td>-4.6%</td>
+<td>-2.5%</td><td>-8.0%</td><td>30m</td>
+</tr>
+ </table>
+ </div>
+ <h3 id="wallets">Every wallet, in full</h3>
+ <p>Nothing in this experiment is anonymous. Each arm trades from its own custodial wallet; here is each one's full address, what it holds right now, and its complete lifetime record, with direct links to the on-chain history and the agent's public decision ledger. Balances are live at time of writing and include SOL the auto-funder topped up beyond trading PnL, which is why balance and net PnL do not reconcile one-to-one.</p>
+ <div class="table-scroll">
+ <table class="league">
+ <tr><th>arm</th><th>agent</th><th>wallet address</th><th>balance now</th><th>deployed</th><th>realized</th><th>ROI</th><th>links</th></tr>
+ <tr>
+<td>llm-grok</td><td>Swarm 2</td>
+<td class="wallet-cell"><code>HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca</code></td>
+<td>0.0369 SOL</td>
+<td>0.130 SOL</td>
+<td class="pos">+0.0117</td>
+<td>+9.0%</td>
+<td><a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=bcb8c86f-92d2-496d-bb2c-b9442f97a4fa&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>llm-auto</td><td>Swarm 5</td>
+<td class="wallet-cell"><code>HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s</code></td>
+<td>0.0592 SOL</td>
+<td>0.160 SOL</td>
+<td class="pos">+0.0056</td>
+<td>+3.5%</td>
+<td><a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=d10aae1b-c56f-4780-88cb-e9b7405ef29e&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>rules-wide-band</td><td>Swarm 1</td>
+<td class="wallet-cell"><code>98HyVNAbitNjwGafNZyrd7zuPsCT6cse1ZYGSwMy2cHB</code></td>
+<td>0.0500 SOL</td>
+<td>0.000 SOL</td>
+<td class="pos">+0.0000</td>
+<td></td>
+<td><a href="https://solscan.io/account/98HyVNAbitNjwGafNZyrd7zuPsCT6cse1ZYGSwMy2cHB" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=781b75a3-86f9-44ee-b29b-6f71d1acad79&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>oracle-strict</td><td>My First Agent</td>
+<td class="wallet-cell"><code></code></td>
+<td>? SOL</td>
+<td>0.000 SOL</td>
+<td class="pos">+0.0000</td>
+<td></td>
+<td><a href="" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=6287faf3-d41b-43cb-97bb-d305c1ac6e45&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>rules-no-socials</td><td>Swarm 3</td>
+<td class="wallet-cell"><code>8EbtMn6cSZd7tCsFb7y3DBYsdV4jDzqYzqNw7QBRBpww</code></td>
+<td>0.0500 SOL</td>
+<td>0.000 SOL</td>
+<td class="pos">+0.0000</td>
+<td></td>
+<td><a href="https://solscan.io/account/8EbtMn6cSZd7tCsFb7y3DBYsdV4jDzqYzqNw7QBRBpww" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=2b8a5101-6572-4dd5-8f11-d9fdb5e31490&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>rules-classic</td><td>Swarm 7</td>
+<td class="wallet-cell"><code>7KdHYVovYzmrJCE3w6g1iGxeUWJmXoTZLKbBqD7QdWfD</code></td>
+<td>0.0500 SOL</td>
+<td>0.002 SOL</td>
+<td class="neg">-0.0006</td>
+<td>-28.1%</td>
+<td><a href="https://solscan.io/account/7KdHYVovYzmrJCE3w6g1iGxeUWJmXoTZLKbBqD7QdWfD" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=15e98de5-2695-427b-b746-4558a0933a4e&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>llm-claude</td><td>Swarm 9</td>
+<td class="wallet-cell"><code>65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8</code></td>
+<td>0.0230 SOL</td>
+<td>0.090 SOL</td>
+<td class="neg">-0.0107</td>
+<td>-11.8%</td>
+<td><a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=c7b23f0f-a7fc-412d-81c8-2b2b06119af2&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>oracle-open</td><td>Moe Money AI</td>
+<td class="wallet-cell"><code>54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M</code></td>
+<td>0.0371 SOL</td>
+<td>0.140 SOL</td>
+<td class="neg">-0.0167</td>
+<td>-11.9%</td>
+<td><a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=0846c27e-6258-4859-bc1c-3148d59951c5&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>rules-proven</td><td>three</td>
+<td class="wallet-cell"><code>3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc</code></td>
+<td>0.3515 SOL</td>
+<td>0.250 SOL</td>
+<td class="neg">-0.0183</td>
+<td>-7.3%</td>
+<td><a href="https://solscan.io/account/3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=4c0e4d18-0544-4c95-a0db-a16896b029be&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>boost-ride</td><td>Sniper Arm: Boost Ride</td>
+<td class="wallet-cell"><code>3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt</code></td>
+<td>0.0587 SOL</td>
+<td>0.310 SOL</td>
+<td class="neg">-0.0413</td>
+<td>-13.3%</td>
+<td><a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=0b148e48-d49c-418f-b0ce-a0b95f9b223e&amp;kind=snipe">ledger</a></td>
+</tr>
+<tr>
+<td>intel-quality</td><td>Nadirah</td>
+<td class="wallet-cell"><code>D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu</code></td>
+<td>0.2930 SOL</td>
+<td>0.900 SOL</td>
+<td class="neg">-0.0413</td>
+<td>-4.6%</td>
+<td><a href="https://solscan.io/account/D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu" target="_blank" rel="noopener">chain</a> · <a href="/reasoning-ledger?agent=adba030a-2536-4476-a34d-7ce096d2e033&amp;kind=snipe">ledger</a></td>
+</tr>
+ <tr>
+<td colspan="2"><strong>fleet master (auto-funder)</strong></td>
+<td class="wallet-cell"><code>888BXStWfjmb5CLUL99GGPxqrHQXDhqaj8K4sXChfpvp</code></td>
+<td>0.9015 SOL</td>
+<td colspan="3"></td>
+<td><a href="https://solscan.io/account/888BXStWfjmb5CLUL99GGPxqrHQXDhqaj8K4sXChfpvp" target="_blank" rel="noopener">chain</a></td>
+</tr>
+ </table>
+ </div>
+ <p>Anyone can audit any of these wallets on any Solana explorer, at any time, without asking us. That is not bravado; it is the constraint that keeps every claim in this article checkable, and it is also live risk transparency: these are hot wallets executing autonomous code, sized so that a total loss of any one of them is an acceptable research cost.</p>
+
+ <p>And the seven biggest winners fleet-wide, six of which belong to the LLM arms:</p>
+ <div class="table-scroll">
+ <table class="league">
+ <tr><th>token</th><th>arm</th><th>realized</th><th>exit</th><th>hold</th><th>receipts</th></tr>
+ <tr>
+<td>House</td>
+<td>llm-auto</td><td class="pos">+73.9%</td><td>take_profit</td>
+<td>68s</td>
+<td><a href="https://solscan.io/tx/2tvE2et8cAvym1QfbWx2zTgshS9XKr1V1WfkZae9kG1pGPjS8c7GPTekd6vXy9PQggNvbADcNZ66VJZeCDCzrN3E" target="_blank" rel="noopener">buy</a> · <a href="https://solscan.io/tx/5FwxKvGF9EGitXjrvaDPWxceWR9BxToVvsxjzvfZyz5TCJxpzkoqpc2tbEkxYZ1sopufYdoQ7esmGFPHW4v778Zb" target="_blank" rel="noopener">sell</a></td>
+</tr>
+<tr>
+<td>DEPE</td>
+<td>llm-grok</td><td class="pos">+71.3%</td><td>take_profit</td>
+<td>2m</td>
+<td><a href="https://solscan.io/tx/39YjJq5qnSv4WbRVWjuPdoEdmcdzMko43RKCxrBhYpDjGjGoGgYHTSGcx5coycKtVVtu1kb4DhPhkEas3rktm84j" target="_blank" rel="noopener">buy</a> · <a href="https://solscan.io/tx/PNKvurqwfjPEpAbrPMSdaqT6T1CvyZpKEbmuucTwrhGqQNvXDjrGwujfe2ErLk2vueq7MLixLjR4VNBPeRJYFby" target="_blank" rel="noopener">sell</a></td>
+</tr>
+<tr>
+<td>DUCK</td>
+<td>llm-grok</td><td class="pos">+65.6%</td><td>take_profit</td>
+<td>72s</td>
+<td><a href="https://solscan.io/tx/X6GpUitp5F4sp7GqRdQS6X9mgRfEEsJC6b5kjnvBgYALUxSEDMwAjxnK1F3ycSvyoWJyLCPZduN1v3VSLQbi2Mw" target="_blank" rel="noopener">buy</a> · <a href="https://solscan.io/tx/3XWzmFtAuSXovRLFRwd6iXw2iueG9ywZdYusfBv8Nv159JRQqLm4GFN3HbcHYXhB2dpPU8RxBixeB6YWDUgXenuY" target="_blank" rel="noopener">sell</a></td>
+</tr>
+<tr>
+<td>BLACKHOLE</td>
+<td>llm-grok</td><td class="pos">+63.1%</td><td>take_profit</td>
+<td>2m</td>
+<td><a href="https://solscan.io/tx/3a8nJQmLNAeLAugRyjngyfffeRHwhyzHXDQoGGARh2AfsuCVV4aHYfHQeDsXscANLUg4cGk9Z9bUekzgbMX4Qs7Q" target="_blank" rel="noopener">buy</a> · <a href="https://solscan.io/tx/3kG79Py54KQU1kuiH3EAfPqTobbeM9fjR6hAoLxZ82frRZXwjFuETDe8CFskKgthWmaZfnRCwo4Ug6y1gEumhn31" target="_blank" rel="noopener">sell</a></td>
+</tr>
+<tr>
+<td>WhiteBull</td>
+<td>llm-auto</td><td class="pos">+60.8%</td><td>take_profit</td>
+<td>3m</td>
+<td><a href="https://solscan.io/tx/5KnwEGAXq6GaHvwqLyDRJ9NbjnKnbvwDTvdBqMBYdcT7AmZgxnGFQmqaguRxRnVaYtgZXATxq5yzwukrL5sbgHpg" target="_blank" rel="noopener">buy</a> · <a href="https://solscan.io/tx/gHn32VNqqBidP55xLXXAqUCS46bjQpb4sEBa2axJi6yeoXasiibtJx4aS73fGziQFDc5bcScbuYa7Dr4C8n9gpy" target="_blank" rel="noopener">sell</a></td>
+</tr>
+<tr>
+<td>掌握</td>
+<td>llm-auto</td><td class="pos">+58.8%</td><td>take_profit</td>
+<td>84s</td>
+<td><a href="https://solscan.io/tx/2MjHUZ1skK84mdXQ2D5YgsSe19y4tF5uwLeJ64QexCXdJudswyAEkPKafWYEFH8XgjMbQtrveLBVdjTAZRcfxHc7" target="_blank" rel="noopener">buy</a> · <a href="https://solscan.io/tx/2v3a9cL28D9aovRgPXLv7db9jBRtRjds3PVnGj8Vtq8dMf5khzhnWF65cieLYt1EeyjKrLQjszkKkJdF2vCWCqAQ" target="_blank" rel="noopener">sell</a></td>
+</tr>
+<tr>
+<td>HANU.p</td>
+<td>boost-ride</td><td class="pos">+42.9%</td><td>take_profit</td>
+<td>5m</td>
+<td><a href="https://solscan.io/tx/2LxjcHmYw1GJgFMmFPy749ozhbWtcTqS1BZLGbS77CjamkTtkepsDXRHcsbrEerrrooFGKXeCrrx5whe3H7yGgzF" target="_blank" rel="noopener">buy</a> · <a href="https://solscan.io/tx/4wDukGp1hUYZ7YLrpzqLJpf73YA1uHW9mFcGWUdcQzhsJxfkFPMXQBVoT7XB3pEB3xiyxvdXTZuwXBnKxuk7QG3U" target="_blank" rel="noopener">sell</a></td>
+</tr>
+ </table>
+ </div>
+
+ <h2 id="exits">7. How trades ended, and what each exit reason teaches</h2>
+ <ul>
+ <li><strong><code>take_profit</code> (13 trades, +0.056 SOL).</strong> The only systematically profitable exit. Every arm that lacked a configured take-profit either got lucky on a timeout or gave its gains back. After the first trade taught us this, every fleet arm shipped with a TP; the data now confirms it with 13 clean examples.</li>
+ <li><strong><code>timeout</code> (47 trades, -0.036 SOL).</strong> The modal outcome. Most pump.fun launches simply flatline, and a timeout on a flat coin costs a little slippage each way. 11 timeouts closed green, which is luck, not policy: nothing locked those gains in. The real cost of timeouts is invisible: dead coins held for their full configured hold (4 to 30 minutes depending on the arm) tie up a concurrency slot that a live coin could have used.</li>
+ <li><strong><code>stop_loss</code> (18 trades, -0.086 SOL).</strong> Working as designed in most cases: the median stop landed within a few points of policy. The tail is the problem; see section 14.</li>
+ <li><strong><code>trailing_stop</code> (12 trades, -0.037 SOL).</strong> The most misunderstood exit in the ladder. A trailing stop armed while the position is still underwater just converts a small loss into a realized one. Trailing stops earned their keep only on positions that were already green; the fix (arm the trail only above breakeven) shipped from this dataset and is now how the exit ladder behaves (section 22).</li>
+ </ul>
+
+ <h2 id="vanity">8. Win rate is a vanity metric</h2>
+ <p>Put the two cohorts side by side and the asymmetry is the entire story:</p>
+ <div class="table-scroll">
+ <table class="league">
+ <tr><th>cohort</th><th>trades</th><th>win rate</th><th>avg winner</th><th>avg loser</th><th>net</th></tr>
+ <tr><td>LLM-judged</td><td>33</td><td>24%</td><td class="pos">+52.3%</td><td class="neg">-10.8%</td><td class="pos">+0.0147 SOL</td></tr>
+ <tr><td>rules-driven</td><td>57</td><td>30%</td><td class="pos">+16.2%</td><td class="neg">-23.7%</td><td class="neg">-0.1182 SOL</td></tr>
+ </table>
+ </div>
+ <p>The rules cohort wins <em>more often</em> than the LLM cohort (30% vs 24%) and still loses three times as much money as the LLM cohort makes. The LLM arms' average winner (+52.3%) is more than three times the rules arms' average winner (+16.2%), and their average loser is less than half as deep. Same market, same window, same execution stack, same exits available.</p>
+ <p>Why? Read the 29 stored theses below and a pattern emerges: the model is doing <em>selection</em>, not filtering. A rules arm buys everything that passes its thresholds, which in practice means everything sufficiently mediocre to not trip a filter. The model was asked to behave like a selective trader with no other filters behind it, and it skips launches a rulebook has no vocabulary to reject: tickers that are trying too hard, narratives that are a week stale, charts that stairstep on four wallets. The result is fewer entries with fatter right tails. The obvious caveat is equally important: 33 trades is a directional signal, not a proof, and we treat it accordingly (section 21).</p>
+
+ <h2 id="judges">9. What the judges said no to: 12,770 verdicts</h2>
+ <p>The trades only show you the buys. The judgment ledger shows you everything else: every verdict any LLM judge issued, buys <em>and skips</em>, is persisted with its confidence, thesis, latency, and which model actually answered. Over the study window the judges issued <strong>12,770 verdicts and said buy 485 times: a 3.8% buy rate</strong>. Asked to behave like a selective trader with no other filters behind them, the models were roughly twenty-five times choosier than a coin flip:</p>
+ <div class="table-scroll">
+ <table class="league">
+ <tr><th>requested model</th><th>judged</th><th>buy verdicts</th><th>buy rate</th><th>median latency</th><th>answered by fallback</th></tr>
+ <tr><td><code>anthropic/claude-haiku-4.5</code></td><td>5,101</td><td>171</td><td>3.4%</td><td>1.8s</td><td>77%</td></tr>
+<tr><td><code>openrouter/auto</code></td><td>4,950</td><td>189</td><td>3.8%</td><td>2.2s</td><td>67%</td></tr>
+<tr><td><code>x-ai/grok-4.3</code></td><td>2,719</td><td>125</td><td>4.6%</td><td>2.1s</td><td>82%</td></tr>
+ </table>
+ </div>
+ <p>The last column quantifies the routing problem we flagged in section 2: <strong>74% of all verdicts were answered by a fallback model</strong>, not the model the arm requested. Until that is fixed, per-model comparisons here measure the failover chain more than the named pilots, which is exactly why the fixed-routing rerun leads the roadmap.</p>
+ <p>Selectivity is only interesting if the selections were good, and the ledger lets us check that independent of trade execution, because the intel engine later labeled 3,850 of the judged coins with a ground-truth outcome:</p>
+ <figure class="chart"><svg viewBox="0 0 720 250" role="img" aria-label="Share that later pumped or graduated, judged coins only" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Share that later pumped or graduated, judged coins only</text><line x1="56" y1="194" x2="704" y2="194" stroke="rgba(255,255,255,.06)"/><text x="48" y="198" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0%</text><line x1="56" y1="146.66666666666669" x2="704" y2="146.66666666666669" stroke="rgba(255,255,255,.06)"/><text x="48" y="150.66666666666669" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">20%</text><line x1="56" y1="99.33333333333334" x2="704" y2="99.33333333333334" stroke="rgba(255,255,255,.06)"/><text x="48" y="103.33333333333334" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">40%</text><rect x="127.28" y="67.77777777777777" width="181.44000000000003" height="126.22222222222223" rx="5" fill="#6ee7a0" opacity=".85"/><text x="218" y="59.77777777777777" fill="#6ee7a0" font-size="15" font-weight="700" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">53.3%</text><text x="218" y="212" fill="#c8c8e0" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">coins the judges said BUY (n=90)</text><rect x="451.28" y="166.3049645390071" width="181.44000000000003" height="27.69503546099291" rx="5" fill="#ff7a8a" opacity=".85"/><text x="542" y="158.3049645390071" fill="#ff7a8a" font-size="15" font-weight="700" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">11.7%</text><text x="542" y="212" fill="#c8c8e0" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">coins the judges SKIPPED (n=3,760)</text></svg></figure>
+ <p><strong>Coins the judges wanted went on to pump or graduate 53.3% of the time; coins they skipped, 11.7%.</strong> The skip rate matches the market's base rate almost exactly, which is what you want to see: the judges are not skipping winners at an elevated rate, they are pulling winners out of the stream at four and a half times the base rate. This is the cleanest evidence in the whole study that the LLM cohort's trading edge is real selection and not execution luck, because it holds on coins the fleet never traded at all.</p>
+ <figure class="chart"><svg viewBox="0 0 720 260" role="img" aria-label="Judge confidence vs what the coin actually did" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Judge confidence vs what the coin actually did</text><line x1="56" y1="204" x2="704" y2="204" stroke="rgba(255,255,255,.06)"/><text x="48" y="208" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0%</text><line x1="56" y1="156.5" x2="704" y2="156.5" stroke="rgba(255,255,255,.06)"/><text x="48" y="160.5" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">25%</text><line x1="56" y1="109" x2="704" y2="109" stroke="rgba(255,255,255,.06)"/><text x="48" y="113" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">50%</text><line x1="56" y1="61.5" x2="704" y2="61.5" stroke="rgba(255,255,255,.06)"/><text x="48" y="65.5" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">75%</text><rect x="81.92" y="204" width="77.75999999999999" height="2" rx="4" fill="#ff7a8a" opacity=".85"/><text x="120.8" y="196" fill="#ff7a8a" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0%</text><text x="120.8" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0.5</text><text x="120.8" y="238" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=3</text><rect x="211.51999999999998" y="109" width="77.75999999999999" height="95" rx="4" fill="#6ee7a0" opacity=".85"/><text x="250.39999999999998" y="101" fill="#6ee7a0" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">50%</text><text x="250.39999999999998" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0.6</text><text x="250.39999999999998" y="238" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=8</text><rect x="341.12" y="66.25" width="77.75999999999999" height="137.75" rx="4" fill="#6ee7a0" opacity=".85"/><text x="380" y="58.25" fill="#6ee7a0" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">73%</text><text x="380" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0.7</text><text x="380" y="238" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=40</text><rect x="470.71999999999997" y="114.9375" width="77.75999999999999" height="89.0625" rx="4" fill="#9ad4ff" opacity=".85"/><text x="509.59999999999997" y="106.9375" fill="#9ad4ff" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">47%</text><text x="509.59999999999997" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0.8</text><text x="509.59999999999997" y="238" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=32</text><rect x="600.3199999999999" y="204" width="77.75999999999999" height="2" rx="4" fill="#ff7a8a" opacity=".85"/><text x="639.1999999999999" y="196" fill="#ff7a8a" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0%</text><text x="639.1999999999999" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0.9</text><text x="639.1999999999999" y="238" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=4</text><text x="704" y="252" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">model-stated confidence of the buy verdict</text></svg></figure>
+ <p>Confidence calibration adds a warning label. Verdicts issued at 0.7 confidence went good 73% of the time, the strongest band by far. But the <em>most</em> confident verdicts underperformed: the 0.8 band went good 47% and the 0.9 band went 0 for 4. The samples are small, but the shape is the classic overconfidence signature, and it is actionable: the arms' confidence floor already exists (<code>llm_min_confidence</code>), and this data argues for a confidence <em>ceiling</em> too, treating a 0.9-plus verdict on a seconds-old memecoin as a red flag rather than a green light.</p>
+
+ <h2 id="oracle">10. The Oracle's report card</h2>
+ <figure class="chart"><svg viewBox="0 0 720 260" role="img" aria-label="Realized win rate by Oracle conviction at entry" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Realized win rate by Oracle conviction at entry</text><line x1="56" y1="204" x2="704" y2="204" stroke="rgba(255,255,255,.06)"/><text x="48" y="208" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0%</text><line x1="56" y1="143.2" x2="704" y2="143.2" stroke="rgba(255,255,255,.06)"/><text x="48" y="147.2" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">20%</text><line x1="56" y1="82.39999999999999" x2="704" y2="82.39999999999999" stroke="rgba(255,255,255,.06)"/><text x="48" y="86.39999999999999" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">40%</text><rect x="88.4" y="144.88888888888889" width="97.2" height="59.11111111111112" rx="4" fill="#9ad4ff" opacity=".8"/><text x="137" y="136.88888888888889" fill="#9ad4ff" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">19%</text><text x="137" y="222" fill="#c8c8e0" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0-30</text><text x="137" y="238" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=36</text><rect x="250.4" y="148.72727272727272" width="97.2" height="55.27272727272727" rx="4" fill="#9ad4ff" opacity=".8"/><text x="299" y="140.72727272727272" fill="#9ad4ff" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">18%</text><text x="299" y="222" fill="#c8c8e0" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">30-50</text><text x="299" y="238" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=11</text><text x="461" y="194" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">no trades</text><text x="461" y="222" fill="#c8c8e0" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">50-100</text><text x="461" y="238" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=0</text><rect x="574.4" y="90.88372093023256" width="97.2" height="113.11627906976744" rx="4" fill="#9ad4ff" opacity=".8"/><text x="623" y="82.88372093023256" fill="#9ad4ff" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">37%</text><text x="623" y="222" fill="#c8c8e0" font-size="12" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">unscored</text><text x="623" y="238" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=43</text></svg></figure>
+ <p>The Oracle is our conviction scorer: a trained model that rates each launch 0 to 100 on evidence like buyer diversity, creator track record, and early-chart shape. 47 of the 90 trades had a conviction score at entry (the unscored balance is mostly <code>graduation_ride</code> entries, which the Oracle does not cover).</p>
+ <p>The gradient goes the right way: sub-30-conviction entries won 19% of the time and lost -0.054 SOL in aggregate, while the 30-to-50 band did meaningfully better on both counts. The damning detail is the empty top band: <strong>not one trade in this window entered with conviction above 50.</strong> The fleet spent two days paying for exactly the coins its own scorer was lukewarm about, because most arms were not required to listen to it. The conviction gate exists precisely to prevent this; the data says the arms that ignored it funded the lesson. And the top band is not empty because high-conviction coins do not exist: section 11 finds 110 of them in the same window, none bought, for a reason that is almost comically mechanical.</p>
+ <p>The ledger's own confidence numbers tell the same story from the other side. Snipe decisions recorded with confidence around 0.6 went on to be right 32% of the time (23 of 73); decisions recorded around 0.4 were right 9% of the time (3 of 34). The absolute numbers are humbling, but the <em>ordering</em> is real: the system's self-rated confidence carries signal, which means it can be calibrated rather than discarded.</p>
+
+ <h2 id="didnt-buy">11. The 82,994 coins we did not buy</h2>
+ <p>Everything above analyzes the trades the fleet took. That is half the record. A sniper's real output is its <em>selectivity</em>, and while the fleet was live the intel engine observed <strong>82,994 launches in three days</strong>, scored 45,784 of them with the Oracle, watched 42,995 long enough to label their final outcome, and bought 72. That is a buy rate of less than one in a thousand.</p>
+ <figure class="chart"><svg viewBox="0 0 720 232" role="img" aria-label="Three days of pump.fun, funneled" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Three days of pump.fun, funneled</text><text x="180" y="69" fill="#c8c8e0" font-size="13" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">launches observed</text><rect x="190" y="50" width="410" height="26" rx="5" fill="#9ad4ff" opacity="0.9"/><text x="610" y="69" fill="#e7e7f5" font-size="13" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">82,994</text><text x="180" y="113" fill="#c8c8e0" font-size="13" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Oracle-scored</text><rect x="190" y="94" width="388.46808099311795" height="26" rx="5" fill="#9ad4ff" opacity="0.78"/><text x="588.468080993118" y="113" fill="#e7e7f5" font-size="13" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">45,784</text><text x="180" y="157" fill="#c8c8e0" font-size="13" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">outcome-labeled</text><rect x="190" y="138" width="386.1929918685634" height="26" rx="5" fill="#9ad4ff" opacity="0.66"/><text x="586.1929918685635" y="157" fill="#e7e7f5" font-size="13" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">42,995</text><text x="180" y="201" fill="#c8c8e0" font-size="13" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">bought by the fleet</text><rect x="190" y="182" width="154.80770371318604" height="26" rx="5" fill="#6ee7a0" opacity="0.54"/><text x="354.807703713186" y="201" fill="#e7e7f5" font-size="13" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">72</text><text x="704" y="224" fill="#7a85a8" font-size="10.5" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">bar length is log-scale</text></svg></figure>
+ <p>Because those 42,995 labeled coins each carry the conviction score the Oracle gave them, we can finally answer the question the traded sample was too small for: <strong>is the Oracle's score actually predictive, at scale?</strong></p>
+ <figure class="chart"><svg viewBox="0 0 720 280" role="img" aria-label="Share of coins that pumped or graduated, by Oracle conviction" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Share of coins that pumped or graduated, by Oracle conviction</text><line x1="56" y1="220" x2="704" y2="220" stroke="rgba(255,255,255,.06)"/><text x="48" y="224" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0%</text><line x1="56" y1="167.5" x2="704" y2="167.5" stroke="rgba(255,255,255,.06)"/><text x="48" y="171.5" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">25%</text><line x1="56" y1="115" x2="704" y2="115" stroke="rgba(255,255,255,.06)"/><text x="48" y="119" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">50%</text><line x1="56" y1="62.5" x2="704" y2="62.5" stroke="rgba(255,255,255,.06)"/><text x="48" y="66.5" fill="#7a85a8" font-size="11" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">75%</text><rect x="88.4" y="198.04700162074553" width="97.2" height="21.95299837925446" rx="4" fill="#9ad4ff" opacity=".85"/><text x="137" y="190.04700162074553" fill="#9ad4ff" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">10.5%</text><text x="137" y="238" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">unscored</text><text x="137" y="254" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=18,510</text><rect x="250.4" y="195.2369703233427" width="97.2" height="24.763029676657318" rx="4" fill="#9ad4ff" opacity=".85"/><text x="299" y="187.2369703233427" fill="#9ad4ff" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">11.8%</text><text x="299" y="238" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0-30</text><text x="299" y="254" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=20,319</text><rect x="412.4" y="183.51893095768375" width="97.2" height="36.48106904231626" rx="4" fill="#9ad4ff" opacity=".85"/><text x="461" y="175.51893095768375" fill="#9ad4ff" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">17.4%</text><text x="461" y="238" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">30-50</text><text x="461" y="254" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=4,041</text><rect x="574.4" y="57.32394366197181" width="97.2" height="162.6760563380282" rx="4" fill="#6ee7a0" opacity=".85"/><text x="623" y="49.32394366197181" fill="#6ee7a0" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">77.5%</text><text x="623" y="238" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">50+</text><text x="623" y="254" fill="#7a85a8" font-size="11" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">n=71</text></svg></figure>
+ <p>Yes, and dramatically so. Coins the Oracle scored below 30 pumped or graduated 11.8% of the time, roughly the same as unscored coins (10.5%). The 30-to-50 band improves to 17.4%. And the coins scored 50 or above went on to pump or graduate <strong>77.5% of the time</strong> (9 graduations and 46 pumps out of 71 labeled). A seven-times-the-base-rate signal, sitting in production, feeding a live feed.</p>
+ <p>Now the painful part: <strong>the fleet bought 0 of those 110 high-conviction coins.</strong> Zero. And the reason is embarrassingly mechanical. Two arms gate on conviction: <code>oracle-open</code> requires 35 or more, and <code>oracle-strict</code> requires 65 or more. The highest score any coin reached in the window was <strong>61</strong>. So the strict arm's bar was mathematically unreachable and it sat idle all week, while the open arm's bar of 35 admitted the 30-to-50 band (17.4% good) and it duly went 7%-win negative. The two gates <em>bracketed</em> the profitable band (50 to 61) and covered none of it. Nobody chose this; it fell out of two thresholds set on different days by different reasoning, and no analysis existed to catch it until now.</p>
+ <p>Honesty requires checking one alternative explanation: conviction scores are recomputed as a coin trades, so maybe the 50+ scores only appeared <em>after</em> the pumps they seem to predict. The score history table refutes it: of the 110 high-conviction coins, 104 have an archived first score, and <strong>all 104 were already at 50 or above the first time the Oracle ever scored them</strong>, none were rescored up after the fact. The signal was on the board before the outcome. (What history cannot fully rule out is entry slippage: by the time a coin proves enough demand to score 50, its price has moved. A crossing-triggered arm, described in section 22, is how we find out what is actually capturable.)</p>
+
+ <h2 id="got-away">12. The ones that got away</h2>
+ <p>The counterfactual everyone actually wants: which monsters did we skip? Here are the biggest winners the intel engine <em>observed and passed on</em> during the window, deduplicated by ticker, with the scores the system had at the time:</p>
+ <div class="table-scroll">
+ <table class="league">
+ <tr><th>token</th><th>outcome</th><th>ATH cap</th><th>from-launch multiple</th><th>quality</th><th>conviction</th><th>buyers seen</th></tr>
+ <tr><td>USOH</td><td>graduated</td><td>$161M</td><td>73,975x</td><td>43</td><td>unscored</td><td>3</td></tr>
+<tr><td>DOW</td><td>graduated</td><td>$134M</td><td>61,692x</td><td>36</td><td>20</td><td>3</td></tr>
+<tr><td>NTFS</td><td>graduated</td><td>$76M</td><td>35,170x</td><td>43</td><td>21</td><td>3</td></tr>
+<tr><td>USWR</td><td>graduated</td><td>$67M</td><td>31,158x</td><td>43</td><td>21</td><td>3</td></tr>
+<tr><td>VORF</td><td>graduated</td><td>$25M</td><td>11,674x</td><td>43</td><td>21</td><td>3</td></tr>
+ </table>
+ </div>
+ <p>Look at the last three columns before feeling bad. Every one of these coins, at the moment our systems watched it, had <strong>a handful of visible buyers, mediocre quality, and low or no conviction</strong>. The $161M ATH winner showed 3 buyers and quality 43 during its observation window. These were not signals anyone ignored; at minute zero, these coins were indistinguishable from the 36,366 rugs in the same dataset. Their runs started minutes to hours <em>after</em> our observation window closed.</p>
+ <p>That is the actual lesson, and it is structural: <strong>a minute-zero sniper is blind to every winner whose story starts at minute thirty.</strong> No threshold tuning fixes it, because the information does not exist yet at decision time. What fixes it is a second look: re-scoring coins at 30 and 60 minutes and entering on demonstrated, sustained demand rather than launch-second vibes. The Oracle's 50+ band (section 11) is exactly that signal, which is why wiring an arm to it is the top item on the roadmap.</p>
+ <p>Where the fleet <em>did</em> have the information and skipped anyway, the record is defensible: of the 110 coins that crossed conviction 50, the 16 that later rugged would have cost us, but the 55 that ran would have paid for them roughly 3-to-1. We are careful not to claim a specific PnL for a strategy nobody ran (entry slippage, exit behavior, and fill quality are all unknowable in hindsight), but the direction is not subtle.</p>
+ <p>So we measured how catchable the band actually is, coin by coin, against full candle histories. For each of the 102 measurable crossings, take the close of the first candle at or after the coin's first 50-plus score as a hypothetical entry, and ask what the price did afterward. Three answers matter. First, <strong>the crossing lands at a median of 2 minutes after launch</strong>: this is a sniper-speed signal, not a lagging one. Second, the upside is real: the median crossing offered 1.23x from the entry candle, <strong>35% of crossings reached at least 1.5x and 19% reached 2x</strong>, with the best run at 9.6x, and not a single coin had already topped before crossing. Third, the warning label: the median crossing coin eventually decays to 0.32x its entry, so the profit exists only for a strategy that takes it; buy-and-hope converts this band back into losses. (Method honesty: candle-close entries, no slippage or fill modeling; the live arm's fills will be worse than the candles by some spread we can only learn by trading it.)</p>
+
+ <h2 id="paperhands">13. The paperhands audit: did we sell too early?</h2>
+ <p>Every trader's private fear: the coin you sold kept running. We checked it for all 90 exits, two independent ways.</p>
+ <p><strong>Way one: where does every coin we sold trade right now?</strong> We recomputed each coin's implied market cap at our exact exit fill (our sell price per token times pump.fun's fixed 1B supply, SOL at ~$190) and compared it to its live market cap today:</p>
+ <figure class="chart"><svg viewBox="0 0 720 260" role="img" aria-label="Where the 90 coins we sold trade today" preserveAspectRatio="xMidYMid meet"><text x="16" y="24" fill="#e7e7f5" font-size="15" font-weight="600" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">Where the 90 coins we sold trade today</text><rect x="79.328" y="76.18181818181817" width="82.944" height="127.81818181818183" rx="4" fill="#ff7a8a" opacity="0.75"/><text x="120.80000000000001" y="68.18181818181817" fill="#e7e7f5" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">37</text><text x="120.80000000000001" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace"><0.1x</text><rect x="208.928" y="179.8181818181818" width="82.944" height="24.18181818181818" rx="4" fill="#ff7a8a" opacity="0.75"/><text x="250.4" y="171.8181818181818" fill="#e7e7f5" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">7</text><text x="250.4" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0.1-0.25x</text><rect x="338.52799999999996" y="52" width="82.944" height="152" rx="4" fill="#ff7a8a" opacity="0.75"/><text x="379.99999999999994" y="44" fill="#e7e7f5" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">44</text><text x="379.99999999999994" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0.25-0.5x</text><rect x="468.12799999999993" y="197.0909090909091" width="82.944" height="6.909090909090909" rx="4" fill="#ff7a8a" opacity="0.75"/><text x="509.5999999999999" y="189.0909090909091" fill="#e7e7f5" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">2</text><text x="509.5999999999999" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0.5-1x</text><rect x="597.728" y="204" width="82.944" height="1.5" rx="4" fill="#6ee7a0" opacity="0.9"/><text x="639.1999999999999" y="196" fill="#e7e7f5" font-size="13" font-weight="600" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">0</text><text x="639.1999999999999" y="222" fill="#c8c8e0" font-size="12.5" text-anchor="middle" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">>1x</text><text x="56" y="246" fill="#7a85a8" font-size="11" font-family="ui-monospace,SFMono-Regular,Menlo,monospace">current market cap vs the cap where we sold (SOL at $190)</text></svg></figure>
+ <p>The answer is a flat no. <strong>Not one of the 90 coins we sold trades above our exit today.</strong> The best sits at 0.90x our exit price, the median at 0.36x, and 37 of 90 have lost more than 90% of their value since we left. The 0.25-to-0.5x cluster (44 coins) is the pump.fun floor state: dead curves settling at the couple-thousand-dollar residual cap.</p>
+ <p><strong>Way two: every token's full price history.</strong> Current price could hide a coin that ran 10x after our exit and then died. So we pulled the complete candle history for all 85 traded tokens from pump.fun's swap API (price per token; times the fixed 1B supply gives market cap) and, for each of the 90 trades, measured the highest price the token <em>ever printed after our exit candle</em>, at one-minute granularity where the coin's full life fits in minute candles and hourly otherwise. This is the strict test: it catches the spike-after-we-sold case that both the current-price check and outcome labels can miss.</p>
+ <p>The verdict, coin by coin: <strong>37 of the 90 tokens never printed a single trade after our exit.</strong> We were, literally, the last one out the door before the lights went off. Of the 53 that did keep trading, the median post-exit high is 0.43x our exit price, <strong>zero reached 1.5x</strong>, and only three edged above our exit at all. The closest call in the whole dataset is trade #79: a trailing stop shook <code>llm-claude</code> out of a position at +10.6% and the token printed 1.38x our exit price afterward, worth about 0.0042 SOL of missed upside. The other two are a 1.24x dead-cat bounce off a -98.7% rug floor and a 1.07x wiggle on an hourly candle, both noise. Total SOL left on the table by selling too early, across the entire experiment, at any threshold that clears measurement noise: <strong>zero</strong>.</p>
+ <p>Which produces this experiment's strangest compliment: <strong>the fleet has no paperhands problem at all.</strong> Every one of the 90 sells, including every take-profit, was vindicated by the token's own price history. The exits are not what needs work. The money was lost at the entry, one mediocre coin at a time, and the "money left on the table" cases below are about capturing spikes <em>during</em> the hold, not about holding longer.</p>
+ <p>The within-trade version is where real improvement lives: 8 positions peaked more than 15% up and still captured less than three-quarters of that peak. The worst: RACOIN peaked +55.0% and realized -78.3%; Poze peaked +19.3% and realized -38.9%; AGIGUY peaked +15.9% and realized -34.4%. A laddered exit (sell a tranche at the target, trail the remainder) is the standard fix and is now on the roadmap; holding longer is not, because the data just told us longer holds end at 0.36x.</p>
+
+ <h2 id="disasters">14. The disasters: when a stop-loss is a request, not a guarantee</h2>
+ <p>Five trades lost more than 75% of their stake. All five had stop-losses configured at -15% or -30%. This is the table nobody publishes:</p>
+ <div class="table-scroll">
+ <table class="league">
+ <tr><th>token</th><th>arm</th><th>configured stop</th><th>realized</th><th>overshoot</th><th>hold</th></tr>
+ <tr>
+<td><code>yMDueA…</code></td>
+<td>boost-ride</td><td>-15%</td><td class="neg">-99.9%</td>
+<td>85 pts</td><td>3m</td>
+</tr>
+<tr>
+<td><code>5V3eh6…</code></td>
+<td>boost-ride</td><td>-15%</td><td class="neg">-98.7%</td>
+<td>84 pts</td><td>8s</td>
+</tr>
+<tr>
+<td><code>ChRFYk…</code></td>
+<td>boost-ride</td><td>-15%</td><td class="neg">-93.2%</td>
+<td>78 pts</td><td>9s</td>
+</tr>
+<tr>
+<td><code>2UDry5…</code></td>
+<td>boost-ride</td><td>-15%</td><td class="neg">-84.3%</td>
+<td>69 pts</td><td>6s</td>
+</tr>
+<tr>
+<td>RACOIN</td>
+<td>llm-claude</td><td>-30%</td><td class="neg">-78.3%</td>
+<td>48 pts</td><td>2m</td>
+</tr>
+ </table>
+ </div>
+ <p>What actually happens in these rows: the position poller re-quotes the coin every few seconds, sees the value crash through the stop threshold, and fires a market sell into a bonding curve whose liquidity has already evaporated because everyone else is selling into the same hole. The stop triggered on time. The <em>execution</em> of the stop got the price that was left. On a thin curve, that can be pennies.</p>
+ <p>Every one of these five was a <code>graduation_ride</code> or low-conviction entry on a coin whose holder base was concentrated in a handful of wallets. That is measurable <em>before</em> entry, and it is exactly what the Oracle's whale-concentration and crowd-size features flag. The defenses against this failure mode, in order of effectiveness: do not enter concentrated coins (conviction gate), size down where liquidity is thin (the optimizer now throttles sizes on underperforming arms), and quote faster so the stop fires earlier in the collapse. "Set a stop-loss" is not on the list, because a stop-loss was set every single time.</p>
+
+ <h2 id="cost">15. The cost of doing business</h2>
+ <p>Where does money leak in a system like this, besides bad picks? We can account for the frictions precisely because every fill is recorded.</p>
+ <ul>
+ <li><strong>Entry price impact: negligible.</strong> Median impact across all 90 entries was <strong>0.036%</strong>, the worst single entry was 1.25%, and zero entries exceeded 2%. At 0.002 to 0.15 SOL position sizes, pump.fun bonding curves barely notice us. This matters for interpreting everything else: the fleet's losses are a <em>selection</em> cost, not an execution cost, and the counterfactual analyses (sections 11 and 12) are not being flattered by ignoring slippage that would have eaten the edge at our sizes. It also flags the real scaling question: these results say nothing yet about what impact looks like at 10x the size.</li>
+ <li><strong>Exit slippage: the tail risk.</strong> Normal exits paid a fraction of a percent; the five liquidity-collapse exits (section 14) paid 48 to 85 points past their stops. Exit friction is not a distribution with a mean; it is fine until it is catastrophic.</li>
+ <li><strong>Network fees: rounding error.</strong> Solana transaction fees across all 180 legs summed to well under 0.001 SOL. On this chain, at this size, fees are not a line item worth optimizing.</li>
+ <li><strong>Inference: the real operating cost.</strong> The judges answered 12,770 verdict calls at 2.1s median latency, deduplicated per (coin, model) so same-model arms share one call. Most calls were answered by the free-first failover chain rather than paid primaries, which kept the bill near zero at the cost of the attribution problem in section 9. A properly-routed rerun makes inference the dominant marginal cost of the LLM arms, and per-verdict cost accounting will ship with it.</li>
+ </ul>
+
+ <h2 id="signals">16. Which entry signals actually separated winners from losers</h2>
+ <p>Every trade card below carries the intel engine's read of the coin at entry. Pooling the 76 closed trades with full intel coverage (20 winners) and comparing median entry-time signals:</p>
+ <div class="table-scroll">
+ <table class="league">
+ <tr><th>signal at entry</th><th>median, winning trades</th><th>median, losing trades</th><th>separates?</th></tr>
+ <tr><td>intel quality score (0-100)</td><td>43</td><td>31</td><td class="pos">yes, +12 points</td></tr>
+ <tr><td>organic-demand score (0-1)</td><td>0.60</td><td>0.47</td><td class="pos">yes, +0.13</td></tr>
+ <tr><td>unique buyers observed</td><td>3</td><td>3</td><td class="neg">no</td></tr>
+ <tr><td>unique sellers observed</td><td>0</td><td>1</td><td class="neg">no</td></tr>
+ <tr><td>top-10 wallet concentration</td><td>1</td><td>1</td><td class="neg">no (saturated at our entry timing)</td></tr>
+ </table>
+ </div>
+ <p>Two composite signals separate; three raw counts do not. The raw counts fail for an instructive reason: at the speed we enter (section 3), most coins have shown a handful of buyers regardless of their future, so the count is uninformative <em>at that instant</em>; concentration is near 1.0 for everything seconds after launch. The composites (quality, organic) already fold in timing-adjusted structure, which is exactly the kind of feature engineering the Oracle's conviction score does at a larger scale, and section 11 shows what that buys. The caveat is the usual one: 76 trades with 20 winners is a small sample; treat this table as hypothesis-generating, and note that the same comparison on the full labeled population is exactly what the intel engine's weekly weight training already does with n in the tens of thousands.</p>
+
+ <h2 id="silent">17. The two silent failures that faked autonomy for two days</h2>
+ <p>This experiment is supposed to be self-improving: an optimizer cron reads each arm's real record every six hours and tunes that arm's own knobs inside hard bounds, and two more crons feed realized trade outcomes back into the Oracle's training data. When we audited the loop after two days of "running", we found both halves silently dead. If you build autonomous systems, these two bugs are worth your time.</p>
+ <p><strong>Failure one: a driver quirk that turned every write into a no-op.</strong> The optimizer applied its tunings with a dynamically-selected column name. Our Postgres driver happily accepts a dynamic identifier in <code>WHERE</code> position but not in <code>SET</code> position, where it quietly parameterizes the column name and produces invalid SQL:</p>
+ <pre><code>// The bug: the neon serverless driver accepts a dynamic identifier in
+// WHERE and FROM position, but NOT in SET position. This line type-checks,
+// reads clean in review, and throws &quot;syntax error at or near $1&quot; at runtime:
+await sql`update agent_sniper_strategies set ${sql(p.field)} = ${p.to} ...`;
+
+// The per-arm try/catch swallowed the throw, skipped the audit insert, and
+// the cron returned 200. Zero rows ever landed in the audit table. The fix
+// enumerates every whitelisted column explicitly:
+async function applyProposal(strategyId, field, value) {
+ switch (field) {
+ case 'take_profit_pct':
+ return sql`update agent_sniper_strategies
+ set take_profit_pct = ${value}, updated_at = now()
+ where id = ${strategyId}`;
+ case 'trailing_stop_pct': /* ... one explicit case per allowed field */
+ default:
+ throw new Error(`optimizer refused to write unknown field '${field}'`);
+ }
+}</code></pre>
+ <p>The throw was swallowed by the per-arm error handler, the audit-row insert was skipped along with it, and the cron returned HTTP 200 every six hours. From every dashboard, the self-improvement loop was healthy. In reality it had never applied a single change.</p>
+ <p><strong>Failure two: a cron that existed in config but not in the scheduler.</strong> The Oracle feedback jobs were registered in the app's cron table and deployed, but the cloud scheduler jobs that actually fire them were never created; adding a cron to the config file does not conjure the scheduler entry. Result: the "Oracle learns from realized PnL" bridge ran zero times while looking fully shipped in the codebase.</p>
+ <p>Both are fixed, and both produced the same postmortem rule: <strong>an autonomous system's health is measured by rows in its audit tables, not by its HTTP status codes.</strong> "The cron returns 200" and "the loop is learning" are unrelated statements. We now verify every closed loop by counting its side effects, and the optimizer's first real applied run is in the dataset below (it throttled <code>oracle-open</code>'s position size after 14 trades at a 7% win rate, and tightened <code>llm-grok</code>'s take-profit from 60 to 45 because winners kept dying on the clock before reaching 60).</p>
+
+ <h2 id="decisions">18. The fleet's own decisions so far</h2>
+ <p>Since the two silent failures were fixed and deployed, the self-improvement layers have started producing an audited paper trail of their own. Everything below was decided by the system, not by us, and each row links back to bounded rules described in <a href="/docs/agent-sniper">the engineering doc</a>.</p>
+ <p><strong>The intra-arm optimizer has applied 4 tunings:</strong></p>
+ <ul>
+ <li><code>oracle-open</code>, 2026-07-23 03:25 UTC: <code>per_trade_lamports</code> 10000000 → 8000000. <em>Sustained underperformance (7% win rate, net -0.017 SOL over 14 trades): throttle size. Consider disabling this arm.</em></li>
+<li><code>llm-grok</code>, 2026-07-23 03:25 UTC: <code>take_profit_pct</code> 60 → 45. <em>Winners still timing out with take-profit at 60%: lower it toward the realized average (+21.1%) so it actually triggers.</em></li>
+<li><code>oracle-open</code>, 2026-07-23 06:00 UTC: <code>per_trade_lamports</code> 8000000 → 6400000. <em>Sustained underperformance (7% win rate, net -0.017 SOL over 14 trades): throttle size. Consider disabling this arm.</em></li>
+<li><code>llm-grok</code>, 2026-07-23 06:00 UTC: <code>min_oracle_score</code> (unset) → 30, <code>take_profit_pct</code> 45 → 30. <em>Realized wins concentrate at Oracle conviction &gt;= 30 over 12 trades: raise the conviction floor to buy where this arm actually wins.</em></li>
+ </ul>
+ <p><strong>The portfolio-evolution layer has applied 28 budget reallocations across 10 arms</strong>, shifting daily budget toward arms with higher Wilson-bounded fitness on realized returns. Every move is journaled with before/after values and the fitness evidence that drove it; the most recent shifted <code>rules-wide-band</code>'s daily budget from 0.053 to 0.048 SOL on a fitness of 0.122.</p>
+ <p>The point of publishing these is symmetry: if we are going to claim the fleet tunes itself, the tunings must be as auditable as the trades. Future editions of this article will grade these decisions against what happened after them, the same way section 20 grades the trades.</p>
+
+ <h2 id="backtest">19. Interactive: replay every exit with your own rules</h2>
+ <p>Disagree with the exit policy? Test yours. This replays the <em>actual per-minute price history</em> of 77 of the 90 trades (the ones whose full life is covered by minute candles; 11 long-lived coins only have hourly data and are excluded) through the same exit-priority ladder the live worker runs: stop-loss first, then trailing stop, then take-profit, then the clock. Each coin's price is normalized so the first candle after our entry equals 1.0, so a take-profit of +60% means the coin traded 60% above where we got in. The baseline you are measured against is not a fixed number: it is <strong>each trade's real fleet config replayed on the identical price path</strong>, so your policy and the fleet's are compared apples to apples, same coins, same candles, only the exit rules differ.</p>
+ <div class="bt-panel" id="bt-panel">
+ <div class="bt-controls">
+ <label>Stop-loss <span id="bt-sl-v"></span><input type="range" id="bt-sl" min="5" max="95" step="5" value="30"></label>
+ <label>Trailing stop <span id="bt-ts-v"></span><input type="range" id="bt-ts" min="0" max="60" step="5" value="20"></label>
+ <label>Take-profit <span id="bt-tp-v"></span><input type="range" id="bt-tp" min="0" max="300" step="10" value="60"></label>
+ <label>Max hold <span id="bt-mh-v"></span><input type="range" id="bt-mh" min="5" max="240" step="5" value="30"></label>
+ <label class="bt-check"><input type="checkbox" id="bt-be" checked> arm trailing stop only above breakeven</label>
+ </div>
+ <div class="bt-presets">
+ <button data-preset="fleet">fleet defaults</button>
+ <button data-preset="tight">tight scalper</button>
+ <button data-preset="runner">let winners run</button>
+ <button data-preset="diamond">diamond hands</button>
+ </div>
+ <div class="bt-results" id="bt-results" aria-live="polite">loading price histories…</div>
+ <figure class="chart" id="bt-chart"></figure>
+ <p class="bt-note">Honesty notes: candle-close prices, minute resolution, no slippage or fee modeling, and coins whose market died mid-hold exit at their last printed price exactly as the real fleet's quotes would collapse. Each trade's real fleet config replayed on the same price paths is the baseline. This is a policy explorer, not investment advice.</p>
+ </div>
+ <p>Spend a minute here before reading on; it teaches the whole thesis of section 7 by hand. Load the "let winners run" preset and watch the result get <em>worse</em>: on a population where most coins are dead within the hour, a patient +150% target just converts small would-be gains into timeouts and stop-losses. Then load "tight scalper" (a fast -15% stop, a +25% target, a ten-minute clock) and watch the fleet's whole loss flip to a small profit. The single most important exit-policy lever in this market is not how you cap losses; it is refusing to wait for a moonshot that, for the median coin, never comes. That is a finding you can derive yourself, from the coins' real price histories, in about thirty seconds.</p>
+
+ <h2 id="all-trades">20. All 90 trades, graded</h2>
+ <p>Every closed real-money trade the fleet has ever made. First a sortable master index (click any column header), then the full record of every trade grouped by arm: trigger, firewall verdict, Oracle conviction, entry intel, model thesis verbatim from the ledger, what the coin did after we left, on-chain receipts, and an honest grade generated from the recorded numbers by fixed criteria, the same for every arm. All cards are expanded by default; use the toggle to collapse them.</p>
+ <div class="dl-box">
+ <a href="/blog/autonomous-trading-experiment.json" download>Download the full dataset (JSON)</a>
+ <a href="/blog/autonomous-trading-experiment-series.json" download>Download the backtest price series (JSON)</a>
+ <button id="toggle-cards" type="button">Collapse all trade cards</button>
+ </div>
+ <div class="table-scroll">
+ <table class="league sortable" id="master-table">
+ <thead><tr>
+ <th data-k="n" data-t="num">#</th><th data-k="sym">token</th><th data-k="arm">arm</th>
+ <th data-k="trig">trigger</th><th data-k="entry" data-t="num">entry SOL</th>
+ <th data-k="pnl" data-t="num">PnL %</th><th data-k="sol" data-t="num">PnL SOL</th>
+ <th data-k="exit">exit</th><th data-k="hold" data-t="num">hold s</th>
+ <th data-k="oracle" data-t="num">conviction</th><th data-k="peak" data-t="num">peak %</th>
+ </tr></thead>
+ <tbody>
+ <tr>
+<td>1</td><td><a href="#arm-rules-classic">Dronenald</a></td><td>rules-classic</td>
+<td>new_mint</td><td>0.002</td>
+<td class="neg">-28.1</td>
+<td class="neg">-0.0006</td>
+<td>trailing_stop</td><td>377674</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>2</td><td><a href="#arm-rules-proven">BITS</a></td><td>rules-proven</td>
+<td>new_mint</td><td>0.05</td>
+<td class="pos">42.4</td>
+<td class="pos">0.0212</td>
+<td>timeout</td><td>1804</td>
+<td>15</td>
+<td>46.5</td>
+</tr>
+<tr>
+<td>3</td><td><a href="#arm-intel-quality">Enthuist</a></td><td>intel-quality</td>
+<td>intel_confirmed</td><td>0.15</td>
+<td class="neg">-8.0</td>
+<td class="neg">-0.0120</td>
+<td>timeout</td><td>135136</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>4</td><td><a href="#arm-rules-proven">looong</a></td><td>rules-proven</td>
+<td>new_mint</td><td>0.05</td>
+<td class="neg">-26.1</td>
+<td class="neg">-0.0130</td>
+<td>trailing_stop</td><td>46</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>5</td><td><a href="#arm-intel-quality">Smoke</a></td><td>intel-quality</td>
+<td>intel_confirmed</td><td>0.15</td>
+<td class="neg">-7.1</td>
+<td class="neg">-0.0107</td>
+<td>timeout</td><td>1806</td>
+<td>22</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>6</td><td><a href="#arm-intel-quality">WET</a></td><td>intel-quality</td>
+<td>intel_confirmed</td><td>0.15</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0037</td>
+<td>timeout</td><td>1804</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>7</td><td><a href="#arm-intel-quality">YES YOU</a></td><td>intel-quality</td>
+<td>intel_confirmed</td><td>0.15</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0037</td>
+<td>timeout</td><td>1805</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>8</td><td><a href="#arm-rules-proven">Meowpin</a></td><td>rules-proven</td>
+<td>new_mint</td><td>0.05</td>
+<td class="neg">-14.3</td>
+<td class="neg">-0.0072</td>
+<td>trailing_stop</td><td>29</td>
+<td>25</td>
+<td>28.3</td>
+</tr>
+<tr>
+<td>9</td><td><a href="#arm-intel-quality">KYDEN</a></td><td>intel-quality</td>
+<td>intel_confirmed</td><td>0.15</td>
+<td class="neg">-5.0</td>
+<td class="neg">-0.0075</td>
+<td>timeout</td><td>1802</td>
+<td>17</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>10</td><td><a href="#arm-intel-quality">SADCAT</a></td><td>intel-quality</td>
+<td>intel_confirmed</td><td>0.15</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0037</td>
+<td>timeout</td><td>1806</td>
+<td>35</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>11</td><td><a href="#arm-rules-proven">Clouseau</a></td><td>rules-proven</td>
+<td>new_mint</td><td>0.05</td>
+<td class="neg">-13.4</td>
+<td class="neg">-0.0067</td>
+<td>trailing_stop</td><td>117</td>
+<td>32</td>
+<td>24.8</td>
+</tr>
+<tr>
+<td>12</td><td><a href="#arm-oracle-open">ANSEM</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-4.5</td>
+<td class="neg">-0.0004</td>
+<td>timeout</td><td>1806</td>
+<td>17</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>13</td><td><a href="#arm-oracle-open">Jimothy</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-57.4</td>
+<td class="neg">-0.0057</td>
+<td>stop_loss</td><td>15</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>14</td><td><a href="#arm-oracle-open">PJT</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-7.4</td>
+<td class="neg">-0.0007</td>
+<td>timeout</td><td>1804</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>15</td><td><a href="#arm-oracle-open">$DELU</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0002</td>
+<td>timeout</td><td>1805</td>
+<td>17</td>
+<td>4.2</td>
+</tr>
+<tr>
+<td>16</td><td><a href="#arm-oracle-open">Poze</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-38.9</td>
+<td class="neg">-0.0039</td>
+<td>stop_loss</td><td>63</td>
+<td>31</td>
+<td>19.3</td>
+</tr>
+<tr>
+<td>17</td><td><a href="#arm-oracle-open">MELON</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1803</td>
+<td>19</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>18</td><td><a href="#arm-oracle-open">TrippleBBL</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="pos">10.4</td>
+<td class="pos">0.0010</td>
+<td>timeout</td><td>1805</td>
+<td>19</td>
+<td>10.4</td>
+</tr>
+<tr>
+<td>19</td><td><a href="#arm-oracle-open">SKE</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-32.5</td>
+<td class="neg">-0.0033</td>
+<td>stop_loss</td><td>29</td>
+<td>20</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>20</td><td><a href="#arm-oracle-open">test</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0002</td>
+<td>timeout</td><td>1805</td>
+<td>15</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>21</td><td><a href="#arm-oracle-open">JARRETT</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0002</td>
+<td>timeout</td><td>1806</td>
+<td>17</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>22</td><td><a href="#arm-llm-auto">House</a></td><td>llm-auto</td>
+<td>intel_confirmed</td><td>0.01</td>
+<td class="pos">73.9</td>
+<td class="pos">0.0074</td>
+<td>take_profit</td><td>68</td>
+<td>30</td>
+<td>73.9</td>
+</tr>
+<tr>
+<td>23</td><td><a href="#arm-rules-proven">AG</a></td><td>rules-proven</td>
+<td>new_mint</td><td>0.05</td>
+<td class="neg">-25.3</td>
+<td class="neg">-0.0126</td>
+<td>timeout</td><td>1897</td>
+<td>28</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>24</td><td><a href="#arm-llm-claude">ROGERS</a></td><td>llm-claude</td>
+<td>intel_confirmed</td><td>0.01</td>
+<td class="neg">-2.7</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1806</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>25</td><td><a href="#arm-llm-grok">ROGERS</a></td><td>llm-grok</td>
+<td>intel_confirmed</td><td>0.01</td>
+<td class="neg">-5.6</td>
+<td class="neg">-0.0006</td>
+<td>timeout</td><td>1809</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>26</td><td><a href="#arm-llm-auto">GABRIEL</a></td><td>llm-auto</td>
+<td>intel_confirmed</td><td>0.01</td>
+<td class="neg">-4.4</td>
+<td class="neg">-0.0004</td>
+<td>timeout</td><td>1803</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>27</td><td><a href="#arm-boost-ride">ocFkqj</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">5.2</td>
+<td class="pos">0.0005</td>
+<td>timeout</td><td>245</td>
+<td>21</td>
+<td>5.2</td>
+</tr>
+<tr>
+<td>28</td><td><a href="#arm-llm-claude">HOME</a></td><td>llm-claude</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-3.0</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1802</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>29</td><td><a href="#arm-llm-auto">HOME</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-3.1</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1804</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>30</td><td><a href="#arm-boost-ride">xjcfSQ</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">4.7</td>
+<td class="pos">0.0005</td>
+<td>timeout</td><td>243</td>
+<td>21</td>
+<td>4.7</td>
+</tr>
+<tr>
+<td>31</td><td><a href="#arm-boost-ride">Ux3UY8</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">20.9</td>
+<td class="pos">0.0021</td>
+<td>take_profit</td><td>153</td>
+<td>21</td>
+<td>20.2</td>
+</tr>
+<tr>
+<td>32</td><td><a href="#arm-boost-ride">2UDry5</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-84.3</td>
+<td class="neg">-0.0084</td>
+<td>stop_loss</td><td>6</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>33</td><td><a href="#arm-llm-claude">one</a></td><td>llm-claude</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-21.7</td>
+<td class="neg">-0.0022</td>
+<td>trailing_stop</td><td>133</td>
+<td></td>
+<td>1.2</td>
+</tr>
+<tr>
+<td>34</td><td><a href="#arm-llm-auto">one</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-21.7</td>
+<td class="neg">-0.0022</td>
+<td>trailing_stop</td><td>136</td>
+<td></td>
+<td>1.2</td>
+</tr>
+<tr>
+<td>35</td><td><a href="#arm-llm-auto">掌握</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="pos">58.8</td>
+<td class="pos">0.0059</td>
+<td>take_profit</td><td>84</td>
+<td></td>
+<td>64.3</td>
+</tr>
+<tr>
+<td>36</td><td><a href="#arm-llm-auto">Elon</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-37.4</td>
+<td class="neg">-0.0037</td>
+<td>stop_loss</td><td>23</td>
+<td>44</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>37</td><td><a href="#arm-boost-ride">DBrD6t</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-15.8</td>
+<td class="neg">-0.0016</td>
+<td>stop_loss</td><td>5</td>
+<td>16</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>38</td><td><a href="#arm-llm-claude">Pink</a></td><td>llm-claude</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-2.7</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1804</td>
+<td>38</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>39</td><td><a href="#arm-llm-auto">Pink</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-2.8</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1806</td>
+<td>38</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>40</td><td><a href="#arm-llm-grok">Pink</a></td><td>llm-grok</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-2.8</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1808</td>
+<td>38</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>41</td><td><a href="#arm-boost-ride">HMimvR</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-20.1</td>
+<td class="neg">-0.0020</td>
+<td>stop_loss</td><td>8</td>
+<td>21</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>42</td><td><a href="#arm-boost-ride">Y4HEU5</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">11.7</td>
+<td class="pos">0.0012</td>
+<td>timeout</td><td>245</td>
+<td></td>
+<td>11.5</td>
+</tr>
+<tr>
+<td>43</td><td><a href="#arm-llm-auto">WhiteBull</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="pos">60.8</td>
+<td class="pos">0.0061</td>
+<td>take_profit</td><td>172</td>
+<td></td>
+<td>60.8</td>
+</tr>
+<tr>
+<td>44</td><td><a href="#arm-llm-grok">DEPE</a></td><td>llm-grok</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="pos">71.3</td>
+<td class="pos">0.0071</td>
+<td>take_profit</td><td>112</td>
+<td></td>
+<td>81.9</td>
+</tr>
+<tr>
+<td>45</td><td><a href="#arm-llm-claude">CQUACK</a></td><td>llm-claude</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-2.7</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1806</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>46</td><td><a href="#arm-oracle-open">MrSue</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1806</td>
+<td>19</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>47</td><td><a href="#arm-boost-ride">aQzS8b</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">12.0</td>
+<td class="pos">0.0012</td>
+<td>timeout</td><td>244</td>
+<td></td>
+<td>12.0</td>
+</tr>
+<tr>
+<td>48</td><td><a href="#arm-oracle-open">FLIPPENING</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-18.7</td>
+<td class="neg">-0.0019</td>
+<td>timeout</td><td>1804</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>49</td><td><a href="#arm-llm-auto">Moon</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-4.1</td>
+<td class="neg">-0.0004</td>
+<td>timeout</td><td>1807</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>50</td><td><a href="#arm-boost-ride">JMBush</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">5.0</td>
+<td class="pos">0.0005</td>
+<td>timeout</td><td>246</td>
+<td></td>
+<td>5.0</td>
+</tr>
+<tr>
+<td>51</td><td><a href="#arm-boost-ride">yMDueA</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-99.9</td>
+<td class="neg">-0.0100</td>
+<td>stop_loss</td><td>177</td>
+<td>21</td>
+<td>4.6</td>
+</tr>
+<tr>
+<td>52</td><td><a href="#arm-llm-claude">Diamond</a></td><td>llm-claude</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0002</td>
+<td>timeout</td><td>1803</td>
+<td>17</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>53</td><td><a href="#arm-boost-ride">6dAqWB</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-22.0</td>
+<td class="neg">-0.0022</td>
+<td>stop_loss</td><td>18</td>
+<td>18</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>54</td><td><a href="#arm-llm-auto">tutu</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-17.6</td>
+<td class="neg">-0.0018</td>
+<td>trailing_stop</td><td>121</td>
+<td></td>
+<td>18.4</td>
+</tr>
+<tr>
+<td>55</td><td><a href="#arm-boost-ride">fxppSy</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">11.3</td>
+<td class="pos">0.0011</td>
+<td>timeout</td><td>247</td>
+<td>21</td>
+<td>11.3</td>
+</tr>
+<tr>
+<td>56</td><td><a href="#arm-boost-ride">Awyjqw</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-17.4</td>
+<td class="neg">-0.0017</td>
+<td>stop_loss</td><td>7</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>57</td><td><a href="#arm-boost-ride">5V3eh6</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-98.7</td>
+<td class="neg">-0.0099</td>
+<td>stop_loss</td><td>8</td>
+<td>21</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>58</td><td><a href="#arm-boost-ride">ChRFYk</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-93.2</td>
+<td class="neg">-0.0093</td>
+<td>stop_loss</td><td>9</td>
+<td>22</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>59</td><td><a href="#arm-boost-ride">qFJmT1</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">20.4</td>
+<td class="pos">0.0020</td>
+<td>take_profit</td><td>206</td>
+<td>21</td>
+<td>20.4</td>
+</tr>
+<tr>
+<td>60</td><td><a href="#arm-boost-ride">4Wkuhs</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-8.7</td>
+<td class="neg">-0.0009</td>
+<td>trailing_stop</td><td>19</td>
+<td>19</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>61</td><td><a href="#arm-boost-ride">u8oLcb</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">20.2</td>
+<td class="pos">0.0020</td>
+<td>take_profit</td><td>224</td>
+<td></td>
+<td>20.2</td>
+</tr>
+<tr>
+<td>62</td><td><a href="#arm-llm-claude">birry</a></td><td>llm-claude</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-3.7</td>
+<td class="neg">-0.0004</td>
+<td>timeout</td><td>1803</td>
+<td>28</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>63</td><td><a href="#arm-llm-grok">BLACKHOLE</a></td><td>llm-grok</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="pos">63.1</td>
+<td class="pos">0.0063</td>
+<td>take_profit</td><td>114</td>
+<td></td>
+<td>63.1</td>
+</tr>
+<tr>
+<td>64</td><td><a href="#arm-llm-auto">boss</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-4.7</td>
+<td class="neg">-0.0005</td>
+<td>timeout</td><td>1803</td>
+<td>36</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>65</td><td><a href="#arm-llm-auto">$RUGHUNTER</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0002</td>
+<td>timeout</td><td>1802</td>
+<td>17</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>66</td><td><a href="#arm-llm-auto">RCC</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0002</td>
+<td>timeout</td><td>1806</td>
+<td>16</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>67</td><td><a href="#arm-llm-grok">COOK</a></td><td>llm-grok</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="pos">14.2</td>
+<td class="pos">0.0014</td>
+<td>timeout</td><td>1804</td>
+<td></td>
+<td>14.2</td>
+</tr>
+<tr>
+<td>68</td><td><a href="#arm-llm-grok">doge</a></td><td>llm-grok</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-4.1</td>
+<td class="neg">-0.0004</td>
+<td>timeout</td><td>1804</td>
+<td>17</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>69</td><td><a href="#arm-llm-grok">REC</a></td><td>llm-grok</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-2.6</td>
+<td class="neg">-0.0003</td>
+<td>timeout</td><td>1804</td>
+<td>20</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>70</td><td><a href="#arm-llm-grok">DUCK</a></td><td>llm-grok</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="pos">65.6</td>
+<td class="pos">0.0066</td>
+<td>take_profit</td><td>72</td>
+<td>36</td>
+<td>65.6</td>
+</tr>
+<tr>
+<td>71</td><td><a href="#arm-boost-ride">Aevon</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">2.0</td>
+<td class="pos">0.0002</td>
+<td>timeout</td><td>243</td>
+<td></td>
+<td>4.8</td>
+</tr>
+<tr>
+<td>72</td><td><a href="#arm-oracle-open">Jrool</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0002</td>
+<td>timeout</td><td>1804</td>
+<td>21</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>73</td><td><a href="#arm-boost-ride">Walter</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-2.3</td>
+<td class="neg">-0.0002</td>
+<td>trailing_stop</td><td>15</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>74</td><td><a href="#arm-llm-claude">RACOIN</a></td><td>llm-claude</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-78.3</td>
+<td class="neg">-0.0078</td>
+<td>stop_loss</td><td>128</td>
+<td>38</td>
+<td>55.0</td>
+</tr>
+<tr>
+<td>75</td><td><a href="#arm-boost-ride">VFX</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">18.7</td>
+<td class="pos">0.0019</td>
+<td>take_profit</td><td>179</td>
+<td></td>
+<td>20.7</td>
+</tr>
+<tr>
+<td>76</td><td><a href="#arm-boost-ride">FLL</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">20.0</td>
+<td class="pos">0.0020</td>
+<td>take_profit</td><td>164</td>
+<td></td>
+<td>20.0</td>
+</tr>
+<tr>
+<td>77</td><td><a href="#arm-oracle-open">Free</a></td><td>oracle-open</td>
+<td>new_mint</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0002</td>
+<td>timeout</td><td>1807</td>
+<td>17</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>78</td><td><a href="#arm-llm-auto">SAVIOUR</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-2.5</td>
+<td class="neg">-0.0002</td>
+<td>timeout</td><td>1806</td>
+<td>17</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>79</td><td><a href="#arm-llm-claude">MCP</a></td><td>llm-claude</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="pos">10.6</td>
+<td class="pos">0.0011</td>
+<td>trailing_stop</td><td>61</td>
+<td></td>
+<td>38.6</td>
+</tr>
+<tr>
+<td>80</td><td><a href="#arm-boost-ride">RWA</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-35.6</td>
+<td class="neg">-0.0036</td>
+<td>stop_loss</td><td>116</td>
+<td></td>
+<td>10.6</td>
+</tr>
+<tr>
+<td>81</td><td><a href="#arm-llm-auto">COREY</a></td><td>llm-auto</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-26.4</td>
+<td class="neg">-0.0026</td>
+<td>trailing_stop</td><td>22</td>
+<td></td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>82</td><td><a href="#arm-llm-grok">APE</a></td><td>llm-grok</td>
+<td>llm_intel</td><td>0.01</td>
+<td class="neg">-9.2</td>
+<td class="neg">-0.0009</td>
+<td>timeout</td><td>1802</td>
+<td>13</td>
+<td>0.0</td>
+</tr>
+<tr>
+<td>83</td><td><a href="#arm-boost-ride">CWARDIN</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-32.8</td>
+<td class="neg">-0.0033</td>
+<td>stop_loss</td><td>191</td>
+<td></td>
+<td>16.8</td>
+</tr>
+<tr>
+<td>84</td><td><a href="#arm-boost-ride">BENNER</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-34.3</td>
+<td class="neg">-0.0034</td>
+<td>stop_loss</td><td>188</td>
+<td></td>
+<td>15.9</td>
+</tr>
+<tr>
+<td>85</td><td><a href="#arm-boost-ride">AGIGUY</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-34.4</td>
+<td class="neg">-0.0034</td>
+<td>stop_loss</td><td>190</td>
+<td></td>
+<td>15.9</td>
+</tr>
+<tr>
+<td>86</td><td><a href="#arm-boost-ride">DrqyFF</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">7.7</td>
+<td class="pos">0.0008</td>
+<td>timeout</td><td>243</td>
+<td></td>
+<td>7.7</td>
+</tr>
+<tr>
+<td>87</td><td><a href="#arm-boost-ride">moHcoC</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-6.4</td>
+<td class="neg">-0.0006</td>
+<td>trailing_stop</td><td>114</td>
+<td>21</td>
+<td>1.9</td>
+</tr>
+<tr>
+<td>88</td><td><a href="#arm-boost-ride">HANU.p</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">42.9</td>
+<td class="pos">0.0043</td>
+<td>take_profit</td><td>293</td>
+<td></td>
+<td>20.3</td>
+</tr>
+<tr>
+<td>89</td><td><a href="#arm-boost-ride">$MRH</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="neg">-30.1</td>
+<td class="neg">-0.0030</td>
+<td>stop_loss</td><td>254</td>
+<td></td>
+<td>10.1</td>
+</tr>
+<tr>
+<td>90</td><td><a href="#arm-boost-ride">BDAG</a></td><td>boost-ride</td>
+<td>graduation_ride</td><td>0.01</td>
+<td class="pos">20.4</td>
+<td class="pos">0.0020</td>
+<td>take_profit</td><td>135</td>
+<td></td>
+<td>20.6</td>
+</tr>
+ </tbody>
+ </table>
+ </div>
+
+<section class="arm" id="arm-llm-grok">
+<h3>llm-grok <span class="mode-tag mode-llm">LLM-judged</span></h3>
+<p class="arm-line">
+ Wallet <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener"><code>HBgN..m8Ca</code></a>
+ · <a href="/ledger/bcb8c86f-92d2-496d-bb2c-b9442f97a4fa">decision ledger</a>
+ · 9 trades · 4 wins (44%) · net <strong class="pos">+0.0190 SOL</strong>
+ · avg winner +53.6% · avg loser -4.9% · median hold 30m
+</p>
+<p class="arm-cfg">Policy at entry: 0.01 SOL per trade · take-profit +45% · stop-loss -30% · trailing stop 20% · 30m max hold</p>
+<details class="trade" open>
+<summary><span class="t-n">#25</span> <span class="t-sym">ROGERS</span> <span class="t-pnl neg">-5.6%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 13:17</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 13:17 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 45/100 · 0 buyers / 0 sellers observed · organic 45% · top-10 hold 0%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-5.6%</strong> (-0.0006 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,245 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,203</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/fDyzBYmLVPBeyt3eWU6FpgQV9SXyCiCbeXZe1tTZDaybh3uK572dAdkMnQxFjur5AcQju5NvGbH6A3nQgt5Zjtu" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/eEs5xHFfbB4kJMw8sfJibSCBHAN6ibLg5Dk5N5k33E684mTQoqErmEyFcgNUDEcNvPYqh8QUXkwMvAzcbbWDSGk" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $ROGERS on a intel_confirmed trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-5.6%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#40</span> <span class="t-sym">Pink</span> <span class="t-pnl neg">-2.8%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 20:58</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 20:58 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>38/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 86), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 34/100 · 89 buyers / 69 sellers observed · organic 52% · top-10 hold 53% · dev sold during observation</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.8%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,253 cap, now ~$2,172); highest print after our exit: ~$2,183 cap (<strong>0.42x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/5F1XseodXuNEtQHwxEWqaipmmNFDqTvjup2G81MM9ezv6hWut24kTiAMKQ3cfsbadiCwmXnQuYZ7KGrTeze4mirz" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4bgYkBBZg6rBrjMSdeaNnKXgtUfcuNjj27Vr3JFqGMBZ6SZNhtqAUTMEUnzNkNzS8t185vWCrf1s5gRzNeF9xUp3" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Pink grasshopper has a relatively high market realness score indicating genuine two-sided market demand.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.8%) instead of riding a dead coin further down.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#44</span> <span class="t-sym">DEPE</span> <span class="t-pnl pos">+71.3%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-22 00:20</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 00:20 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:groq#instant</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 95/100 · 51 buyers / 31 sellers observed · organic 84% · top-10 hold 90%</td></tr><tr><th>Peak</th><td>+81.9%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 2m, realized <strong class="pos">+71.3%</strong> (+0.0071 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.07x</strong> our exit today (below where we sold; we sold at an implied ~$37,396 cap, now ~$2,469); highest print after our exit: ~$19,566 cap (<strong>0.52x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/39YjJq5qnSv4WbRVWjuPdoEdmcdzMko43RKCxrBhYpDjGjGoGgYHTSGcx5coycKtVVtu1kb4DhPhkEas3rktm84j" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/PNKvurqwfjPEpAbrPMSdaqT6T1CvyZpKEbmuucTwrhGqQNvXDjrGwujfe2ErLk2vueq7MLixLjR4VNBPeRJYFby" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Strong real-market signal with multiple buyers and substantial wallet holding&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +45% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry. The model's entry thesis was directionally right on this one.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#63</span> <span class="t-sym">BLACKHOLE</span> <span class="t-pnl pos">+63.1%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-22 05:29</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 05:29 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 83/100 · 54 buyers / 33 sellers observed · organic 82% · top-10 hold 87%</td></tr><tr><th>Peak</th><td>+63.1%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 2m, realized <strong class="pos">+63.1%</strong> (+0.0063 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.07x</strong> our exit today (below where we sold; we sold at an implied ~$29,585 cap, now ~$2,194); highest print after our exit: ~$14,830 cap (<strong>0.50x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3a8nJQmLNAeLAugRyjngyfffeRHwhyzHXDQoGGARh2AfsuCVV4aHYfHQeDsXscANLUg4cGk9Z9bUekzgbMX4Qs7Q" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3kG79Py54KQU1kuiH3EAfPqTobbeM9fjR6hAoLxZ82frRZXwjFuETDe8CFskKgthWmaZfnRCwo4Ug6y1gEumhn31" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Genuine two-sided market indicated by high market_realness score.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +45% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry. The model's entry thesis was directionally right on this one.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#67</span> <span class="t-sym">COOK</span> <span class="t-pnl pos">+14.2%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 14:16</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 14:16 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 20/100 · 3 buyers / 1 sellers observed · organic 43% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+14.2%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="pos">+14.2%</strong> (+0.0014 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.36x</strong> our exit today (below where we sold; we sold at an implied ~$6,867 cap, now ~$2,491); highest print after our exit: ~$2,841 cap (<strong>0.41x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/58YN66FzxC3nqEwcWzZT6pcZzFmQgjXFzpeE5GA14RebtVqKUuH3Ma9mvnPRGuEWpc2febcknnQ1oPGcW72LKJqZ" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2tfWHSCT8yFtbfE52X4LSbPNLcN8VjSmzy67k5NUuHzrgws6ZzCGizvN71f1SNhCuxnzfxVwf8D9fDVvGL5KZkck" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Strong memetic potential with a catchy name and timely narrative.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +14.2% in the green. The model's entry thesis was directionally right on this one.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 30-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#68</span> <span class="t-sym">doge</span> <span class="t-pnl neg">-4.1%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 15:13</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 15:13 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>17/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 30/100 · 3 buyers / 1 sellers observed · organic 52% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-4.1%</strong> (-0.0004 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/5YQFSrKHGmtVXNMurqc87cHnhnU42vMff4Vh6gjuBJmnqzDwFoWTNQ1v5hf2wVtTazkRTRivYdKr3jMaWP6qk6C4" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2XhP5rYxHzsf8JQ3835BbD7zsNwRHFEMruQuFeibPwscSk2RjERB1FvQrTQsCzaEg4HQHj7jNBf76znb7tR6nhZG" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Strong memetic potential from 'swole' and 'doge' combination&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-4.1%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#69</span> <span class="t-sym">REC</span> <span class="t-pnl neg">-2.6%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 17:29</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 17:29 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>20/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:groq#instant</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 23/100 · 4 buyers / 2 sellers observed · organic 46% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.6%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/JdgR4VjVcP1HX6f5xwGz5GjR5G9FgtR5Qcz12qeVHqdWLHU7nKwFFYMoQkuecfp2trwTDx5BEeEDVuWKRfBjpaA" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3M1JDnvZVGUPZhPSmcZwJfa4JtqhMzvmMWJkR16avMZDmZiojskrRworn82d3sYQ8m3S64naBXTZzAb4ZHAzFPVv" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;REC exhibits strong market_realness signals and timely narrative&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.6%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#70</span> <span class="t-sym">DUCK</span> <span class="t-pnl pos">+65.6%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-22 22:36</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 22:36 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>36/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 78/100 · 48 buyers / 24 sellers observed · organic 78% · top-10 hold 86%</td></tr><tr><th>Peak</th><td>+65.6%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 72s, realized <strong class="pos">+65.6%</strong> (+0.0066 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.04x</strong> our exit today (below where we sold; we sold at an implied ~$49,102 cap, now ~$2,185); highest print after our exit: ~$40,087 cap (<strong>0.82x</strong> our exit, 1m candles); completed the bonding curve after our entry</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/X6GpUitp5F4sp7GqRdQS6X9mgRfEEsJC6b5kjnvBgYALUxSEDMwAjxnK1F3ycSvyoWJyLCPZduN1v3VSLQbi2Mw" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3XWzmFtAuSXovRLFRwd6iXw2iueG9ywZdYusfBv8Nv159JRQqLm4GFN3HbcHYXhB2dpPU8RxBixeB6YWDUgXenuY" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;DUCK has a decent market_realness score and a relatively balanced buyer-seller ratio.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +45% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry. The model's entry thesis was directionally right on this one.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#82</span> <span class="t-sym">APE</span> <span class="t-pnl neg">-9.2%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-23 01:21</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 01:21 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>13/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 70), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:groq#instant</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 16/100 · 24 buyers / 20 sellers observed · organic 46% · top-10 hold 97% · dev sold during observation</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-9.2%</strong> (-0.0009 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,313 cap, now ~$2,197); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/5zRnRPwHpoqagsSQbADvJXqa7KFDTDQb8252cyyLCj32BqtVoDcSAH9PwiTAytZzzgtuaAk4gf3rzLTp7kin5nke" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4HRegva2GWrNAfJ7igbZ6jVefzMevEtkaA2R9fGbBbEz3HxTu6VFc37yMKhCh2fyVui7F3GzZzoonkSD2btEJniQ" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;A moderate momentum position in APE is worth taking due to a decent two-sided market and a sizable dev buy.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-9.2%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+</section>
+
+<section class="arm" id="arm-llm-auto">
+<h3>llm-auto <span class="mode-tag mode-llm">LLM-judged</span></h3>
+<p class="arm-line">
+ Wallet <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener"><code>HXDz..3F3s</code></a>
+ · <a href="/ledger/d10aae1b-c56f-4780-88cb-e9b7405ef29e">decision ledger</a>
+ · 15 trades · 3 wins (20%) · net <strong class="pos">+0.0064 SOL</strong>
+ · avg winner +64.5% · avg loser -10.8% · median hold 30m
+</p>
+<p class="arm-cfg">Policy at entry: 0.01 SOL per trade · take-profit +60% · stop-loss -30% · trailing stop 20% · 30m max hold</p>
+<details class="trade" open>
+<summary><span class="t-n">#22</span> <span class="t-sym">House</span> <span class="t-pnl pos">+73.9%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-21 13:18</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 13:18 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Oracle conviction</th><td>30/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 79/100 · 39 buyers / 22 sellers observed · organic 80% · top-10 hold 81%</td></tr><tr><th>Peak</th><td>+73.9%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 68s, realized <strong class="pos">+73.9%</strong> (+0.0074 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.16x</strong> our exit today (below where we sold; we sold at an implied ~$13,784 cap, now ~$2,170); highest print after our exit: ~$5,889 cap (<strong>0.43x</strong> our exit, 1m candles); lifetime label: <code>rugged</code>, ATH cap ~$7,503</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2tvE2et8cAvym1QfbWx2zTgshS9XKr1V1WfkZae9kG1pGPjS8c7GPTekd6vXy9PQggNvbADcNZ66VJZeCDCzrN3E" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5FwxKvGF9EGitXjrvaDPWxceWR9BxToVvsxjzvfZyz5TCJxpzkoqpc2tbEkxYZ1sopufYdoQ7esmGFPHW4v778Zb" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $HOUSE on a intel_confirmed trigger with 0.02% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +60% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#26</span> <span class="t-sym">GABRIEL</span> <span class="t-pnl neg">-4.4%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 13:19</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 13:19 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 13/100 · 5 buyers / 0 sellers observed · organic 39% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-4.4%</strong> (-0.0004 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,247 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$3,263</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4nWTrDsef9weqC53YLS78CWyBkBCfY9X7qMECTVjYpHxe4uHCbgyCjeNkiv4ozZeYLhHzkvUvExUG2LiPPYYXifa" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/kQGJbJreXWX1xoaZeeenKVA9HD5xJcAc6wxEScc9U3khKgCPq31FqxsEBYXHkSaT9RQ5Y8HtT3JsCQPHmbxTTRj" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $GABRIEL on a intel_confirmed trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-4.4%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#29</span> <span class="t-sym">HOME</span> <span class="t-pnl neg">-3.1%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 18:59</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 18:59 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 24/100 · 3 buyers / 2 sellers observed · organic 47% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-3.1%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,250 cap, now ~$2,171); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/zCRoSoiWY6Uk1AFP3ukBvVQjmkZJwz4QGa7jRF69b2uQ2afy3JPEYWWCYvVXkEfc67iCW5XNQsTo9sDvTyfVou5" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3McFqr9kUSMEpYB42MbnB9JmuZjcMEnXztGyGDKqLNPUNxcF1HBBhVBYk61xT3qRR3gvPpPMorKHzdDNiAW84SWq" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;HOME token has strong memetic quality and a plausible narrative.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-3.1%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#34</span> <span class="t-sym">one</span> <span class="t-pnl neg">-21.7%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-21 19:49</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 19:49 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 76/100 · 52 buyers / 30 sellers observed · organic 77% · top-10 hold 87%</td></tr><tr><th>Peak</th><td>+1.2%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 2m, realized <strong class="neg">-21.7%</strong> (-0.0022 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.12x</strong> our exit today (below where we sold; we sold at an implied ~$17,495 cap, now ~$2,171); highest print after our exit: ~$10,006 cap (<strong>0.57x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4ADCUvsc9vgvepcUMAyAdhasBGvxPNVFyW5GfRe9av9i2P6SGbLQ24yMhrxz2jnATzk66UVcEnkyaRMrC16q7yRZ" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/31mFniq3oixxxpWQTS7rLJSDzUyv2egVZ5Wc6jZsTktEeEEU442p6Y6VnMF5TCro4yEh8ccEJXvQrgSQhUvPiZNQ" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Genuine two-sided market and moderate market realness justify a small momentum position.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +1.2% but the 20% giveback landed at -21.7%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#35</span> <span class="t-sym">掌握</span> <span class="t-pnl pos">+58.8%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-21 20:10</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 20:10 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 78/100 · 41 buyers / 22 sellers observed · organic 77% · top-10 hold 93%</td></tr><tr><th>Peak</th><td>+64.3%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 84s, realized <strong class="pos">+58.8%</strong> (+0.0059 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.05x</strong> our exit today (below where we sold; we sold at an implied ~$40,784 cap, now ~$1,976); highest print after our exit: ~$33,559 cap (<strong>0.82x</strong> our exit, 1m candles); completed the bonding curve after our entry</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2MjHUZ1skK84mdXQ2D5YgsSe19y4tF5uwLeJ64QexCXdJudswyAEkPKafWYEFH8XgjMbQtrveLBVdjTAZRcfxHc7" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2v3a9cL28D9aovRgPXLv7db9jBRtRjds3PVnGj8Vtq8dMf5khzhnWF65cieLYt1EeyjKrLQjszkKkJdF2vCWCqAQ" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Genuine two-sided market and moderate market realness score justify a small momentum position.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +60% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry. The model's entry thesis was directionally right on this one.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#36</span> <span class="t-sym">Elon</span> <span class="t-pnl neg">-37.4%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-21 20:24</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 20:24 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>44/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 82/100 · 37 buyers / 22 sellers observed · organic 83% · top-10 hold 84%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 23s, realized <strong class="neg">-37.4%</strong> (-0.0037 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.17x</strong> our exit today (below where we sold; we sold at an implied ~$12,994 cap, now ~$2,195); highest print after our exit: ~$13,306 cap (<strong>1.02x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2eBiYb9znvAHK1vymNsWFqZ5zYSkY2VvoedjT3GhKmycoLxXcMmZPFchhGc8SJF9TDhLVnD8Ps3rTjWRnbQY9vT" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5cXaFeP5jPRKopbj3e9NYzDWMzgQHZ9ix9ypo1yAEkH44SjnEHiip3feSTTxmHCLSWSBi82Cu1Bfa4d3e49RgK8R" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Strong memetic quality and decent market realness justify a small momentum position.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Loss capped close to policy: -30% configured, -37.4% realized. The mandatory stop did its one job. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> Entry selection, not exit policy, is what loses here: the coin never traded above the entry quote for long.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#39</span> <span class="t-sym">Pink</span> <span class="t-pnl neg">-2.8%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 20:58</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 20:58 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>38/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 86), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 34/100 · 89 buyers / 69 sellers observed · organic 52% · top-10 hold 53% · dev sold during observation</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.8%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,257 cap, now ~$2,172); highest print after our exit: ~$2,183 cap (<strong>0.42x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2Rag3ohdAB39ycBTK18LyjKTsaPveciPUFRy7wVsdtdkuaZQPLCdG9RQrRzzRWijNwKA3xfvak66FfCdPHpVwA6R" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3RpM621wjXcTpFuspbnPTmczdBZnwFMxY7Resmyp2n7NRy2aLz6wWXxRJfcWSGJ3XVdXzsTA31CaBTC1HLFHg2FZ" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Pink grasshopper has a relatively real market with diverse buyers and sellers.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.8%) instead of riding a dead coin further down.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#43</span> <span class="t-sym">WhiteBull</span> <span class="t-pnl pos">+60.8%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-22 00:16</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 00:16 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>warn (score 86), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 30/100 · 37 buyers / 12 sellers observed · organic 50% · top-10 hold 61% · dev sold during observation</td></tr><tr><th>Peak</th><td>+60.8%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 3m, realized <strong class="pos">+60.8%</strong> (+0.0061 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.05x</strong> our exit today (below where we sold; we sold at an implied ~$41,664 cap, now ~$2,170); highest print after our exit: ~$19,796 cap (<strong>0.48x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/5KnwEGAXq6GaHvwqLyDRJ9NbjnKnbvwDTvdBqMBYdcT7AmZgxnGFQmqaguRxRnVaYtgZXATxq5yzwukrL5sbgHpg" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/gHn32VNqqBidP55xLXXAqUCS46bjQpb4sEBa2axJi6yeoXasiibtJx4aS73fGziQFDc5bcScbuYa7Dr4C8n9gpy" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Moderately real market with diverse buyers warrants a small momentum position.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +60% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The model's entry thesis was directionally right on this one.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#49</span> <span class="t-sym">Moon</span> <span class="t-pnl neg">-4.1%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 00:42</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 00:42 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 4/100 · 1 buyers / 0 sellers observed · organic 28% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-4.1%</strong> (-0.0004 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4P84G5PkarcJ31eSt3Hi32WvKMrnQ8KzWf5NYfFSbf9qrPaihVF1gd7b5dBUANbHrkU2odpKFv77tUf9Yr7JuWB8" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4dtXkCf3vrqSk1kdSxGiihtaUwuimEDRntCRrzau5wi1tmgoapzryx5e3ECv3wL4r7h11FTvePMEzwgUMaXyA8KM" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Memetic quality of 'TO THE MOON' is high and could attract significant attention&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-4.1%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#54</span> <span class="t-sym">tutu</span> <span class="t-pnl neg">-17.6%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-22 02:12</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 02:12 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 83/100 · 52 buyers / 33 sellers observed · organic 79% · top-10 hold 85%</td></tr><tr><th>Peak</th><td>+18.4%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 2m, realized <strong class="neg">-17.6%</strong> (-0.0018 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.16x</strong> our exit today (below where we sold; we sold at an implied ~$14,169 cap, now ~$2,319); highest print after our exit: ~$11,091 cap (<strong>0.78x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2jFXv2qG7gNpohJmvHDXJVHGuev7Ks4bBNCHkDhmAYNFVFGJUS3mw6VKgCmZJzZHrSHH2Vv4yWHrQB5z8VbWk8yH" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3k2aa7JHVS1TDrncHyRFthWAgxzMhKKFtUnvU9ed2DpdV3d2VfPJcBcBKoHC3Eay6icx5Kjm5yQ9DbmtQ93Gqf7h" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Moderately genuine market_realness and decent buyer distribution justify a momentum position.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +18.4% but the 20% giveback landed at -17.6%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#64</span> <span class="t-sym">boss</span> <span class="t-pnl neg">-4.7%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 05:48</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 05:48 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>36/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 86), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 39/100 · 44 buyers / 36 sellers observed · organic 56% · top-10 hold 79% · dev sold during observation</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-4.7%</strong> (-0.0005 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,269 cap, now ~$2,175); highest print after our exit: ~$2,181 cap (<strong>0.41x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/MVJ9vVvfDRkQnyjyE9VvS9JNAPVUxizFekGUxP8ppesxmc9nxU39KTt6KtUdkiDHZt9pUvWTJ2HuBiAMgQ1udMr" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/m2EYbCGJ1rhMbJfi4D5MUDBu5XhRSgZAfwa1sNjKKei1GVGUgyirsA2SVDDAkmPsBdLvRwmT6LCQNErGKJw33Zr" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Strong market realness and diverse buyer base justify a momentum position.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-4.7%) instead of riding a dead coin further down.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#65</span> <span class="t-sym">$RUGHUNTER</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 08:34</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 08:34 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>17/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 4/100 · 1 buyers / 0 sellers observed · organic 28% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,252 cap, now ~$2,172); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/41u8RyAW9x6vkifP8QM3mvQbNzcQG9hBKUXoSFwxYvQFxSyvrYkHw2GiXtKTs3kyi96HsZWHuB9TMLJ1SSwxeokY" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4JLMsmKwYPfRKNW1DTSuvECxM1cMqZiQV2mTAETCfyWkc1Bsc7op788u5wj2DnkkdECSFS1k8VVparL47ep4sNsb" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Strong memetic name and timely narrative suggest potential for real momentum.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#66</span> <span class="t-sym">RCC</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 09:42</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 09:42 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>16/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 0/100 · 3 buyers / 2 sellers observed · organic 41% · bundle risk 53% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4YEjbyy4kKNxc2XGH7ivQmzqTUA4ECtdX92uru9hn4hpbAzC7fxhkQtAfYfEPLK4rVLLKYpcJYH1vcERv46gePFf" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5QHUkpr3cPRiQzDu9YCCvmBUeG6egv5ToWhqfo9cAYBGaiDXvVxc9sWDD1fB3cz9ihLJk3dbvKdKeyYDseNMXUJG" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Memetic token name and low market cap may attract speculative buyers.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#78</span> <span class="t-sym">SAVIOUR</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-23 00:50</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 00:50 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>17/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:groq#instant</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 4/100 · 1 buyers / 0 sellers observed · organic 28% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/5vipir2MKQKQNHrDA6nVrRV9wUx3MmtbCMC2u419ucmE5u2W8HFgJy1TRahP7wgnsBjax94p64qts6o145ny4kBW" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2E5ZFqKfi17KBkDKXTZiWRA4joSxPWhaVMrFsHSFMrL4KW4RhmzyvrGzmJfA26jexBPGp1nyi924EZmhuAK4VUUL" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;SAVIOR may have organic demand due to a compelling narrative and the creator's launch history&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#81</span> <span class="t-sym">COREY</span> <span class="t-pnl neg">-26.4%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-23 01:40</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 01:40 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>warn (score 86), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 15/100 · 41 buyers / 27 sellers observed · organic 45% · top-10 hold 87% · dev sold during observation</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 22s, realized <strong class="neg">-26.4%</strong> (-0.0026 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.32x</strong> our exit today (below where we sold; we sold at an implied ~$7,306 cap, now ~$2,369); highest print after our exit: ~$2,522 cap (<strong>0.35x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/31GDdmcabG5wpovNjSqKTNWzgmebxJSjG41s9fFz673m7SqT233FRxkgi18BEHkoHjAL5cw6Skh99DmiYV6T4Ns5" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4QkAsfYVwZgARUutp6tuxXGen7Et9zHTomhwAj3hheekPdmKuVDVgEPVCVURvsR3recacTWC2dKwr3iPfxLvZc1i" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Genuine two-sided market and moderate market realness score indicate potential for real momentum.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +0.0% but the 20% giveback landed at -26.4%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+</section>
+
+<section class="arm" id="arm-rules-classic">
+<h3>rules-classic <span class="mode-tag mode-rules">rules</span></h3>
+<p class="arm-line">
+ Wallet <a href="https://solscan.io/account/7KdHYVovYzmrJCE3w6g1iGxeUWJmXoTZLKbBqD7QdWfD" target="_blank" rel="noopener"><code>7KdH..dWfD</code></a>
+ · <a href="/ledger/15e98de5-2695-427b-b746-4558a0933a4e">decision ledger</a>
+ · 1 trades · 0 wins (0%) · net <strong class="neg">-0.0006 SOL</strong>
+ · avg winner +0.0% · avg loser -28.1% · median hold 4.4d
+</p>
+<p class="arm-cfg">Policy at entry: 0.002 SOL per trade · take-profit +60% · stop-loss -30% · trailing stop 20% · 30m max hold · Oracle conviction ≥ 55 · socials required</p>
+<details class="trade" open>
+<summary><span class="t-n">#1</span> <span class="t-sym">Dronenald</span> <span class="t-pnl neg">-28.1%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-03 16:19</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-03 16:19 UTC, committed 0.002 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 4.4d, realized <strong class="neg">-28.1%</strong> (-0.0006 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,253 cap, now ~$2,172); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/214YhevxHwfmxtD4z77v53QvdGHg5Lu2jZfDMHzauCrvUNMrKX7jWQs2eg5byk6iGtcVfrUrL8HUnptmXWJaQvv4" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/SIMULATED" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/7KdHYVovYzmrJCE3w6g1iGxeUWJmXoTZLKbBqD7QdWfD" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $DRONENALD on a new_mint trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0020 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +0.0% but the 20% giveback landed at -28.1%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+</section>
+
+<section class="arm" id="arm-llm-claude">
+<h3>llm-claude <span class="mode-tag mode-llm">LLM-judged</span></h3>
+<p class="arm-line">
+ Wallet <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener"><code>65Ka..w3h8</code></a>
+ · <a href="/ledger/c7b23f0f-a7fc-412d-81c8-2b2b06119af2">decision ledger</a>
+ · 9 trades · 1 wins (11%) · net <strong class="neg">-0.0107 SOL</strong>
+ · avg winner +10.6% · avg loser -14.7% · median hold 30m
+</p>
+<p class="arm-cfg">Policy at entry: 0.01 SOL per trade · take-profit +60% · stop-loss -30% · trailing stop 20% · 30m max hold</p>
+<details class="trade" open>
+<summary><span class="t-n">#24</span> <span class="t-sym">ROGERS</span> <span class="t-pnl neg">-2.7%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 13:17</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 13:17 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 45/100 · 0 buyers / 0 sellers observed · organic 45% · top-10 hold 0%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.7%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,251 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,203</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/ANu5VSHsDGVLrp5PQH9xFB2SJHv61ThvCQBDEgzsjKDKsodUCzEFRkBDw2kTEWmDMjWaMkEvuHT4qq4cPbmYvk6" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2sWjuYtpgc8HV5xwbvU6kKbVAp3MfgqPtxN9DTvb5R5D9opc9yQdqsmwq9WMPAyEk7gkKeU4TGYoyCqjbdVaSMk1" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $ROGERS on a intel_confirmed trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.7%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#28</span> <span class="t-sym">HOME</span> <span class="t-pnl neg">-3.0%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 18:59</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 18:59 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 24/100 · 3 buyers / 2 sellers observed · organic 47% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-3.0%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,253 cap, now ~$2,171); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2oRM8CykSKQfMbme34vDC1SNb42WoJCwRgVoJr1ufmmSCrjsEbu3EH8Pw7PSGE5Toc6PNxi9a8SJFruQT5Tk3JQu" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3Z7bX2bWeZHHEzw1i97gUuEsvdmfpjNhiLAn1m45Wz4C4usWHq45JJ1E68BHxoQdKcvv4fP95yqG6BjXeAeuUPes" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Strong memetic quality and timely narrative align with market sentiment.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-3.0%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#33</span> <span class="t-sym">one</span> <span class="t-pnl neg">-21.7%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-21 19:49</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 19:49 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 76/100 · 52 buyers / 30 sellers observed · organic 77% · top-10 hold 87%</td></tr><tr><th>Peak</th><td>+1.2%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 2m, realized <strong class="neg">-21.7%</strong> (-0.0022 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.12x</strong> our exit today (below where we sold; we sold at an implied ~$17,500 cap, now ~$2,171); highest print after our exit: ~$10,006 cap (<strong>0.57x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/5AnADM9As9Yhbmc7q7SyzcqHzXaQYWS73ShifoYav7Mq9pzk11NNP8pmmvKak7vgGi3kMUgYHRwTuFTptk1UtUV3" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5boE4SVCeweYQhQdZNNBKLqqofMYkDV8Fy58Ly3gsnUYdJmcG4Cxyqu42Wt68jCTTmD9rkq9mkJuCCfpGnKKUGjE" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Moderately strong market realness and balanced buyer/seller ratio justify a momentum position.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +1.2% but the 20% giveback landed at -21.7%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#38</span> <span class="t-sym">Pink</span> <span class="t-pnl neg">-2.7%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 20:58</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 20:58 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>38/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 86), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 34/100 · 89 buyers / 69 sellers observed · organic 52% · top-10 hold 53% · dev sold during observation</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.7%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,260 cap, now ~$2,172); highest print after our exit: ~$2,183 cap (<strong>0.42x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2LUnWFMvMYDEEox8JX15uvoaSLTZtYwRhgt5Bb8c28eDdtqfBfRffxo93tiukwBwwVJKHrN6DXoFR4LbzaDyRWwx" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/NopypDB9gWKinyCBDCBBXv6zb2xr9UPWmp11hSGfAE7ZPfD15VHVrSYRCA18oaiGBTQExurwrCa6jNBHu1GvnGQ" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Pink grasshopper has a relatively real market with diverse buyers and sellers.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.7%) instead of riding a dead coin further down.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#45</span> <span class="t-sym">CQUACK</span> <span class="t-pnl neg">-2.7%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 23:57</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 23:57 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 7/100 · 2 buyers / 1 sellers observed · organic 31% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.7%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2DYZf5YfB3vMcx7HfhrnEkErmvJj4Q1FiwiHX9ptcB5vdcNcssS68x2T4N7kBRbix6fyfCsSwCEkJiiiDfmX2GDk" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3tLcf8wSL1Km77CHqGoPrRfB6FPJvqqBaVgs6ggB66TWmuWcVBxnnkZqiqhyUeWd49RmiWSRYNpo3hTthsMzae5o" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;CQUACK's memetic name and symbol may attract initial speculative interest.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.7%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#52</span> <span class="t-sym">Diamond</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 01:38</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 01:38 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>17/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 7/100 · 2 buyers / 1 sellers observed · organic 31% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,258 cap, now ~$2,170); highest print after our exit: ~$2,191 cap (<strong>0.42x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2o3ELuxvMtLa3FiCKxRi4P5G4y4s3RzeKfBrVTFtAtcMJDQdxGCT7vwgZ9eUxvVnShY6PyFLyEmBdfv2Rj8c4bWm" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2QrFAJBQrAFSmMbcqfZ9TPtmvac5r49qKAMtnsNRsfRLrVV2Poowkxb99WCkoYehqWWErXaYxHAQHjePPUJWzUPb" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Strong memetic name and ticker align with current market sentiment.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#62</span> <span class="t-sym">birry</span> <span class="t-pnl neg">-3.7%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 03:38</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 03:38 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>28/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:groq#instant</code>, confidence 0.7</td></tr><tr><th>Entry intel</th><td>quality 84/100 · 51 buyers / 46 sellers observed · organic 84% · top-10 hold 73%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-3.7%</strong> (-0.0004 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2JtzZ4PsFF6VRdMiaeMdUz2NSLimaoLMppNHvP6ym9pnv2m3nE1pxTsecbm5wrKguCKvbCoK7PLAbb64JqtdnMRZ" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3r55xeV4gkYBBVxa6uSmN8Ms8tf5uVarKhN5LSaFMnWFTLTRDwTbLZWptXCCPJi2Gj6su3ocDzrBtGRPMHZGw8an" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;Strong momentum with genuine market demand&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-3.7%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#74</span> <span class="t-sym">RACOIN</span> <span class="t-pnl neg">-78.3%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-23 00:37</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 00:37 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Oracle conviction</th><td>38/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 86), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 26/100 · 43 buyers / 8 sellers observed · organic 49% · top-10 hold 59% · dev sold during observation</td></tr><tr><th>Peak</th><td>+55.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 2m, realized <strong class="neg">-78.3%</strong> (-0.0078 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.39x</strong> our exit today (below where we sold; we sold at an implied ~$5,629 cap, now ~$2,171); highest print after our exit: ~$2,192 cap (<strong>0.39x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/kg77xn2BuXqPfxeQpAToRMWRyiMBVhn7YzEi52W1LBYRUY83Smpjh2nmsW6Fab95RrtePSnR54tskbB1sYEa3T3" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/REUibcHUsDt2HCxc9BpRYFY87e6fvmjRV2oKYxDri9TeTaKSqjJjvxYo4KGmuF4mh7sSXZMgAesN8kPYkpQebsS" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;RACOIN has a relatively genuine market with diverse buyers and sellers.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -30% but the realized loss was -78.3%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses. The model judged this 80% confident and was wrong; theses that cite &quot;memetic quality&quot; alone keep underperforming ones that cite crowd or creator evidence.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#79</span> <span class="t-sym">MCP</span> <span class="t-pnl pos">+10.6%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-23 01:24</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 01:24 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>llm_intel: the intel engine surfaced it, then the strategy’s LLM judge approved the entry</td></tr><tr><th>Firewall</th><td>warn (score 86), sell simulated on-chain before the buy</td></tr><tr><th>Model</th><td><code>fallback:ovh</code>, confidence 0.8</td></tr><tr><th>Entry intel</th><td>quality 37/100 · 108 buyers / 34 sellers observed · organic 55% · top-10 hold 32% · dev sold during observation</td></tr><tr><th>Peak</th><td>+38.6%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 61s, realized <strong class="pos">+10.6%</strong> (+0.0011 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.08x</strong> our exit today (below where we sold; we sold at an implied ~$32,977 cap, now ~$2,589); highest print after our exit: ~$45,600 cap (<strong>1.38x</strong> our exit, 1m candles); completed the bonding curve after our entry</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3hStaap3zHFtCh8mobqh6hJqcpT3wbjKbydwzWBCpt2AaL6HVbdiaQB7qYsTrhEUXex9N8Ag6d1aFLiYgFut1Sd" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/i7KvnkdqUjdT2zEWAVhb9e75f1z9PxnWfdPDc62eMTqRUxkVsHbuKnXFebNapDqWk9drBfqxKg22tBtjekkk3dE" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Model thesis, verbatim: &ldquo;MCP Genesis has a reasonably high market_realness score indicating genuine two-sided market activity.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Rode the pump to a +38.6% peak and let the 20% trailing stop convert it into a realized +10.6% instead of round-tripping to zero. The model's entry thesis was directionally right on this one.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The token printed 1.38x our exit price after we left, the closest thing to a shaken-out-early exit in the dataset.</p>
+</div>
+</details>
+</section>
+
+<section class="arm" id="arm-oracle-open">
+<h3>oracle-open <span class="mode-tag mode-rules">rules</span></h3>
+<p class="arm-line">
+ Wallet <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener"><code>54tv..v23M</code></a>
+ · <a href="/ledger/0846c27e-6258-4859-bc1c-3148d59951c5">decision ledger</a>
+ · 14 trades · 1 wins (7%) · net <strong class="neg">-0.0167 SOL</strong>
+ · avg winner +10.4% · avg loser -13.6% · median hold 30m
+</p>
+<p class="arm-cfg">Policy at entry: 0.008 SOL per trade · no take-profit · stop-loss -30% · no trailing stop · 30m max hold · Oracle conviction ≥ 35</p>
+<details class="trade" open>
+<summary><span class="t-n">#12</span> <span class="t-sym">ANSEM</span> <span class="t-pnl neg">-4.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 05:56</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 05:56 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>17/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 70), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 0/100 · 19 buyers / 15 sellers observed · organic 33% · top-10 hold 99% · dev sold during observation</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-4.5%</strong> (-0.0004 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,251 cap, now ~$2,171); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$5,915</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4urmiwqc4gFq5PP5V8TjwThx8nYKqvt252AkoxCyqysGuf4Xc6XzX8AGmLfJacPXFQMVm4Vm6t4SGTKN9qKdPcrK" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3Kw4z2AR1iKHakV7B67dZHkPHXcRRh2ETc2PCqK43Du2M8MxjEQausGyCn4uKwn6NjW5bzdPWzVqyfd4DMfjDttN" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $ANSEM on a new_mint trigger with 0.03% price impact; firewall verdict warn (score 70). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-4.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#13</span> <span class="t-sym">Jimothy</span> <span class="t-pnl neg">-57.4%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-21 06:26</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 06:26 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 68/100 · 52 buyers / 57 sellers observed · organic 76% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 15s, realized <strong class="neg">-57.4%</strong> (-0.0057 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.40x</strong> our exit today (below where we sold; we sold at an implied ~$5,411 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$5,208</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2fhiMgkQqdEXZQMA8zPFAoy96kjojCGcHpe8BNzdwgDyagj46am6x1qsvx9k9BCmTf4cqkYn8v3cLpqC6973vkwM" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4fgX4wHeA1CBiRWK23EZss6hKqDGBoLkR5fiBc6pKtwbM8LYeN2ouuTM92CbbbK3YFXibeeUPX4tFT6TnxGbtbea" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $JIMOTHY on a new_mint trigger with 0.02% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -30% but the realized loss was -57.4%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#14</span> <span class="t-sym">PJT</span> <span class="t-pnl neg">-7.4%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 06:26</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 06:26 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 31/100 · 4 buyers / 1 sellers observed · organic 51% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-7.4%</strong> (-0.0007 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,247 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,309</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/62RpqH3zs6bmf8i2ypCxbnkCji9CAW5bbJ87tTYv2MXUWJmq6qFcDviu8zX7GyFM3Y51bmCz12LHsj1b1JVZTyBH" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/w8Ee7nHW1N3scwph81MxhoZuqXPwapoenELTYVbFNuQwJj4TKbQdjqS5UXz7pWzqKmKGHtPQu2P5duFZque5eG4" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $PJT on a new_mint trigger with 0.03% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-7.4%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#15</span> <span class="t-sym">$DELU</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 06:56</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 06:56 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>17/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 7/100 · 2 buyers / 1 sellers observed · organic 31% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+4.2%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,348</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/27DNPxEVqapbffJppxWjNTbuzcqkmCzWzHiAs1igW24LjPEVmf6bXaHHqGoKqeoaGkXypXdbc3scCS4RpLBiH3dG" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/29NuFZb5JDi2LZLUXe2EFM6LWyLxGkNNZL1AtaQWRie8sZvtoWKJCP7M5GFZTzfwkwFUhWCSE8aqHrxrzBZh2s6q" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $$DELU on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#16</span> <span class="t-sym">Poze</span> <span class="t-pnl neg">-38.9%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-21 07:27</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 07:27 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>31/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 31/100 · 41 buyers / 40 sellers observed · organic 52% · top-10 hold 68% · dev sold during observation</td></tr><tr><th>Peak</th><td>+19.3%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 63s, realized <strong class="neg">-38.9%</strong> (-0.0039 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,335 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$4,629</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2jGREMdBPy7JLaYMk7fdo3kbfTsA2CrsNtM8BF9a5vQCphPzRVi8PJXJBU1YLQFQxSCvH1KDkAjUjEJ2SD86EShx" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/31kcdBSvdwrni4xzGuVAnWZyDZkmpkG9wRagz1Z2oJYy4eAJxvR7LJMFdboz6eeiXLzL35umo12ekqiAdcisJzpx" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $POZE on a new_mint trigger with 0.02% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Loss capped close to policy: -30% configured, -38.9% realized. The mandatory stop did its one job. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> Entry selection, not exit policy, is what loses here: the coin never traded above the entry quote for long.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#17</span> <span class="t-sym">MELON</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 07:28</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 07:28 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>19/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 30/100 · 3 buyers / 1 sellers observed · organic 45% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,218</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/FQBkeWFyJhZ2rAvngU7oBBrhVTsSkuCb1JXt6XFodKdd832nGXdTficshmvSjXUACKF7R2kqnd6cbTMMZqoGTKK" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3cDh5df2q5osyCztLAwqfX7UG3Ey9D2vaWtrUo816imWkcYbfs2KSa6LKwoUzkz42EczLQ4NgEVbYKjKkLLRfgJb" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $MELON on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#18</span> <span class="t-sym">TrippleBBL</span> <span class="t-pnl pos">+10.4%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 07:58</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 07:58 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>19/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 27/100 · 3 buyers / 0 sellers observed · organic 49% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+10.4%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="pos">+10.4%</strong> (+0.0010 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.36x</strong> our exit today (below where we sold; we sold at an implied ~$6,018 cap, now ~$2,170); highest print after our exit: ~$2,313 cap (<strong>0.38x</strong> our exit, 1h candles); lifetime label: <code>rugged</code>, ATH cap ~$2,523</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/tQbvqseBibJfwPrKtudRvtsSQH1Msjm7cEndKsdqiXGeDbtNXeHuDhcKiLxqPePbMi18qu24pPW911fGoXF4ejx" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2GjVbbQd15udFkbEgsubDDWxXdMJJQFEDbdHcnJUMnDepHnjBgkpw1VB5ki8fQ4hD7Q9HPs5nSfdJzFpWqFzuiBD" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $TRIPPLEBBL on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +10.4% in the green. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 30-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#19</span> <span class="t-sym">SKE</span> <span class="t-pnl neg">-32.5%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-21 08:29</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 08:29 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>20/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 42/100 · 15 buyers / 13 sellers observed · organic 64% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 29s, realized <strong class="neg">-32.5%</strong> (-0.0033 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.40x</strong> our exit today (below where we sold; we sold at an implied ~$5,462 cap, now ~$2,170); highest print after our exit: ~$2,208 cap (<strong>0.40x</strong> our exit, 1m candles); lifetime label: <code>rugged</code>, ATH cap ~$3,971</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4aGimro4N8M2H8p7jJU5njpWjViGSn6MsY7VPSfP1MUW3QXh7fXsviSfUwVvmcpBRGisEG4ngunn7w79f4io2dRa" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/9gmCti8m3HVEU6NFka6q1kvbWVPYX2UToxcuC8M8irHnJetH614J1ZfWTg8Xm5ekikmzpbPVVQeN17HojcYhVeY" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $SKE on a new_mint trigger with 0.02% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Loss capped close to policy: -30% configured, -32.5% realized. The mandatory stop did its one job. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The Oracle had this coin at conviction 20/100 at entry. The conviction gate that now exists would have skipped it entirely.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#20</span> <span class="t-sym">test</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 08:29</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 08:29 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>15/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 4/100 · 1 buyers / 0 sellers observed · organic 28% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,196</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/L8Wn5YRLKu5n1SH34s7hq3fVpbk7b5SiD5UMsoEqBN61PBDjXYxYdiK9G3PSr2u1dZuSbZC2keNUDkuf2Ltzvdt" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4Hv9qGK8yHV1vXHhtp7JV29yFA856bqghx4DuPJfB6sFBqrippawJKpXekSbSDpYn82QJ8Pcma7QE46mjCjGV2ek" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $TEST on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#21</span> <span class="t-sym">JARRETT</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 09:00</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 09:00 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>17/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 4/100 · 1 buyers / 0 sellers observed · organic 28% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,191</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3MGaXfJ1SuTMeaQ1VSvnAUNXaKDocRJNxh35MDr1vm7UeJfbeLmTfY9aDKspCQvFY4N58w3g98stTt8xFeUhkktR" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/RdV5P3qKsju4UhRX5u4ziKMk2rFCkDLb7DvJgvZpVmN4dbND4MmM65tuVhz5hQkTrW6jNyUsoKCv39CMaPKppzE" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $JARRETT on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#46</span> <span class="t-sym">MrSue</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 00:00</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 00:00 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>19/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 25/100 · 2 buyers / 0 sellers observed · organic 36% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0003 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2tboUwQVWFUTw18rE66izQtK6RicGRhQSyR6m3AWSY7WxzHYwYATA7bTQK7KwysBufsB4d7VoouSNeFib9tLyKti" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/YqA5YFXeyMAapXBnL9y6u2fsVAECTnjCmeS4QymaP8Zesdy4xGiwQhwneBRmZA2dtxEmBxofLpSKFve18v7Fx4q" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $MRSUE on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#48</span> <span class="t-sym">FLIPPENING</span> <span class="t-pnl neg">-18.7%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 00:30</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 00:30 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 0/100 · 6 buyers / 3 sellers observed · organic 33% · bundle risk 67% · top-10 hold 100% · dev sold during observation</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-18.7%</strong> (-0.0019 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,247 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/42dx4KkXYHWWGhBwGzrRLNPZDKCrMe24Uwo4wFyYj66MnYEVrYVhkEur9mHeXkgEfqDgh2KNeytP5gaGSB57Fo7h" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5opN7ydf5bVnYetJLHf6Gyz9C6f6htWsCDXrCYXRnAdVEiM2ya6hRWpRmQnUSne9DRa13GBUJ5uA7MKoyWG12Uo1" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $FLIPPENING on a new_mint trigger with 0.03% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> Worst kind of exit: the coin bled to -18.7% slowly enough that no stop fired and the clock, not a decision, ended the trade. This is the gap between the stop-loss and the timeout that a mid-hold health check should cover.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#72</span> <span class="t-sym">Jrool</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-23 00:00</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 00:00 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 24/100 · 2 buyers / 0 sellers observed · organic 36% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,251 cap, now ~$2,171); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2FiYZi1GkErcQ6QWuzBCjYYwPbfvd4P2GCvheLqZfys4XcWJvT7RA4Ca3znuwZCN9dciDXaLHT8e6Bier5UxB8fD" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3TL94ZrKC3m659bMrRdNNR3pfkweUy89LGN3FaatymKSdfekryiC3edpd6sEJwAeg2Swa26ZBxs16ZVyPNSP5GPB" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $JROOL on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#77</span> <span class="t-sym">Free</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-23 00:30</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 00:30 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>17/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 4/100 · 1 buyers / 0 sellers observed · organic 28% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,248 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2CR2E5tPNdpVzjbQ7uJhZ4EeG7C3tF4ztip4gW2yPS2kYxc9VqLzaZmivtfuwsE3ypSwoRzjVcLXxUT1daFTgKSV" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3XRyTcx49Ah2CuPsTYZfKhqU3G3v4sFZPhJjjAWby7iBzrXrfF7h5vDPegvza4j2eWxM3B2XpFfFdGTNZJBv9r1Q" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $FREE on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+</section>
+
+<section class="arm" id="arm-rules-proven">
+<h3>rules-proven <span class="mode-tag mode-rules">rules</span></h3>
+<p class="arm-line">
+ Wallet <a href="https://solscan.io/account/3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc" target="_blank" rel="noopener"><code>3334..Krsc</code></a>
+ · <a href="/ledger/4c0e4d18-0544-4c95-a0db-a16896b029be">decision ledger</a>
+ · 5 trades · 1 wins (20%) · net <strong class="neg">-0.0183 SOL</strong>
+ · avg winner +42.4% · avg loser -19.8% · median hold 2m
+</p>
+<p class="arm-cfg">Policy at entry: 0.05 SOL per trade · no take-profit · stop-loss -30% · trailing stop 25% · 30m max hold · socials required</p>
+<details class="trade" open>
+<summary><span class="t-n">#2</span> <span class="t-sym">BITS</span> <span class="t-pnl pos">+42.4%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-19 02:26</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-19 02:26 UTC, committed 0.05 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>15/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 4/100 · 1 buyers / 0 sellers observed · organic 28% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+46.5%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="pos">+42.4%</strong> (+0.0212 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.08x</strong> our exit today (below where we sold; we sold at an implied ~$27,376 cap, now ~$2,206); highest print after our exit: ~$15,257 cap (<strong>0.56x</strong> our exit, 1m candles); lifetime label: <code>rugged</code>, ATH cap ~$15,257</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3Y6NqS8CV3K1j5sBZYsuQjpipZeY2wckCz3h99vGA6ZbwJgMpeUjkVm43zffeV52Kc2jWRUn4d4rzcTxoCEGrzRY" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/mLmGA7FeHFUEDdQagavVZCH2aExmMssjsVxWiRCSxRZwvbxDS1Xfnvan63ab5FkrKnQ7koEu4yxwgVJYXajeyhH" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $BITS on a new_mint trigger with 0.05% price impact; firewall verdict allow (score 100). Committed 0.0500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +42.4% in the green. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 30-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#4</span> <span class="t-sym">looong</span> <span class="t-pnl neg">-26.1%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-20 22:52</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-20 22:52 UTC, committed 0.05 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 46s, realized <strong class="neg">-26.1%</strong> (-0.0130 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.09x</strong> our exit today (below where we sold; we sold at an implied ~$24,085 cap, now ~$2,247); highest print after our exit: ~$13,713 cap (<strong>0.57x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4jRHHS4ZJRdkNh7aPytynYEMBPdkewgB6wq1zhKiFhBR3nZb4XqsGECjkTaLNA2tjpDmcyQSTNsq7JurSDdhBx1v" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4JUpg2KPJ4WZQ1nKqjASfm6xEPyMpERAwWbp2F9gQ6tfTwm8Df6AZXa51ChhNqkW36HSozCpj1XHyK7LFfmEX6DR" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $LOOONG on a new_mint trigger with 0.03% price impact; firewall verdict allow (score 100). Committed 0.0500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +0.0% but the 25% giveback landed at -26.1%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#8</span> <span class="t-sym">Meowpin</span> <span class="t-pnl neg">-14.3%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-21 01:41</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 01:41 UTC, committed 0.05 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>25/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 75/100 · 35 buyers / 26 sellers observed · organic 78% · top-10 hold 97%</td></tr><tr><th>Peak</th><td>+28.3%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 29s, realized <strong class="neg">-14.3%</strong> (-0.0072 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.11x</strong> our exit today (below where we sold; we sold at an implied ~$19,386 cap, now ~$2,174); highest print after our exit: ~$6,809 cap (<strong>0.35x</strong> our exit, 1h candles); lifetime label: <code>rugged</code>, ATH cap ~$12,844</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3zkWZ4gftRbFbqWkNvRRrRNkB2CJuM6FKpBY97n4GpF7dtRLYRM46yDLxNThFjXwMYKppioiSxwJneRu6VxLd3YB" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3JYvFAF8LeyhsKwufzkdWC4DGT9wEyzXcWmni5vsSAtiNc2EHw1oP4WH1sRFcN71PMsi1YxvvqA5yayDrBhMWrLB" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $MEOWPIN on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +28.3% but the 25% giveback landed at -14.3%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#11</span> <span class="t-sym">Clouseau</span> <span class="t-pnl neg">-13.4%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-21 03:56</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 03:56 UTC, committed 0.05 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>32/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 76/100 · 68 buyers / 36 sellers observed · organic 79% · top-10 hold 88%</td></tr><tr><th>Peak</th><td>+24.8%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 2m, realized <strong class="neg">-13.4%</strong> (-0.0067 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.10x</strong> our exit today (below where we sold; we sold at an implied ~$22,143 cap, now ~$2,184); highest print after our exit: ~$9,861 cap (<strong>0.45x</strong> our exit, 1h candles); lifetime label: <code>rugged</code>, ATH cap ~$14,055</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2XVVverSj1rhgMxb139JYsoKK8LYA1JJ6wjCHPg3qipi2xswwrGiV2ZbnMVjS7rPAFiEvCn5x3y2ZCLZUNauiJMU" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/q8T3WtDYN1YKqT3XhkFBUG8XJse6gGCxuExaB8cBSeWVxYkocB3pbZMeYAsb1B29rXDrEUkXwCKeZTpPX1hr4qT" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $CLOUSEAU on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +24.8% but the 25% giveback landed at -13.4%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#23</span> <span class="t-sym">AG</span> <span class="t-pnl neg">-25.3%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 12:54</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 12:54 UTC, committed 0.05 SOL</td></tr><tr><th>Trigger</th><td>new_mint: sniped seconds after the launch appeared on the live pump.fun firehose</td></tr><tr><th>Oracle conviction</th><td>28/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 63/100 · 26 buyers / 8 sellers observed · organic 74% · top-10 hold 95%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 32m, realized <strong class="neg">-25.3%</strong> (-0.0126 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.46x</strong> our exit today (below where we sold; we sold at an implied ~$25,467 cap, now ~$11,594); highest print after our exit: ~$14,830 cap (<strong>0.58x</strong> our exit, 1m candles); lifetime label: <code>pumped</code>, ATH cap ~$14,830</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/oCLrRvdUt1oGYyu5C8BB7d2GW81LygXAUdQJG9XjAMRPQH7jKWf3E6EKgbK5j4Y7Ew6NzxViiAkDn6rpJg5vYcK" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/eU6JTMcJzk2khdWX2YAJyt37F3p5gTt4E22p6RxS4M625tZhqkgTaFgT8eCeXmAvfNLn5MKv7Hkn8JbYiYJLPX4" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $AG on a new_mint trigger with 0.03% price impact; firewall verdict warn (score 84). Committed 0.0500 SOL expecting a profitable exit.&rdquo;</blockquote>
+
+<p class="t-verdict"><strong>What should improve:</strong> Worst kind of exit: the coin bled to -25.3% slowly enough that no stop fired and the clock, not a decision, ended the trade. This is the gap between the stop-loss and the timeout that a mid-hold health check should cover.</p>
+</div>
+</details>
+</section>
+
+<section class="arm" id="arm-boost-ride">
+<h3>boost-ride <span class="mode-tag mode-rules">rules</span></h3>
+<p class="arm-line">
+ Wallet <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener"><code>3yjx..aQwt</code></a>
+ · <a href="/ledger/0b148e48-d49c-418f-b0ce-a0b95f9b223e">decision ledger</a>
+ · 31 trades · 15 wins (48%) · net <strong class="neg">-0.0413 SOL</strong>
+ · avg winner +14.9% · avg loser -39.8% · median hold 3m
+</p>
+<p class="arm-cfg">Policy at entry: 0.01 SOL per trade · take-profit +20% · stop-loss -15% · trailing stop 8% · 4m max hold</p>
+<details class="trade" open>
+<summary><span class="t-n">#27</span> <span class="t-sym"><code>ocFkqj…</code></span> <span class="t-pnl pos">+5.2%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 19:23</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 19:23 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+5.2%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 4m, realized <strong class="pos">+5.2%</strong> (+0.0005 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$34,281,069 cap, now ~$1,620); highest print after our exit: ~$21,212,439 cap (<strong>0.62x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4Y7uJ6aQaNygFc714eJP5eN9erKcAjFpmUmxs2qN2a5Vyn2CVwZPFwFjTFHiTkkouVSs6BFTJCUti9GFXNUHnujD" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3EgBaX1KERDz2WckPDhgcptYPtSreaz5jHWR7YAU5QTL8eDWdfrA8Y5tdEBBW7DHUeWS3Eb4spKpnNrhZKTuV7NK" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $OCFK on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +5.2% in the green. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 4-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#30</span> <span class="t-sym"><code>xjcfSQ…</code></span> <span class="t-pnl pos">+4.7%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 19:28</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 19:28 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+4.7%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 4m, realized <strong class="pos">+4.7%</strong> (+0.0005 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$40,035,795 cap, now ~$1,498); highest print after our exit: ~$1,503 cap (<strong>0.00x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/s8LNsqTww9Af4kXWcdS5YwrjXG5pb3M6gAW4TKmH5dGmzS8AoXkYyFJcdcNUAGw2tx8TE5VLcDcRZe5STaSUD5G" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/8iaM7W9cQq4hyRpZaRNvXdFMKtHm2vKugL6dB8k9EYxAPJuwFmUsKQ4sFHGMnaTvG2ZojUapX5objYEGwfuJM7t" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $XJCF on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +4.7% in the green. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 4-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#31</span> <span class="t-sym"><code>Ux3UY8…</code></span> <span class="t-pnl pos">+20.9%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-21 19:45</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 19:45 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+20.2%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 3m, realized <strong class="pos">+20.9%</strong> (+0.0021 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$2,120,289 cap, now ~$1,388); highest print after our exit: ~$1,402 cap (<strong>0.00x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/66UJNgHbCRqP1bs4LCVMhQefNtmSw3ohSL1ZERaF4rR4zBe4K68WNa2E4vZN2J9r86ZNsqHwuqAHuCAWE86jVHwq" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5qDWLuRXL5qvoS4ofaUHDzTpnft2MiQvcfvfTAYDgEtNVBRHvH3VmL6BNbe7Xa4o3g8si71J1ytCKaDWV5dm2orB" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $UX3U on a graduation_ride trigger with 0.99% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +20% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#32</span> <span class="t-sym"><code>2UDry5…</code></span> <span class="t-pnl neg">-84.3%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-21 19:49</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 19:49 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 45/100 · 0 buyers / 0 sellers observed · organic 45% · top-10 hold 0%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 6s, realized <strong class="neg">-84.3%</strong> (-0.0084 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.18x</strong> our exit today (below where we sold; we sold at an implied ~$10,177 cap, now ~$1,814); highest print after our exit: ~$1,914 cap (<strong>0.19x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/d8v8pErPe2prAMrMtpTNnkpeYNgCADDQa3wr4NsEaBSuTMrYtqj4ZHfJgtticVusvpHcEtMaKU4Aj2A6DX4Svvv" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5Cbn5HP4tQprrXNM6bSGDCfFXYu88y1c86GisvtJcJyvRPbqyeKCWob6UJhANErNd15pkFM3FqK1Pq2D1w7qsNzX" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $2UDR on a graduation_ride trigger with 1.25% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -15% but the realized loss was -84.3%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#37</span> <span class="t-sym"><code>DBrD6t…</code></span> <span class="t-pnl neg">-15.8%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-21 20:42</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 20:42 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>16/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 4/100 · 1 buyers / 0 sellers observed · organic 28% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 5s, realized <strong class="neg">-15.8%</strong> (-0.0016 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.01x</strong> our exit today (below where we sold; we sold at an implied ~$137,916 cap, now ~$1,489); highest print after our exit: ~$1,577 cap (<strong>0.01x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2UwRFmCefeh2K6hbjVjJqdPouvA9yqhL6bA5eh88yz2jx2pvTUyaBt1419GfY9aQ1XAkVgFdExxPK9yy8tNh9ZZg" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5VgZ33RyUfEtGNdstchhxQjqxU3jUkR4F2395gcbQYeWWUuRX9ZF2NFSzCCmY9coB17dGMHqZyBb3MXgU6kzkEnR" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $DBRD on a graduation_ride trigger with 1.19% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Loss capped close to policy: -15% configured, -15.8% realized. The mandatory stop did its one job. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The Oracle had this coin at conviction 16/100 at entry. The conviction gate that now exists would have skipped it entirely.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#41</span> <span class="t-sym"><code>HMimvR…</code></span> <span class="t-pnl neg">-20.1%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-22 00:04</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 00:04 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 50/100 · 3 buyers / 0 sellers observed · organic 62% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 8s, realized <strong class="neg">-20.1%</strong> (-0.0020 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.01x</strong> our exit today (below where we sold; we sold at an implied ~$251,303 cap, now ~$1,423); highest print after our exit: ~$1,437 cap (<strong>0.01x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3cPJ1iYDgjkD574od5rTZQDJdUfzPwcYco5x6UQ69NQNWA1sQ3SVDXe138mVfXwq5MLoXH3hSH5JkviSWY3P3oQc" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/W8d92ARqJdqWNSKzM7P7CxxDLQfAfgvSEzJSazbnwk5E5QdBkdYYENTBNfjNMmiKeNZKxGKGuaTszCsfF64kTpu" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $HMIM on a graduation_ride trigger with 1.14% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Loss capped close to policy: -15% configured, -20.1% realized. The mandatory stop did its one job. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The Oracle had this coin at conviction 21/100 at entry. The conviction gate that now exists would have skipped it entirely.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#42</span> <span class="t-sym"><code>Y4HEU5…</code></span> <span class="t-pnl pos">+11.7%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 00:07</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 00:07 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+11.5%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 4m, realized <strong class="pos">+11.7%</strong> (+0.0012 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$27,595,866 cap, now ~$1,480); highest print after our exit: ~$1,514 cap (<strong>0.00x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4vUqfx4Lu9GEjMWrzQkQ2Yk3QkHfJSwEoBNdvYTngY2YidtNgAWsWiqguDnzBoJZUQe4pEY9yG3TtXnnVASfVYgz" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4x9YDUehcEG3d6U1KE21Z3N1ZiZA7t6FUeK5K6ipwreEtzmhpiMTfTXi6u2aD1SKep2hwVyf8cekwCGrdZFuyYc6" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $Y4HE on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +11.7% in the green. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 4-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#47</span> <span class="t-sym"><code>aQzS8b…</code></span> <span class="t-pnl pos">+12.0%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 00:46</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 00:46 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+12.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 4m, realized <strong class="pos">+12.0%</strong> (+0.0012 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$3,974,392 cap, now ~$1,382); highest print after our exit: ~$1,955,006 cap (<strong>0.49x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4w4XVx5KbdofW4we3kHGaGJgj6ngi1RHZgcBBdGokZHeVUdSP8YzDjoUpgGy4a5yGKUn1iY6yV6Gzahj51Rs563g" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5mEEYxbqWVAKrQCqB9GEdr3SzydFXzMzNfSuisEfH9J3xJ2G98jtiNTCZVRLVUNN25ifL5ZKcYfBt7RGNkJB6ZB4" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $AQZS on a graduation_ride trigger with 0.89% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +12.0% in the green. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 4-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#50</span> <span class="t-sym"><code>JMBush…</code></span> <span class="t-pnl pos">+5.0%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 01:54</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 01:54 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+5.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 4m, realized <strong class="pos">+5.0%</strong> (+0.0005 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$30,472,559 cap, now ~$1,389); highest print after our exit: ~$30,818,920 cap (<strong>1.01x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4ZjXauYYseAXEJkbARxrvmQBtZXwCDzPUaJNB8mJS6EUySFhJsXL6r21A6dXV9cx1d9fFaaCLSJz5BZPKHk6NgcY" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2ZfioUgWLaVB7aKfHmW33otcXYKah5H1xhF82oVg8sLSV5EM3NyFFPHV2UKMMbDwgCmmzkA1dSoTD9e9t46NnoNU" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $JMBU on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +5.0% in the green. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 4-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#51</span> <span class="t-sym"><code>yMDueA…</code></span> <span class="t-pnl neg">-99.9%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-22 02:01</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 02:01 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 44/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+4.6%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 3m, realized <strong class="neg">-99.9%</strong> (-0.0100 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.04x</strong> our exit today (below where we sold; we sold at an implied ~$34,770 cap, now ~$1,488); highest print after our exit: ~$1,569 cap (<strong>0.05x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/4KQJW6VKKeqGzE4fbLhSbGx2DmHAssNsjdRWNypQMRbQsrcPou9huAqPo3jg2EqiwZt1pobykMhAL9V67dw3KREB" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5PHb23YAMmSiVa5ggNNVveb8eu6nKfBaVeFV7EKWKrdzYyinStmM6kUyW2sAS5SV3TcAsoQfJqKbkaY44racVTws" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $YMDU on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -15% but the realized loss was -99.9%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#53</span> <span class="t-sym"><code>6dAqWB…</code></span> <span class="t-pnl neg">-22.0%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-22 02:11</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 02:11 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>18/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 22/100 · 5 buyers / 0 sellers observed · organic 50% · bundle risk 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 18s, realized <strong class="neg">-22.0%</strong> (-0.0022 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.02x</strong> our exit today (below where we sold; we sold at an implied ~$83,716 cap, now ~$1,516); highest print after our exit: ~$1,537 cap (<strong>0.02x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/58JXtLd485udrvbWJ4F5mCEbSaanP1WS4XETQAEaqYXdoi3SoBMwEVgr5tPphEm7Y4AaJRSV4uCtswFUAei82TQo" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3qGmGeLb7WhepQjLvCkbpR1LpXv66La2QGEzTinFmqiGWM7UxaoRnyEJKZwjGEDkZ1iW5DzdRY2CeHDVFD7FaTGo" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $6DAQ on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Loss capped close to policy: -15% configured, -22.0% realized. The mandatory stop did its one job. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The Oracle had this coin at conviction 18/100 at entry. The conviction gate that now exists would have skipped it entirely.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#55</span> <span class="t-sym"><code>fxppSy…</code></span> <span class="t-pnl pos">+11.3%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-22 02:26</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 02:26 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+11.3%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 4m, realized <strong class="pos">+11.3%</strong> (+0.0011 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$49,443,662 cap, now ~$1,733); highest print after our exit: ~$2,458 cap (<strong>0.00x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3DocFMRiSsvWXEAZVqFU2diBbJoi5JBXkdTe9twFjDwbkYxLhsx2AjZ5xkyMjY2Pwh2375g43Rsv31nmHtUyU58" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2jDySRnZ61Kg7G2x11sgcXVepEpkLWuDPWY5RvAmWQzFHJgAnWjE93WE2Fh9Un9WpnioH5tHjduqLMSMTKNvtwVi" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $FXPP on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +11.3% in the green. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 4-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#56</span> <span class="t-sym"><code>Awyjqw…</code></span> <span class="t-pnl neg">-17.4%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-22 02:43</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 02:43 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 50/100 · 3 buyers / 0 sellers observed · organic 62% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 7s, realized <strong class="neg">-17.4%</strong> (-0.0017 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.01x</strong> our exit today (below where we sold; we sold at an implied ~$257,383 cap, now ~$1,426); highest print after our exit: ~$1,439 cap (<strong>0.01x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3V8VLJdCZRR8FnfFG6Vn8kHqsYEhTZnDcAiCkuNYQZaq437Cke3CjhdpGa7pqjahqLyCCsg3bWz53C4jC5XfZCNY" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/h27tvPgWiA6hLYQ9jWJEYHv1XG43qXGS9V7TpHCQxQuyv43mz3fdvqkpGNUtiWcFhQSEJE34ZRZHYCqAcePihKr" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $AWYJ on a graduation_ride trigger with 1.14% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Loss capped close to policy: -15% configured, -17.4% realized. The mandatory stop did its one job. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> Entry selection, not exit policy, is what loses here: the coin never traded above the entry quote for long.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#57</span> <span class="t-sym"><code>5V3eh6…</code></span> <span class="t-pnl neg">-98.7%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-22 03:13</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 03:13 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 50/100 · 3 buyers / 0 sellers observed · organic 62% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 8s, realized <strong class="neg">-98.7%</strong> (-0.0099 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.90x</strong> our exit today (below where we sold; we sold at an implied ~$4,051 cap, now ~$3,644); highest print after our exit: ~$5,005 cap (<strong>1.24x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/32mY5um3D1vCQQmXK5s5ETNwhUahAEi3s1a2e2cBuZNckD8jNfc9RkrWiH4ivA178NNgUszrt77NY1MG9TaDHesR" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3oNCcMqVqY1tMW88mQvExKE9J6Q7RJSozWgFX2meBh1RN4e7rpap3UFUs27HgaXgCJCRm49Jcq1F5S9xGvrvysW" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $5V3E on a graduation_ride trigger with 1.14% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -15% but the realized loss was -98.7%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#58</span> <span class="t-sym"><code>ChRFYk…</code></span> <span class="t-pnl neg">-93.2%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-22 03:37</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 03:37 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>22/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 50/100 · 3 buyers / 0 sellers observed · organic 62% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 9s, realized <strong class="neg">-93.2%</strong> (-0.0093 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.56x</strong> our exit today (below where we sold; we sold at an implied ~$6,737 cap, now ~$3,771); highest print after our exit: ~$3,795 cap (<strong>0.56x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3tdD8wmEP4db8wJi4q4JRfeezLXbsKuAHwiYmimdtc1FcWnNcZbF9iv8K9cJ4gCeRvaQEU4gUaqYPdPxwu9WEasx" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/dKjaAZ8HnwKH2cJJNzmF35kquGR7UQiWAGo8feV7qcDUxCbvQt5q6X53CnKPERhFoaUcrAWPaeT7KWprtMn5p1v" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $CHRF on a graduation_ride trigger with 1.14% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -15% but the realized loss was -93.2%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#59</span> <span class="t-sym"><code>qFJmT1…</code></span> <span class="t-pnl pos">+20.4%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-22 03:51</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 03:51 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+20.4%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 3m, realized <strong class="pos">+20.4%</strong> (+0.0020 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$53,484,541 cap, now ~$1,761); highest print after our exit: ~$33,419,046 cap (<strong>0.62x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/5fRgUcLKx1mM1hS23qTo9bQ4Ng2TqjNw8CZVCX8pBN8eqfQXSxLZGVSPiQVaAWzem9Spdhd5ZWiYT2jiqMvSmHn9" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4Jyb4bBv6GodJLxFvt5xsmxrDKmXtUpU7wSHEsSgueeZyyDc9DVgCPev8bnpUqkkUb2mU5cf2UrVWvCzC8M3EVYm" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $QFJM on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +20% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#60</span> <span class="t-sym"><code>4Wkuhs…</code></span> <span class="t-pnl neg">-8.7%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-22 03:59</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 03:59 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>19/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 22/100 · 5 buyers / 0 sellers observed · organic 50% · bundle risk 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 19s, realized <strong class="neg">-8.7%</strong> (-0.0009 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.02x</strong> our exit today (below where we sold; we sold at an implied ~$95,125 cap, now ~$1,511); highest print after our exit: ~$1,520 cap (<strong>0.02x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3mjBVV6Ar7aVpw8HryfMWhPe1Ag2kC3Vcdd3XJXsb6cNfqP7cm6w1YGFv4ssWmgTHW7BmrHXTCAdZrdECyvnTNxd" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2dh4DKfXFXfVP6mbYTpETxqJxv1aSkctrXHcx9esMGmirESBQv8RVhPxhqGPGFLPHhSQ8uYZJJWnpEpeCgV8jvyh" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $4WKU on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +0.0% but the 8% giveback landed at -8.7%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#61</span> <span class="t-sym"><code>u8oLcb…</code></span> <span class="t-pnl pos">+20.2%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-22 04:03</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-22 04:03 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+20.2%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 4m, realized <strong class="pos">+20.2%</strong> (+0.0020 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$48,359,811 cap, now ~$1,842); highest print after our exit: ~$1,841 cap (<strong>0.00x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/39VfU4KdMGanbmgDDtQuP6R1icwf9qPpgwxysDxuWyUvSbiRtJGpqYQQmdxvy8SEatYt6FEf7G1Efxtp6gJ2epWe" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4hCvfzKyWs2TtxBE2vfmk6P4fMuCTMRUKi2gdVNmSLqHu9WhgwYYucJRyrVAXn5PpiAYWSDDN2W32vC8edxcWs7J" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $U8OL on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +20% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#71</span> <span class="t-sym">Aevon</span> <span class="t-pnl pos">+2.0%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-23 00:13</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 00:13 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+4.8%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 4m, realized <strong class="pos">+2.0%</strong> (+0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.03x</strong> our exit today (below where we sold; we sold at an implied ~$80,495 cap, now ~$2,634); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/28toKm1e1RGikeTQiwqPSe7nnkQ9GhhSaJb1jPbLPmBU7XW7h7tfMoctNe6QvqH3pRmQpUAc8Eekwj8nzsGPaBb6" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2FNvyX9kFxk8g7TzTEcqjUVeU6yideRWtT8Yq4ZPcJdoNFAGRpyM9ufA4SFeRGDJf7GFoAQKTxrituHBvEZxMGov" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $AEVON on a graduation_ride trigger with 1.25% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +2.0% in the green. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 4-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#73</span> <span class="t-sym">Walter</span> <span class="t-pnl neg">-2.3%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-23 00:35</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 00:35 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 15s, realized <strong class="neg">-2.3%</strong> (-0.0002 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.08x</strong> our exit today (below where we sold; we sold at an implied ~$74,229 cap, now ~$6,027); highest print after our exit: ~$31,026 cap (<strong>0.42x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/58S3WgMK9fKcEpbG8Dm7xcG2TYYiw62TBKVSyezgJ79ST3pGfaXEsr8drZAoXLgpRQtxAweNPoj2B8GgJYodRh2r" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3A9umJdUAK68QAjgWLNLmj37TWzfFqttASbbY6YrL6REyyeBEvuGoPGYXp6ZhycyWHGNt9dJ4NwtHdcQfkU3dteL" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $WALTER on a graduation_ride trigger with 1.25% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +0.0% but the 8% giveback landed at -2.3%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#75</span> <span class="t-sym">VFX</span> <span class="t-pnl pos">+18.7%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-23 00:37</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 00:37 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+20.7%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 3m, realized <strong class="pos">+18.7%</strong> (+0.0019 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.05x</strong> our exit today (below where we sold; we sold at an implied ~$99,353 cap, now ~$5,183); highest print after our exit: ~$46,155 cap (<strong>0.46x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3AXFqqv4RMdYiTZeem68GWRzzxFgLK5X2kHqgPnEaaDpV7AiXNKnSgRGrv7sQadabEMM5iWzwpTC9eiESTYhM6nW" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4GL73TJ1Fo6dJyk97cRAn8qNQPxDxRJh6z567b21BEbfUhzvJDqAJ7ym7EMinyBCoNiZMufq77nKoBvvrKLwkgt6" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $VFX on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +20% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#76</span> <span class="t-sym">FLL</span> <span class="t-pnl pos">+20.0%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-23 00:45</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 00:45 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+20.0%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 3m, realized <strong class="pos">+20.0%</strong> (+0.0020 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.03x</strong> our exit today (below where we sold; we sold at an implied ~$99,101 cap, now ~$3,467); highest print after our exit: ~$46,459 cap (<strong>0.47x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3cyMrLSUm4YQnm8yCDy9vy9MsrkyX25kjNv2mp6doAo4zRY42U67XwzpyPMWhmK2eJxkL1DCkmm4H9XwbwX36k96" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3XKYRe9Vgj2cgUGuqw94DugWrkfcmzYM5rNN8Zzfiw74zsr6QJ6cmPqQr7UYnMRJPoPz6cEoWjBGV5SrCcicM5Z" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $FLL on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +20% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#80</span> <span class="t-sym">RWA</span> <span class="t-pnl neg">-35.6%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-23 01:32</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 01:32 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+10.6%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 2m, realized <strong class="neg">-35.6%</strong> (-0.0036 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.04x</strong> our exit today (below where we sold; we sold at an implied ~$78,671 cap, now ~$3,108); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2oyvX6YjMkLqaoPhji53zswWTxdWkZtPSyQEj9juN1JLmK16xTrV9LkofHTkDbigEB2KpYZ1PRCVwmPRU1vPRkAn" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2wYSo99Em8hooTAoQYUQsQSU2uUsXjSwGLqBmXL1dp6iUmeRLQLhJNe1P2xtSWt3siSwNPCkRwFQdyz1Ug2C3C3a" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $RWA on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -15% but the realized loss was -35.6%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#83</span> <span class="t-sym">CWARDIN</span> <span class="t-pnl neg">-32.8%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-23 02:04</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 02:04 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+16.8%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 3m, realized <strong class="neg">-32.8%</strong> (-0.0033 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.04x</strong> our exit today (below where we sold; we sold at an implied ~$82,366 cap, now ~$3,038); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/48XKkBjnq8FDUGvfghhh3sC1e6ehryBaGzieGXYkpH7ZBHfWj1SJdeSnHNeEnzCA47x6KUZBvvSSwSazTXjz1hmW" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/61X8qdSnxrfAJgSPn9BQNwjfrVdeh98GWeL4Qy3ukiEDmCTYyqiUJziWVnJAPHFym6QmfkdYeRbu5vqfPqVuchEx" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $CWARDIN on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -15% but the realized loss was -32.8%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#84</span> <span class="t-sym">BENNER</span> <span class="t-pnl neg">-34.3%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-23 02:10</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 02:10 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+15.9%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 3m, realized <strong class="neg">-34.3%</strong> (-0.0034 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.04x</strong> our exit today (below where we sold; we sold at an implied ~$82,120 cap, now ~$3,038); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/31VK6XqCndHXPBgwpGKSroSsVzSVbkWCqLYJKnFhdVbtpU8FqSpVgiMnu8gXTbKRp4WTHf3LhGJrtt4VNGqxUvpC" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5tPMbwqDNAcpRbL58QPFVdBthf2Ym5cRpg5sfXDhrUnzRwHUx4QH8Pom8hDLJQ6zW3LSHpeRiqD3NFZ1oPM2rqVq" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $BENNER on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -15% but the realized loss was -34.3%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#85</span> <span class="t-sym">AGIGUY</span> <span class="t-pnl neg">-34.4%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-23 02:17</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 02:17 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+15.9%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 3m, realized <strong class="neg">-34.4%</strong> (-0.0034 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.04x</strong> our exit today (below where we sold; we sold at an implied ~$83,683 cap, now ~$3,029); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3KTFL7GNpvXGb7tn8iV4rQkCUtso6Nm4RDyYTwd9GiW5rTgLLXKgPcVRNwhdNCPPLgpajBUYBvjDu8j9UhNyxtYX" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/5k6PNTxfiK3WG55PXv6hvTMpHou1sN31Z9rtRMnS5izrvJ5DfBYRTm7ceeQ4pJ6aFiVxQPTN6BfYEhFGuhii7QWK" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $AGIGUY on a graduation_ride trigger with 1.19% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -15% but the realized loss was -34.4%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#86</span> <span class="t-sym"><code>DrqyFF…</code></span> <span class="t-pnl pos">+7.7%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-23 02:21</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 02:21 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 43/100 · 3 buyers / 0 sellers observed · organic 60% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+7.7%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 4m, realized <strong class="pos">+7.7%</strong> (+0.0008 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.00x</strong> our exit today (below where we sold; we sold at an implied ~$47,830,590 cap, now ~$1,722); highest print after our exit: ~$51,051,658 cap (<strong>1.07x</strong> our exit, 1h candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/z1mbwTwxWJNJXY7KXJxUDXbjRmrtm7qv4dcTWPnDJWA2XiujhT91i8Exy5NC33tnnqkuEj9XDyoWJhPWzxWx45q" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4HuA8qYdb3UpBDviuo3WG5d1dnJqKPkBF2NfeH3RWUHXCyRFGbbSphHUGGyH8SJUSJhBp5tw45aG1tXT54mFTtWK" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $DRQY on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Closed +7.7% in the green. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> This exit was luck-shaped: the 4-minute clock expired while the position happened to be up. Nothing locked the gain in. A reachable take-profit or a momentum-fade exit converts this from luck into policy.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#87</span> <span class="t-sym"><code>moHcoC…</code></span> <span class="t-pnl neg">-6.4%</span> <span class="t-exit">trailing_stop</span> <span class="t-when">2026-07-23 02:26</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 02:26 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Oracle conviction</th><td>21/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 50/100 · 3 buyers / 0 sellers observed · organic 62% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+1.9%</td></tr><tr><th>Exit</th><td><code>trailing_stop</code> after 2m, realized <strong class="neg">-6.4%</strong> (-0.0006 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.01x</strong> our exit today (below where we sold; we sold at an implied ~$230,800 cap, now ~$1,459); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/dydCoBLV6cARya6osK5nTK2Boje8WxiLPzDrjRVYhNz7ksEoTkDSXm452UBj23sANT4iP2etgXK2tt53sNzhwqR" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2AW5rHThYCs2vhr7svsVMoMANf4KXjyJDZAbpT1MuoTUAfg5ahdhyWcEQfKwYjDLpXuc2AnhxPWLyAPx2TLteUwi" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $MOHC on a graduation_ride trigger with 1.19% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> The trailing stop fired and got out with liquidity still present. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The trail armed below breakeven: the position peaked at +1.9% but the 8% giveback landed at -6.4%. Arming the trail only after the position is green would turn this exit into a scratch instead of a loss.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#88</span> <span class="t-sym">HANU.p</span> <span class="t-pnl pos">+42.9%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-23 02:41</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 02:41 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+20.3%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 5m, realized <strong class="pos">+42.9%</strong> (+0.0043 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.04x</strong> our exit today (below where we sold; we sold at an implied ~$118,030 cap, now ~$5,081); highest print after our exit: ~$5,242 cap (<strong>0.04x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2LxjcHmYw1GJgFMmFPy749ozhbWtcTqS1BZLGbS77CjamkTtkepsDXRHcsbrEerrrooFGKXeCrrx5whe3H7yGgzF" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4wDukGp1hUYZ7YLrpzqLJpf73YA1uHW9mFcGWUdcQzhsJxfkFPMXQBVoT7XB3pEB3xiyxvdXTZuwXBnKxuk7QG3U" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $HANU.P on a graduation_ride trigger with 0.95% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +20% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#89</span> <span class="t-sym">$MRH</span> <span class="t-pnl neg">-30.1%</span> <span class="t-exit">stop_loss</span> <span class="t-when">2026-07-23 02:46</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 02:46 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+10.1%</td></tr><tr><th>Exit</th><td><code>stop_loss</code> after 4m, realized <strong class="neg">-30.1%</strong> (-0.0030 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.03x</strong> our exit today (below where we sold; we sold at an implied ~$90,094 cap, now ~$3,012); highest print after our exit: ~$39,186 cap (<strong>0.43x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/5kwTKYHNPEkrr6NTtscetwHHwVsFoe8eyWYedECmBPE7ssxFdiYEJas9xKcA2Yi3gRffnZX65a9Z1ab24wWCZEe3" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/46vVoUX5wWjcZaHrSGdWjWmFycGMk1HeP3GPXBwtnKsFbhZWbhVvD1U3hfjahPuBoWHZK9BJ7yPJrmnLgQNiXF33" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $$MRH on a graduation_ride trigger with 1.19% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> It still sold. Getting any exit through a collapsing bonding curve beats holding a dead token. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The stop was set at -15% but the realized loss was -30.1%: the curve's liquidity collapsed faster than the position poller could quote and sell. A stop-loss is a request, not a guarantee. Smaller size in thin curves and a faster quote cadence are the real defenses.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#90</span> <span class="t-sym">BDAG</span> <span class="t-pnl pos">+20.4%</span> <span class="t-exit">take_profit</span> <span class="t-when">2026-07-23 02:53</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-23 02:53 UTC, committed 0.01 SOL</td></tr><tr><th>Trigger</th><td>graduation_ride: bought at bonding-curve graduation to ride the Raydium migration flow</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+20.6%</td></tr><tr><th>Exit</th><td><code>take_profit</code> after 2m, realized <strong class="pos">+20.4%</strong> (+0.0020 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.06x</strong> our exit today (below where we sold; we sold at an implied ~$95,584 cap, now ~$5,302); highest print after our exit: ~$46,016 cap (<strong>0.48x</strong> our exit, 1m candles)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/DXtv7cbafLgcdL9KdeFGfdD48adC48wSLaM5cRRxu2F5SyzVFsWymVKGbXSVADtcVG7DdGJttwogvNk1tUHyhEF" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/21jMZHUhiGGqEqRZcaQn7sKhxXzaNnyc7Yc5bsfzsEvmx9Q9xAEBQsre9ENcgSg6rFhYdHxFvbjPAWMd2LuHiUPT" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $BDAG on a graduation_ride trigger with 1.25% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Hit the configured +20% take-profit and sold the whole position into strength. This is the exit ladder doing exactly what it exists for. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+
+</div>
+</details>
+</section>
+
+<section class="arm" id="arm-intel-quality">
+<h3>intel-quality <span class="mode-tag mode-rules">rules</span></h3>
+<p class="arm-line">
+ Wallet <a href="https://solscan.io/account/D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu" target="_blank" rel="noopener"><code>D5BG..Xypu</code></a>
+ · <a href="/ledger/adba030a-2536-4476-a34d-7ce096d2e033">decision ledger</a>
+ · 6 trades · 0 wins (0%) · net <strong class="neg">-0.0413 SOL</strong>
+ · avg winner +0.0% · avg loser -4.6% · median hold 30m
+</p>
+<p class="arm-cfg">Policy at entry: 0.15 SOL per trade · take-profit +200% · stop-loss -35% · trailing stop 30% · 30m max hold · Oracle conviction ≥ 55 · socials required</p>
+<details class="trade" open>
+<summary><span class="t-n">#3</span> <span class="t-sym">Enthuist</span> <span class="t-pnl neg">-8.0%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-18 00:21</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-18 00:21 UTC, committed 0.15 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 37.5h, realized <strong class="neg">-8.0%</strong> (-0.0120 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.42x</strong> our exit today (below where we sold; we sold at an implied ~$5,221 cap, now ~$2,169); <strong>never traded again after our exit</strong> (no later candles exist)</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/58SnedweAjUZD1QxkDwQJxCazj9BmTgWXFei5xuGaCvKbM9agxkAdzP72AA8y6Z4NvuWnDFypzwvM4DDgSLrB2WP" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/SIMULATED" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $ENTHUIST on a intel_confirmed trigger with 0.51% price impact; firewall verdict warn (score 84). Committed 0.1500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-8.0%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#5</span> <span class="t-sym">Smoke</span> <span class="t-pnl neg">-7.1%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 00:00</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 00:00 UTC, committed 0.15 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Oracle conviction</th><td>22/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 30/100 · 4 buyers / 2 sellers observed · organic 49% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-7.1%</strong> (-0.0107 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,270 cap, now ~$2,170); highest print after our exit: ~$2,186 cap (<strong>0.41x</strong> our exit, 1m candles); lifetime label: <code>rugged</code>, ATH cap ~$3,566</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/oi7HfJN2WrSpTK6yWKU5EJziVVNNt6NccVa72BvK9KNuFPVGPsiCXXDR1XheTdsa8eVEiCumM5f2otxbbEJCjjy" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/4bEdkrxu8dUdW22SZWfUMqNB5SsASTUxrb2f3MTJu6epirScWCgYjvk8dHmcYa7R87pDMGtVRU7ZjZS5b35Fe6H9" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $SMOKE on a intel_confirmed trigger with 0.51% price impact; firewall verdict warn (score 84). Committed 0.1500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-7.1%) instead of riding a dead coin further down.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#6</span> <span class="t-sym">WET</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 00:30</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 00:30 UTC, committed 0.15 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 45/100 · 0 buyers / 0 sellers observed · organic 45% · top-10 hold 0%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0037 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,272 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,200</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/3wqnpwwqoJ6rvv6WTAi3omV5yp3hb4o8c84qX8shoTcQpWgk3dwCpPidXDSMuE9T8n6LHVhjwqJo3cu3tsqNt5F2" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3CET8PBRqwsjD8pokBxSMzYU4DESrvh94yqzJJUy8V95uVC7ttuoraGLM5MV7h8eUuZV1mqYFLu8X6L9AQwWw4Zb" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $WET on a intel_confirmed trigger with 0.54% price impact; firewall verdict allow (score 100). Committed 0.1500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#7</span> <span class="t-sym">YES YOU</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 01:02</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 01:02 UTC, committed 0.15 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 45/100 · 0 buyers / 0 sellers observed · organic 45% · top-10 hold 0%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0037 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,272 cap, now ~$2,170); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,204</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/vZnwjNmEoVJFhxkAKu448UfT9w2e8DNQY4JfQiW1iYQ1qLkPTMjaanRFNdLydwohBTNHkErhoyyC2VJMLvYs4cD" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/3gvP31mrTrmZskKiMyAqLteUHLJUDCbbFme2B3D9CJyLK83x13aqNDeruEA5Nt5J56CgqouhnuhovXzLBYt8h4ZK" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $YES YOU on a intel_confirmed trigger with 0.54% price impact; firewall verdict allow (score 100). Committed 0.1500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#9</span> <span class="t-sym">KYDEN</span> <span class="t-pnl neg">-5.0%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 01:34</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 01:34 UTC, committed 0.15 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Oracle conviction</th><td>17/100 at entry</td></tr><tr><th>Firewall</th><td>warn (score 84), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 4/100 · 1 buyers / 0 sellers observed · organic 28% · top-10 hold 100%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-5.0%</strong> (-0.0075 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,271 cap, now ~$2,170); highest print after our exit: ~$2,433 cap (<strong>0.46x</strong> our exit, 1m candles); lifetime label: <code>rugged</code>, ATH cap ~$2,709</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/34o2Nb3pCgZHgC4MiJCv9rziQEnHJpKpUPNz3s1Qeb832Mcii4q9KBiQpxB4tsdA62CCh6TWgQkdJHNru8orc4jE" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2zUaksiZbbVvLR12H9vknPspYVP6jZNvg3GGhpjjeXhoPEn8cmqJfS1uyhH3WXgKUZDquUJPxYxeuS6DWX8cNdTw" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $KYDEN on a intel_confirmed trigger with 0.52% price impact; firewall verdict warn (score 84). Committed 0.1500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-5.0%) instead of riding a dead coin further down.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+<details class="trade" open>
+<summary><span class="t-n">#10</span> <span class="t-sym">SADCAT</span> <span class="t-pnl neg">-2.5%</span> <span class="t-exit">timeout</span> <span class="t-when">2026-07-21 02:05</span></summary>
+<div class="t-body">
+<table class="trade-table"><tr><th>Opened</th><td>2026-07-21 02:05 UTC, committed 0.15 SOL</td></tr><tr><th>Trigger</th><td>intel_confirmed: the intel engine watched the first minutes of trading and confirmed real two-sided demand</td></tr><tr><th>Oracle conviction</th><td>35/100 at entry</td></tr><tr><th>Firewall</th><td>allow (score 100), sell simulated on-chain before the buy</td></tr><tr><th>Entry intel</th><td>quality 45/100 · 0 buyers / 0 sellers observed · organic 45% · top-10 hold 0%</td></tr><tr><th>Peak</th><td>+0.0%</td></tr><tr><th>Exit</th><td><code>timeout</code> after 30m, realized <strong class="neg">-2.5%</strong> (-0.0037 SOL)</td></tr><tr><th>After we left</th><td>trades at <strong>0.41x</strong> our exit today (below where we sold; we sold at an implied ~$5,272 cap, now ~$2,169); <strong>never traded again after our exit</strong> (no later candles exist); lifetime label: <code>rugged</code>, ATH cap ~$2,200</td></tr><tr><th>Receipts</th><td><a href="https://solscan.io/tx/2QLNqPk4maD4mq3U9aS1jyH3AiifgKM8GMtixRfBFtWgFu37DWD5r15hwvUnshoQGqPZQS3qWUU9gPp8vJ1v2xqu" target="_blank" rel="noopener">buy tx</a> · <a href="https://solscan.io/tx/2nFUd3Fhs228Gm4HqWXVmWJppB2oxwrKPUYqJBbiPnjwmmLAggQQ2db2DR7SFfGVgRe6pbusgpFhCLtAX6aJYDjJ" target="_blank" rel="noopener">sell tx</a> · <a href="https://solscan.io/account/D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu" target="_blank" rel="noopener">wallet</a></td></tr></table>
+<blockquote class="thesis">Ledger rationale, verbatim: &ldquo;Sniped $SADCAT on a intel_confirmed trigger with 0.54% price impact; firewall verdict allow (score 100). Committed 0.1500 SOL expecting a profitable exit.&rdquo;</blockquote>
+<p class="t-verdict"><strong>What it did well:</strong> Scratched out near flat (-2.5%) instead of riding a dead coin further down. The token never printed another trade after this exit; the agent was the last one out before the market vanished. The trade firewall simulated the full buy-and-sell round trip on-chain before spending: the token was provably sellable at entry.</p>
+<p class="t-verdict"><strong>What should improve:</strong> The coin flatlined almost immediately; holding the full 30 minutes tied up budget for nothing. A liquidity-decay early exit would free the slot in a fraction of the time.</p>
+</div>
+</details>
+</section>
+
+ <h2 id="learned">21. Everything we learned</h2>
+ <ol>
+ <li><strong>Model judgment beat frozen rules on expectancy, decisively, in this window.</strong> +0.0147 SOL across 33 LLM-judged trades vs -0.1182 SOL across 57 rules-driven trades, with the LLM cohort owning six of the seven biggest wins. The mechanism looks like selectivity: the model can decline launches a threshold cannot describe.</li>
+ <li><strong>And 33 trades is still just a signal.</strong> A single +73.9% winner moves the whole cohort. We are scaling the sample, not declaring victory. If the effect is real it will survive more data; if it is not, we will publish that too.</li>
+ <li><strong>Win rate and profitability are almost unrelated in this regime.</strong> The highest-win-rate arm lost money; the second-most-profitable arm wins a quarter of the time. Expectancy (win rate times average win, minus loss rate times average loss) is the only number that matters.</li>
+ <li><strong>The take-profit is where the money is.</strong> The only net-positive exit category. Everything else is damage control. Configure it, and ladder it once the position size justifies it.</li>
+ <li><strong>Stop-losses cap the common case, not the tail.</strong> Five positions blew through their stops by 50 to 85 points on liquidity collapse. Tail defense happens at entry (concentration screening) and sizing, not at exit.</li>
+ <li><strong>Trailing stops must arm above breakeven.</strong> Armed underwater, they are a machine for realizing small losses. The data shows it clearly across 12 trailing exits.</li>
+ <li><strong>The Oracle's conviction gradient is real and was mostly ignored.</strong> Sub-30-conviction entries funded most of the losses. Not one trade entered above 50. The gate now exists on every arm that opted in, and the empty top band is the next thing to fix: high-conviction coins exist, the arms just were not positioned to catch them.</li>
+ <li><strong>At scale, the Oracle's top band is a 7x-the-base-rate signal that nobody traded.</strong> Across 42,995 labeled coins, conviction 50+ hit 77% pumped-or-graduated vs 12% for the sub-30 band, and the fleet bought zero of the 110 qualifying coins because its two Oracle gates (35 and 65) bracketed the profitable band (50 to 61) without covering it. Audit your thresholds against the live score distribution, not against intuition.</li>
+ <li><strong>The fleet has no paperhands problem, verified against every token's full price history.</strong> 37 of 90 tokens never traded again after our exit; of the rest, zero printed 1.5x our exit afterward (median post-exit high: 0.43x) and none trades above our exit today. Every sell was vindicated. The losses came from entries, and the recoverable upside sits inside the hold (laddered exits), not beyond it.</li>
+ <li><strong>The biggest winners were invisible at minute zero.</strong> The skipped coins that ran to eight and nine figures showed 3 visible buyers and mediocre quality during our observation window; their runs started after it closed. Minute-zero sniping structurally cannot catch them; a delayed second-look entry can.</li>
+ <li><strong>The judges' skips prove the edge is selection.</strong> Across 3,850 labeled judged coins, buy verdicts went good 53.3% vs 11.7% for skips, on coins the fleet mostly never traded. That is a 4.5x lift measured with zero execution effects in it.</li>
+ <li><strong>Model overconfidence is real and measurable.</strong> Judge verdicts at 0.7 confidence were the best band; 0.9-plus verdicts went winless. Confidence floors exist in the config; this argues for ceilings too.</li>
+ <li><strong>Execution was never the problem.</strong> Median 3 seconds from token creation to our buy landing, median 0.04% entry impact, zero entries over 2% impact, fees a rounding error. Every SOL lost, was lost to what we chose, not how we filled it.</li>
+ <li><strong>Autonomy without audited side effects is theater.</strong> Two closed loops looked alive for two days while doing nothing, behind green health checks. Count rows, not status codes.</li>
+ <li><strong>The ledger pays for itself.</strong> This entire article, including every thesis quote and every grade, was generated from the decision ledger and the position table. An autonomous system that cannot produce its own honest postmortem is not finished.</li>
+ </ol>
+
+ <h2 id="next">22. What happens next</h2>
+ <p>The experiment continues with the same public standard: real money, real receipts, published either way. Concretely, in flight right now:</p>
+ <ul>
+ <li><strong>Rebalance toward what works.</strong> The evolution layer reallocates budget across arms using confidence intervals on realized returns, so the LLM arms earn larger budgets by performing, not by us liking them.</li>
+ <li><strong>Fix the model routing, then widen the model roster.</strong> The named-model arms should actually be piloted by their named models; the failover chain answering most calls muddied the model-vs-model comparison this round. Once the routing holds, the next trials add more pilots to the cockpit: new arms for additional frontier models, starting with Moonshot's Kimi K3, running head to head against the incumbents at equal budgets under identical rails. The LLM cohort's edge (section 8) is currently a "model judgment vs rules" result; a clean multi-model bracket is how it becomes a "which model trades best" result, and each arm's theses and trades will publish on its own ledger like everything else here.</li>
+ <li><strong>An arm that trades the conviction-50 crossing: built.</strong> Section 11's 77%-good band is the strongest signal in this dataset, so the sniper now has an <code>oracle_crossing</code> trigger: a watcher polls the Oracle and buys a coin the first time it crosses the strategy's bar, instead of gating a launch-second buy on a score that does not exist yet. The formerly-idle strict arm is re-armed on it: bar at 50 (its old 65 was above the highest score ever observed), tiny size, and, because section 12's data says the median crossing coin eventually decays to 0.32x, a sell-the-initials ladder at 1.5x with a protected moonbag. It goes live with the next worker deploy and its trades will publish like everything else.</li>
+ <li><strong>Trailing stops now arm only above breakeven: shipped.</strong> The exit ladder no longer fires a trailing stop on a position that was never green; the hard stop-loss keeps sole custody of the downside. Every below-breakeven trail in this dataset realized a loss that the stop would have capped anyway.</li>
+ <li><strong>A second-window scanner.</strong> The crossing watcher is the first instance of the pattern; the general version re-scores surviving coins at 30 and 60 minutes so the fleet can catch the winners whose stories start after minute zero (section 12), instead of judging every coin exactly once at birth.</li>
+ <li><strong>Arm trailing stops above breakeven only, and add a liquidity-decay early exit</strong> so dead coins stop squatting on concurrency slots for half an hour.</li>
+ <li><strong>Keep the optimizer honest.</strong> Every applied tuning now writes an audit row and a ledger entry, and the fleet's tunings will appear in future editions of this dataset.</li>
+ </ul>
+ <p>Everything above runs on the same platform any three.ws user can touch: the agents, the wallets, the sniper, the ledgers. If you want to arm your own agent with your own rules (or your own model), the tutorial is below. Size it like an experiment, not like a retirement plan.</p>
+
+ <p><a class="post-cta" href="/tutorials/arm-an-agent-sniper">Arm your own agent &rarr;</a></p>
+
+ <h2 id="methods">23. Methods, data, and glossary</h2>
+ <h3>Data sources</h3>
+ <div class="table-scroll">
+ <table class="league">
+ <tr><th>what</th><th>source</th><th>notes</th></tr>
+ <tr><td>trades, fills, exits</td><td><code>agent_sniper_positions</code> (production ledger)</td><td>real fills only; the SIMULATED sentinel excluded</td></tr>
+ <tr><td>entry rationale, theses, confidence</td><td><code>agent_decisions</code> hash-chained reasoning ledger</td><td>public per agent at <code>/ledger/&lt;agent&gt;</code></td></tr>
+ <tr><td>judge verdicts, buys and skips</td><td><code>sniper_llm_verdicts</code></td><td>one verdict per (coin, model); answered_by records fallbacks</td></tr>
+ <tr><td>launch observation, entry signals</td><td><code>pump_coin_intel</code> (intel engine)</td><td>82,994 coins in window</td></tr>
+ <tr><td>ground-truth outcomes</td><td><code>pump_coin_outcomes</code></td><td>graduated / pumped / flat / rugged + ATH cap</td></tr>
+ <tr><td>conviction scores + history</td><td><code>oracle_conviction</code>, <code>oracle_conviction_history</code></td><td>history retained 72h; captured at study close</td></tr>
+ <tr><td>candle price histories</td><td>pump.fun public swap API</td><td>USD per token; price times 1B fixed supply equals market cap</td></tr>
+ <tr><td>live coin state post-exit</td><td>pump.fun frontend API + DexScreener</td><td>keyless public endpoints</td></tr>
+ <tr><td>self-tuning audit trail</td><td><code>agent_sniper_optimizer_runs</code>, <code>sniper_evolution_log</code></td><td>every applied change journaled</td></tr>
+ </table>
+ </div>
+ <h3>Key methodological choices and limitations</h3>
+ <ul>
+ <li><strong>Snapshot cutoff.</strong> Trades frozen at closes before 2026-07-23 04:00 UTC (the fleet keeps trading; live totals will drift from this article). Counterfactual window: 2026-07-20 00:00 to 2026-07-23 04:00 UTC.</li>
+ <li><strong>Currency conversions</strong> use SOL at ~$190 (spot at time of writing). All PnL is computed natively in SOL/lamports and never round-trips through USD; dollars appear only in market-cap framings, where a few percent of SOL drift does not change any conclusion.</li>
+ <li><strong>Implied market caps at our fills</strong> derive from our own fill prices times pump.fun's fixed 1B token supply.</li>
+ <li><strong>Outcome labels straddle a regime change</strong> (pump.fun's BOOST buyback mechanic, mid-July); pre-BOOST baselines are not directly comparable.</li>
+ <li><strong>Counterfactuals are bounds, not backtests.</strong> Where we report what skipped cohorts went on to do, we did not model entry slippage, fill competition, or our own market impact, which is also why the interactive replay (section 19) fixes entries to real fills and only varies exits.</li>
+ <li><strong>Small-n candor.</strong> The LLM cohort is 33 trades; judge calibration bands hold dozens of coins, not thousands; the signal-separation table (section 16) is hypothesis-generating. Where n is small we say so in place.</li>
+ <li><strong>Survivorship handling.</strong> The paperhands audit counts never-traded-again coins explicitly (37 of 90) instead of dropping them.</li>
+ </ul>
+ <h3>Glossary</h3>
+ <div class="glossary">
+ <p><strong>Bonding curve</strong>: pump.fun's automated market: price rises deterministically with tokens bought; all early trading happens against it rather than an order book.</p>
+ <p><strong>Graduation</strong>: a coin completing its bonding curve (~$69k market cap) and migrating to a full DEX listing; the strongest "it made it" signal in this market.</p>
+ <p><strong>Rugged</strong>: the coin's value was pulled out from under holders (creator dump, coordinated exit); operationally, a collapse it never recovers from.</p>
+ <p><strong>Mayhem mode</strong>: a pump.fun launch variant with adversarial mechanics; the fleet excludes it unconditionally, read from the chain.</p>
+ <p><strong>BOOST window</strong>: pump.fun's five-minute post-graduation buyback; the <code>boost-ride</code> arm trades only this window.</p>
+ <p><strong>Oracle conviction</strong>: our 0-100 fused score per coin (creator pedigree, market structure, narrative, momentum), recomputed as the coin trades.</p>
+ <p><strong>Trade firewall</strong>: a real on-chain simulation of the full buy-and-sell round trip before spending; if the token cannot be sold back, the buy aborts.</p>
+ <p><strong>Arm</strong>: one strategy in the A/B fleet: its own agent, wallet, budget, and entry policy on shared execution rails.</p>
+ <p><strong>Expectancy</strong>: win rate times average win, minus loss rate times average loss; the number that decides profitability, as opposed to win rate, which does not.</p>
+ </div>
+ <h3>Data availability</h3>
+ <p>The full trade dataset (<a href="/blog/autonomous-trading-experiment.json">autonomous-trading-experiment.json</a>) and the backtest price series (<a href="/blog/autonomous-trading-experiment-series.json">autonomous-trading-experiment-series.json</a>) are published alongside this article. The execution stack is in the <a href="https://github.com/nirholas/three.ws" target="_blank" rel="noopener">platform repository</a> (see <code>workers/agent-sniper/</code>), and every agent's decision ledger and wallet is publicly auditable via the links in section 6.</p>
+
+ <h2>Go deeper</h2>
+ <ul>
+ <li>The dataset behind every number in this post: <a href="/blog/autonomous-trading-experiment.json">autonomous-trading-experiment.json</a></li>
+ <li>The first trade and the five-gate walkthrough: <a href="/blog/first-autonomous-trade">the first-trade postmortem</a></li>
+ <li>The full engineering breakdown: <a href="/docs/agent-sniper">the Agent Sniper doc</a></li>
+ <li>How to arm one yourself: <a href="/tutorials/arm-an-agent-sniper">the tutorial</a></li>
+ </ul>
+
+ <hr>
+ <p><a href="/blog">&larr; All posts</a></p>
+ </main>
+ <div id="footer-container"></div>
+ <script src="/nav.js"></script>
+ <script src="/footer.js"></script>
+ <script>
+ (function () {
+ 'use strict';
+ // ── expand/collapse all trade cards ────────────────────────────────
+ var toggle = document.getElementById('toggle-cards');
+ if (toggle) toggle.addEventListener('click', function () {
+ var cards = document.querySelectorAll('details.trade');
+ var anyOpen = Array.prototype.some.call(cards, function (d) { return d.open; });
+ cards.forEach(function (d) { d.open = !anyOpen; });
+ toggle.textContent = anyOpen ? 'Expand all trade cards' : 'Collapse all trade cards';
+ });
+
+ // ── sortable master table ──────────────────────────────────────────
+ var table = document.getElementById('master-table');
+ if (table) table.querySelectorAll('th').forEach(function (th, idx) {
+ th.addEventListener('click', function () {
+ var tbody = table.tBodies[0];
+ var rows = Array.prototype.slice.call(tbody.rows);
+ var numeric = th.dataset.t === 'num';
+ var dir = th.classList.contains('sorted-asc') ? -1 : 1;
+ table.querySelectorAll('th').forEach(function (h) { h.classList.remove('sorted-asc', 'sorted-desc'); });
+ th.classList.add(dir === 1 ? 'sorted-asc' : 'sorted-desc');
+ rows.sort(function (a, b) {
+ var av = a.cells[idx].textContent.trim(), bv = b.cells[idx].textContent.trim();
+ if (numeric) return dir * ((parseFloat(av) || 0) - (parseFloat(bv) || 0));
+ return dir * av.localeCompare(bv);
+ });
+ rows.forEach(function (r) { tbody.appendChild(r); });
+ });
+ });
+
+ // ── interactive exit-policy backtester ─────────────────────────────
+ var panel = document.getElementById('bt-panel');
+ if (!panel) return;
+ var DATA = null;
+ var els = {
+ sl: document.getElementById('bt-sl'), ts: document.getElementById('bt-ts'),
+ tp: document.getElementById('bt-tp'), mh: document.getElementById('bt-mh'),
+ be: document.getElementById('bt-be'), out: document.getElementById('bt-results'),
+ chart: document.getElementById('bt-chart'),
+ };
+ var PRESETS = {
+ fleet: { sl: 30, ts: 20, tp: 60, mh: 30, be: true },
+ tight: { sl: 15, ts: 10, tp: 25, mh: 10, be: true },
+ runner: { sl: 30, ts: 25, tp: 150, mh: 120, be: true },
+ diamond: { sl: 90, ts: 0, tp: 300, mh: 240, be: true },
+ };
+
+ // Same priority order as the live worker's decideExit():
+ // stop-loss, trailing stop, take-profit, timeout.
+ function simulateTrade(t, cfg) {
+ var peak = 1, i, off, m;
+ for (i = 0; i < t.series.length; i++) {
+ off = t.series[i][0]; m = t.series[i][1];
+ if (off > cfg.mh) return { reason: 'timeout', m: i > 0 ? t.series[i - 1][1] : 1 };
+ if (m <= 1 - cfg.sl / 100) return { reason: 'stop_loss', m: m };
+ if (cfg.ts > 0 && (!cfg.be || peak > 1) && peak > 0 && m <= peak * (1 - cfg.ts / 100) && m < peak)
+ return { reason: 'trailing_stop', m: m };
+ if (cfg.tp > 0 && m >= 1 + cfg.tp / 100) return { reason: 'take_profit', m: m };
+ if (m > peak) peak = m;
+ }
+ return { reason: 'market_end', m: t.series[t.series.length - 1][1] };
+ }
+
+ function run() {
+ if (!DATA) return;
+ var cfg = {
+ sl: +els.sl.value, ts: +els.ts.value, tp: +els.tp.value,
+ mh: +els.mh.value, be: els.be.checked,
+ };
+ document.getElementById('bt-sl-v').textContent = '-' + cfg.sl + '%';
+ document.getElementById('bt-ts-v').textContent = cfg.ts ? cfg.ts + '% off peak' : 'off';
+ document.getElementById('bt-tp-v').textContent = cfg.tp ? '+' + cfg.tp + '%' : 'off';
+ document.getElementById('bt-mh-v').textContent = cfg.mh + 'm';
+
+ var net = 0, wins = 0, mix = {}, cum = [], baseline = 0;
+ var best = null, worst = null;
+ DATA.trades.forEach(function (t) {
+ var r = simulateTrade(t, cfg);
+ var pnl = t.entry_sol * (r.m - 1);
+ net += pnl; if (pnl > 0) wins++;
+ mix[r.reason] = (mix[r.reason] || 0) + 1;
+ cum.push(net);
+ // Baseline: each trade's REAL fleet config replayed on the same
+ // normalized series (apples to apples, same price path).
+ var fr = simulateTrade({ series: t.series }, {
+ sl: t.fleet_cfg.sl, ts: t.fleet_cfg.ts, tp: t.fleet_cfg.tp, mh: t.fleet_cfg.mh, be: true,
+ });
+ baseline += t.entry_sol * (fr.m - 1);
+ if (!best || pnl > best.pnl) best = { t: t, pnl: pnl, r: r };
+ if (!worst || pnl < worst.pnl) worst = { t: t, pnl: pnl, r: r };
+ });
+ var n = DATA.trades.length;
+ var delta = net - baseline;
+ els.out.innerHTML =
+ '<div class="stat"><b class="' + (net >= 0 ? 'pos' : 'neg') + '">' + (net >= 0 ? '+' : '') + net.toFixed(4) + ' SOL</b><span>your policy, ' + n + ' trades</span></div>' +
+ '<div class="stat"><b class="' + (baseline >= 0 ? 'pos' : 'neg') + '">' + (baseline >= 0 ? '+' : '') + baseline.toFixed(4) + ' SOL</b><span>fleet policy, same price paths</span></div>' +
+ '<div class="stat"><b class="' + (delta >= 0 ? 'pos' : 'neg') + '">' + (delta >= 0 ? '+' : '') + delta.toFixed(4) + ' SOL</b><span>your edge vs the fleet</span></div>' +
+ '<div class="stat"><b>' + Math.round((wins / n) * 100) + '%</b><span>win rate (' + wins + '/' + n + ')</span></div>' +
+ '<div class="stat"><b>' + Object.keys(mix).sort(function (a, b) { return mix[b] - mix[a]; }).map(function (k) { return mix[k] + ' ' + k; }).join(' · ') + '</b><span>exit mix</span></div>' +
+ '<div class="stat"><b class="pos">+' + best.pnl.toFixed(4) + '</b><span>best: ' + best.t.symbol + ' (' + best.r.reason + ')</span></div>' +
+ '<div class="stat"><b class="neg">' + worst.pnl.toFixed(4) + '</b><span>worst: ' + worst.t.symbol + ' (' + worst.r.reason + ')</span></div>';
+
+ // cumulative mini-chart
+ var W = 720, H = 180, L = 8, R = 8, T = 10, B = 10;
+ var lo = Math.min.apply(null, cum.concat([0])), hi = Math.max.apply(null, cum.concat([0.001]));
+ var x = function (i) { return L + (i / (cum.length - 1)) * (W - L - R); };
+ var y = function (v) { return T + (1 - (v - lo) / (hi - lo)) * (H - T - B); };
+ els.chart.innerHTML = '<svg viewBox="0 0 ' + W + ' ' + H + '" role="img" aria-label="simulated cumulative PnL">' +
+ '<line x1="' + L + '" y1="' + y(0) + '" x2="' + (W - R) + '" y2="' + y(0) + '" stroke="rgba(255,255,255,.2)"/>' +
+ '<polyline fill="none" stroke="' + (net >= 0 ? '#6ee7a0' : '#ff7a8a') + '" stroke-width="2" points="' +
+ cum.map(function (v, i) { return x(i).toFixed(1) + ',' + y(v).toFixed(1); }).join(' ') + '"/></svg>';
+ }
+
+ ['input', 'change'].forEach(function (evt) {
+ [els.sl, els.ts, els.tp, els.mh, els.be].forEach(function (el) { el.addEventListener(evt, run); });
+ });
+ panel.querySelectorAll('.bt-presets button').forEach(function (b) {
+ b.addEventListener('click', function () {
+ var p = PRESETS[b.dataset.preset];
+ els.sl.value = p.sl; els.ts.value = p.ts; els.tp.value = p.tp; els.mh.value = p.mh; els.be.checked = p.be;
+ run();
+ });
+ });
+ fetch('/blog/autonomous-trading-experiment-series.json')
+ .then(function (r) { return r.json(); })
+ .then(function (d) { DATA = d; run(); })
+ .catch(function () { els.out.textContent = 'Could not load the price-series file.'; });
+ })();
+ </script>
+</body>
+</html>
diff --git a/blog/autonomous-trading-experiment.json b/blog/autonomous-trading-experiment.json
new file mode 100644
index 000000000..184814869
--- /dev/null
+++ b/blog/autonomous-trading-experiment.json
@@ -0,0 +1,4326 @@
+{
+ "generated": "2026-07-23T12:00:00Z",
+ "source": "three.ws agent-sniper production ledger (mainnet, real fills only)",
+ "fleet": {
+ "trades": 90,
+ "wins": 25,
+ "net_sol": -0.103433,
+ "deployed_sol": 1.932
+ },
+ "arms": [
+ {
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "trades": 9,
+ "wins": 4,
+ "net_sol": 0.018986,
+ "avg_win_pct": 53.55,
+ "avg_loss_pct": -4.87,
+ "config": {
+ "per_trade_sol": 0.01,
+ "take_profit_pct": 45,
+ "stop_loss_pct": 30,
+ "trailing_stop_pct": 20,
+ "max_hold_seconds": 1800,
+ "min_oracle_score": null
+ }
+ },
+ {
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "trades": 15,
+ "wins": 3,
+ "net_sol": 0.006405,
+ "avg_win_pct": 64.5,
+ "avg_loss_pct": -10.79,
+ "config": {
+ "per_trade_sol": 0.01,
+ "take_profit_pct": 60,
+ "stop_loss_pct": 30,
+ "trailing_stop_pct": 20,
+ "max_hold_seconds": 1800,
+ "min_oracle_score": null
+ }
+ },
+ {
+ "arm": "rules-classic",
+ "mode": "rules",
+ "wallet": "7KdHYVovYzmrJCE3w6g1iGxeUWJmXoTZLKbBqD7QdWfD",
+ "trades": 1,
+ "wins": 0,
+ "net_sol": -0.000562,
+ "avg_win_pct": 0,
+ "avg_loss_pct": -28.11,
+ "config": {
+ "per_trade_sol": 0.002,
+ "take_profit_pct": 60,
+ "stop_loss_pct": 30,
+ "trailing_stop_pct": 20,
+ "max_hold_seconds": 1800,
+ "min_oracle_score": 55
+ }
+ },
+ {
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "trades": 9,
+ "wins": 1,
+ "net_sol": -0.010656,
+ "avg_win_pct": 10.65,
+ "avg_loss_pct": -14.65,
+ "config": {
+ "per_trade_sol": 0.01,
+ "take_profit_pct": 60,
+ "stop_loss_pct": 30,
+ "trailing_stop_pct": 20,
+ "max_hold_seconds": 1800,
+ "min_oracle_score": null
+ }
+ },
+ {
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "trades": 14,
+ "wins": 1,
+ "net_sol": -0.016656,
+ "avg_win_pct": 10.38,
+ "avg_loss_pct": -13.61,
+ "config": {
+ "per_trade_sol": 0.008,
+ "take_profit_pct": null,
+ "stop_loss_pct": 30,
+ "trailing_stop_pct": null,
+ "max_hold_seconds": 1800,
+ "min_oracle_score": 35
+ }
+ },
+ {
+ "arm": "rules-proven",
+ "mode": "rules",
+ "wallet": "3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc",
+ "trades": 5,
+ "wins": 1,
+ "net_sol": -0.018346,
+ "avg_win_pct": 42.38,
+ "avg_loss_pct": -19.77,
+ "config": {
+ "per_trade_sol": 0.05,
+ "take_profit_pct": null,
+ "stop_loss_pct": 30,
+ "trailing_stop_pct": 25,
+ "max_hold_seconds": 1800,
+ "min_oracle_score": null
+ }
+ },
+ {
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "trades": 31,
+ "wins": 15,
+ "net_sol": -0.041289,
+ "avg_win_pct": 14.87,
+ "avg_loss_pct": -39.75,
+ "config": {
+ "per_trade_sol": 0.01,
+ "take_profit_pct": 20,
+ "stop_loss_pct": 15,
+ "trailing_stop_pct": 8,
+ "max_hold_seconds": 240,
+ "min_oracle_score": null
+ }
+ },
+ {
+ "arm": "intel-quality",
+ "mode": "rules",
+ "wallet": "D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu",
+ "trades": 6,
+ "wins": 0,
+ "net_sol": -0.041315,
+ "avg_win_pct": 0,
+ "avg_loss_pct": -4.59,
+ "config": {
+ "per_trade_sol": 0.15,
+ "take_profit_pct": 200,
+ "stop_loss_pct": 35,
+ "trailing_stop_pct": 30,
+ "max_hold_seconds": 1800,
+ "min_oracle_score": 55
+ }
+ }
+ ],
+ "trades": [
+ {
+ "n": 1,
+ "arm": "rules-classic",
+ "mode": "rules",
+ "wallet": "7KdHYVovYzmrJCE3w6g1iGxeUWJmXoTZLKbBqD7QdWfD",
+ "mint": "Bj9ysXddiDZybE6vAXRTfH179n1THmHRRwUHvZT5XxvU",
+ "symbol": "Dronenald",
+ "opened_at": "2026-07-03T16:19:54.672Z",
+ "closed_at": "2026-07-08T01:14:28.985Z",
+ "hold_seconds": 377674,
+ "entry_sol": 0.002,
+ "exit_sol": 0.001438,
+ "pnl_sol": -0.000562,
+ "pnl_pct": -28.10815,
+ "peak_pct": 0,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6997892983841478,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $DRONENALD on a new_mint trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0020 SOL expecting a profitable exit.",
+ "buy_sig": "214YhevxHwfmxtD4z77v53QvdGHg5Lu2jZfDMHzauCrvUNMrKX7jWQs2eg5byk6iGtcVfrUrL8HUnptmXWJaQvv4",
+ "sell_sig": "SIMULATED",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 5253,
+ "now_mc_usd": 2172,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 2,
+ "arm": "rules-proven",
+ "mode": "rules",
+ "wallet": "3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc",
+ "mint": "Fe9cLWQ5ASbwWSvPnNUzeGzYHEQWqYnXHMpPpxhdbits",
+ "symbol": "BITS",
+ "opened_at": "2026-07-19T02:26:00.801Z",
+ "closed_at": "2026-07-19T02:56:04.811Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.05,
+ "exit_sol": 0.071191,
+ "pnl_sol": 0.021191,
+ "pnl_pct": 42.382276000000005,
+ "peak_pct": 46.46,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 15,
+ "firewall": "allow",
+ "ledger_confidence": 0.6979971405093134,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $BITS on a new_mint trigger with 0.05% price impact; firewall verdict allow (score 100). Committed 0.0500 SOL expecting a profitable exit.",
+ "buy_sig": "3Y6NqS8CV3K1j5sBZYsuQjpipZeY2wckCz3h99vGA6ZbwJgMpeUjkVm43zffeV52Kc2jWRUn4d4rzcTxoCEGrzRY",
+ "sell_sig": "mLmGA7FeHFUEDdQagavVZCH2aExmMssjsVxWiRCSxRZwvbxDS1Xfnvan63ab5FkrKnQ7koEu4yxwgVJYXajeyhH",
+ "entry_intel": {
+ "quality_score": 4,
+ "unique_buyers": 1,
+ "unique_sellers": 0,
+ "organic_score": 0.28,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 27376,
+ "now_mc_usd": 2206,
+ "now_vs_exit_multiple": 0.081,
+ "post_exit_high_mc_usd": 15257,
+ "post_exit_high_vs_exit_multiple": 0.557,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 15257
+ }
+ },
+ {
+ "n": 3,
+ "arm": "intel-quality",
+ "mode": "rules",
+ "wallet": "D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu",
+ "mint": "6oMTywULQdCbukiFccexiqNBmWcQ46EJaWnGYvbpump",
+ "symbol": "Enthuist",
+ "opened_at": "2026-07-18T00:21:46.296Z",
+ "closed_at": "2026-07-19T13:54:02.611Z",
+ "hold_seconds": 135136,
+ "entry_sol": 0.15,
+ "exit_sol": 0.137973,
+ "pnl_sol": -0.012027,
+ "pnl_pct": -8.018305333333334,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": null,
+ "firewall": "warn",
+ "ledger_confidence": 0.42956832134308465,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $ENTHUIST on a intel_confirmed trigger with 0.51% price impact; firewall verdict warn (score 84). Committed 0.1500 SOL expecting a profitable exit.",
+ "buy_sig": "58SnedweAjUZD1QxkDwQJxCazj9BmTgWXFei5xuGaCvKbM9agxkAdzP72AA8y6Z4NvuWnDFypzwvM4DDgSLrB2WP",
+ "sell_sig": "SIMULATED",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 5221,
+ "now_mc_usd": 2169,
+ "now_vs_exit_multiple": 0.415,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 4,
+ "arm": "rules-proven",
+ "mode": "rules",
+ "wallet": "3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc",
+ "mint": "Dv9jhUCCyMRuXEXd7Kvxcm6LAuQweSd37zTsFkXbpump",
+ "symbol": "looong",
+ "opened_at": "2026-07-20T22:52:19.485Z",
+ "closed_at": "2026-07-20T22:53:05.640Z",
+ "hold_seconds": 46,
+ "entry_sol": 0.05,
+ "exit_sol": 0.036957,
+ "pnl_sol": -0.013043,
+ "pnl_pct": -26.086327999999998,
+ "peak_pct": 0,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6988184689929708,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $LOOONG on a new_mint trigger with 0.03% price impact; firewall verdict allow (score 100). Committed 0.0500 SOL expecting a profitable exit.",
+ "buy_sig": "4jRHHS4ZJRdkNh7aPytynYEMBPdkewgB6wq1zhKiFhBR3nZb4XqsGECjkTaLNA2tjpDmcyQSTNsq7JurSDdhBx1v",
+ "sell_sig": "4JUpg2KPJ4WZQ1nKqjASfm6xEPyMpERAwWbp2F9gQ6tfTwm8Df6AZXa51ChhNqkW36HSozCpj1XHyK7LFfmEX6DR",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 24085,
+ "now_mc_usd": 2247,
+ "now_vs_exit_multiple": 0.093,
+ "post_exit_high_mc_usd": 13713,
+ "post_exit_high_vs_exit_multiple": 0.569,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 5,
+ "arm": "intel-quality",
+ "mode": "rules",
+ "wallet": "D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu",
+ "mint": "41YxCBKJ5QEZisXXKRQeJUgiprjd11pN4C5Kqe4ipump",
+ "symbol": "Smoke",
+ "opened_at": "2026-07-21T00:00:08.526Z",
+ "closed_at": "2026-07-21T00:30:14.550Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.15,
+ "exit_sol": 0.139315,
+ "pnl_sol": -0.010685,
+ "pnl_pct": -7.12357,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": 22,
+ "firewall": "warn",
+ "ledger_confidence": 0.4295617564236717,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $SMOKE on a intel_confirmed trigger with 0.51% price impact; firewall verdict warn (score 84). Committed 0.1500 SOL expecting a profitable exit.",
+ "buy_sig": "oi7HfJN2WrSpTK6yWKU5EJziVVNNt6NccVa72BvK9KNuFPVGPsiCXXDR1XheTdsa8eVEiCumM5f2otxbbEJCjjy",
+ "sell_sig": "4bEdkrxu8dUdW22SZWfUMqNB5SsASTUxrb2f3MTJu6epirScWCgYjvk8dHmcYa7R87pDMGtVRU7ZjZS5b35Fe6H9",
+ "entry_intel": {
+ "quality_score": 30,
+ "unique_buyers": 4,
+ "unique_sellers": 2,
+ "organic_score": 0.4892,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5270,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.412,
+ "post_exit_high_mc_usd": 2186,
+ "post_exit_high_vs_exit_multiple": 0.415,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 3566
+ }
+ },
+ {
+ "n": 6,
+ "arm": "intel-quality",
+ "mode": "rules",
+ "wallet": "D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu",
+ "mint": "94KJ1GyiGZvf99Nwi36oKTg44Lo5tQFGf5UhEKtfpump",
+ "symbol": "WET",
+ "opened_at": "2026-07-21T00:30:42.118Z",
+ "closed_at": "2026-07-21T01:00:45.806Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.15,
+ "exit_sol": 0.146296,
+ "pnl_sol": -0.003704,
+ "pnl_pct": -2.469138,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6785399999998197,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $WET on a intel_confirmed trigger with 0.54% price impact; firewall verdict allow (score 100). Committed 0.1500 SOL expecting a profitable exit.",
+ "buy_sig": "3wqnpwwqoJ6rvv6WTAi3omV5yp3hb4o8c84qX8shoTcQpWgk3dwCpPidXDSMuE9T8n6LHVhjwqJo3cu3tsqNt5F2",
+ "sell_sig": "3CET8PBRqwsjD8pokBxSMzYU4DESrvh94yqzJJUy8V95uVC7ttuoraGLM5MV7h8eUuZV1mqYFLu8X6L9AQwWw4Zb",
+ "entry_intel": {
+ "quality_score": 45,
+ "unique_buyers": 0,
+ "unique_sellers": 0,
+ "organic_score": 0.45,
+ "bundle_score": 0,
+ "concentration_top10": 0
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5272,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.412,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2200
+ }
+ },
+ {
+ "n": 7,
+ "arm": "intel-quality",
+ "mode": "rules",
+ "wallet": "D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu",
+ "mint": "AhMDzQAwPtnEKgBxWPGCdBPhBQwTDuHt9AxdzJoupump",
+ "symbol": "YES YOU",
+ "opened_at": "2026-07-21T01:02:21.759Z",
+ "closed_at": "2026-07-21T01:32:26.546Z",
+ "hold_seconds": 1805,
+ "entry_sol": 0.15,
+ "exit_sol": 0.146296,
+ "pnl_sol": -0.003704,
+ "pnl_pct": -2.469138,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6785399999998197,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $YES YOU on a intel_confirmed trigger with 0.54% price impact; firewall verdict allow (score 100). Committed 0.1500 SOL expecting a profitable exit.",
+ "buy_sig": "vZnwjNmEoVJFhxkAKu448UfT9w2e8DNQY4JfQiW1iYQ1qLkPTMjaanRFNdLydwohBTNHkErhoyyC2VJMLvYs4cD",
+ "sell_sig": "3gvP31mrTrmZskKiMyAqLteUHLJUDCbbFme2B3D9CJyLK83x13aqNDeruEA5Nt5J56CgqouhnuhovXzLBYt8h4ZK",
+ "entry_intel": {
+ "quality_score": 45,
+ "unique_buyers": 0,
+ "unique_sellers": 0,
+ "organic_score": 0.45,
+ "bundle_score": 0,
+ "concentration_top10": 0
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5272,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.412,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2204
+ }
+ },
+ {
+ "n": 8,
+ "arm": "rules-proven",
+ "mode": "rules",
+ "wallet": "3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc",
+ "mint": "EqyVZM8EkiJDKoGMvJHwPkL6aKztKFkPNd9oFG9vpump",
+ "symbol": "Meowpin",
+ "opened_at": "2026-07-21T01:41:43.015Z",
+ "closed_at": "2026-07-21T01:42:11.971Z",
+ "hold_seconds": 29,
+ "entry_sol": 0.05,
+ "exit_sol": 0.042847,
+ "pnl_sol": -0.007153,
+ "pnl_pct": -14.305202,
+ "peak_pct": 28.28,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 25,
+ "firewall": "allow",
+ "ledger_confidence": 0.6982978531063974,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $MEOWPIN on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0500 SOL expecting a profitable exit.",
+ "buy_sig": "3zkWZ4gftRbFbqWkNvRRrRNkB2CJuM6FKpBY97n4GpF7dtRLYRM46yDLxNThFjXwMYKppioiSxwJneRu6VxLd3YB",
+ "sell_sig": "3JYvFAF8LeyhsKwufzkdWC4DGT9wEyzXcWmni5vsSAtiNc2EHw1oP4WH1sRFcN71PMsi1YxvvqA5yayDrBhMWrLB",
+ "entry_intel": {
+ "quality_score": 75,
+ "unique_buyers": 35,
+ "unique_sellers": 26,
+ "organic_score": 0.7842,
+ "bundle_score": 0,
+ "concentration_top10": 0.9712
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 19386,
+ "now_mc_usd": 2174,
+ "now_vs_exit_multiple": 0.112,
+ "post_exit_high_mc_usd": 6809,
+ "post_exit_high_vs_exit_multiple": 0.351,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 12844
+ }
+ },
+ {
+ "n": 9,
+ "arm": "intel-quality",
+ "mode": "rules",
+ "wallet": "D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu",
+ "mint": "Cof9yNAGGbxTmCHdNuUCe9ZXpiP2tSCWAdaF86mapump",
+ "symbol": "KYDEN",
+ "opened_at": "2026-07-21T01:34:06.393Z",
+ "closed_at": "2026-07-21T02:04:08.502Z",
+ "hold_seconds": 1802,
+ "entry_sol": 0.15,
+ "exit_sol": 0.142509,
+ "pnl_sol": -0.007491,
+ "pnl_pct": -4.9940066666666665,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": 17,
+ "firewall": "warn",
+ "ledger_confidence": 0.42909423001744984,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $KYDEN on a intel_confirmed trigger with 0.52% price impact; firewall verdict warn (score 84). Committed 0.1500 SOL expecting a profitable exit.",
+ "buy_sig": "34o2Nb3pCgZHgC4MiJCv9rziQEnHJpKpUPNz3s1Qeb832Mcii4q9KBiQpxB4tsdA62CCh6TWgQkdJHNru8orc4jE",
+ "sell_sig": "2zUaksiZbbVvLR12H9vknPspYVP6jZNvg3GGhpjjeXhoPEn8cmqJfS1uyhH3WXgKUZDquUJPxYxeuS6DWX8cNdTw",
+ "entry_intel": {
+ "quality_score": 4,
+ "unique_buyers": 1,
+ "unique_sellers": 0,
+ "organic_score": 0.28,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5271,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.412,
+ "post_exit_high_mc_usd": 2433,
+ "post_exit_high_vs_exit_multiple": 0.462,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2709
+ }
+ },
+ {
+ "n": 10,
+ "arm": "intel-quality",
+ "mode": "rules",
+ "wallet": "D5BGRDsXVNBt6iZZ83P9hFib1w4SR6AzL55HrNnrXypu",
+ "mint": "8Dr2bK3JwKqLZRhPiXFh3uvEuJicjRe7W74CbzPHpump",
+ "symbol": "SADCAT",
+ "opened_at": "2026-07-21T02:05:48.251Z",
+ "closed_at": "2026-07-21T02:35:54.369Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.15,
+ "exit_sol": 0.146296,
+ "pnl_sol": -0.003704,
+ "pnl_pct": -2.469138,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": 35,
+ "firewall": "allow",
+ "ledger_confidence": 0.6785399999998197,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $SADCAT on a intel_confirmed trigger with 0.54% price impact; firewall verdict allow (score 100). Committed 0.1500 SOL expecting a profitable exit.",
+ "buy_sig": "2QLNqPk4maD4mq3U9aS1jyH3AiifgKM8GMtixRfBFtWgFu37DWD5r15hwvUnshoQGqPZQS3qWUU9gPp8vJ1v2xqu",
+ "sell_sig": "2nFUd3Fhs228Gm4HqWXVmWJppB2oxwrKPUYqJBbiPnjwmmLAggQQ2db2DR7SFfGVgRe6pbusgpFhCLtAX6aJYDjJ",
+ "entry_intel": {
+ "quality_score": 45,
+ "unique_buyers": 0,
+ "unique_sellers": 0,
+ "organic_score": 0.45,
+ "bundle_score": 0,
+ "concentration_top10": 0
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5272,
+ "now_mc_usd": 2169,
+ "now_vs_exit_multiple": 0.412,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2200
+ }
+ },
+ {
+ "n": 11,
+ "arm": "rules-proven",
+ "mode": "rules",
+ "wallet": "3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc",
+ "mint": "9kCZKgz7Q7bHbhP7RJiVtxKdibxyBFEoiJ5xdH3Spump",
+ "symbol": "Clouseau",
+ "opened_at": "2026-07-21T03:56:24.205Z",
+ "closed_at": "2026-07-21T03:58:21.110Z",
+ "hold_seconds": 117,
+ "entry_sol": 0.05,
+ "exit_sol": 0.043298,
+ "pnl_sol": -0.006702,
+ "pnl_pct": -13.404022,
+ "peak_pct": 24.78,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 32,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985246489006522,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $CLOUSEAU on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0500 SOL expecting a profitable exit.",
+ "buy_sig": "2XVVverSj1rhgMxb139JYsoKK8LYA1JJ6wjCHPg3qipi2xswwrGiV2ZbnMVjS7rPAFiEvCn5x3y2ZCLZUNauiJMU",
+ "sell_sig": "q8T3WtDYN1YKqT3XhkFBUG8XJse6gGCxuExaB8cBSeWVxYkocB3pbZMeYAsb1B29rXDrEUkXwCKeZTpPX1hr4qT",
+ "entry_intel": {
+ "quality_score": 76,
+ "unique_buyers": 68,
+ "unique_sellers": 36,
+ "organic_score": 0.7914,
+ "bundle_score": 0.1628,
+ "concentration_top10": 0.8827
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 22143,
+ "now_mc_usd": 2184,
+ "now_vs_exit_multiple": 0.099,
+ "post_exit_high_mc_usd": 9861,
+ "post_exit_high_vs_exit_multiple": 0.445,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 14055
+ }
+ },
+ {
+ "n": 12,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "3tRrpXaDEN86y3z18oDYgoNjXfjwoX18ZUXqd4u9pump",
+ "symbol": "ANSEM",
+ "opened_at": "2026-07-21T05:56:12.250Z",
+ "closed_at": "2026-07-21T06:26:18.507Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.01,
+ "exit_sol": 0.00955,
+ "pnl_sol": -0.00045,
+ "pnl_pct": -4.4981800000000005,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 17,
+ "firewall": "warn",
+ "ledger_confidence": 0.4486000129644749,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $ANSEM on a new_mint trigger with 0.03% price impact; firewall verdict warn (score 70). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4urmiwqc4gFq5PP5V8TjwThx8nYKqvt252AkoxCyqysGuf4Xc6XzX8AGmLfJacPXFQMVm4Vm6t4SGTKN9qKdPcrK",
+ "sell_sig": "3Kw4z2AR1iKHakV7B67dZHkPHXcRRh2ETc2PCqK43Du2M8MxjEQausGyCn4uKwn6NjW5bzdPWzVqyfd4DMfjDttN",
+ "entry_intel": {
+ "quality_score": 0,
+ "unique_buyers": 19,
+ "unique_sellers": 15,
+ "organic_score": 0.331,
+ "bundle_score": 0.4836,
+ "concentration_top10": 0.9893
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5251,
+ "now_mc_usd": 2171,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 5915
+ }
+ },
+ {
+ "n": 13,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "4N3XJZSpjWqj7t1t58Mej1WyKsUHFrYnvKzFLUM6pump",
+ "symbol": "Jimothy",
+ "opened_at": "2026-07-21T06:26:38.282Z",
+ "closed_at": "2026-07-21T06:26:53.549Z",
+ "hold_seconds": 15,
+ "entry_sol": 0.01,
+ "exit_sol": 0.004256,
+ "pnl_sol": -0.005744,
+ "pnl_pct": -57.44218,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6993944154475437,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $JIMOTHY on a new_mint trigger with 0.02% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2fhiMgkQqdEXZQMA8zPFAoy96kjojCGcHpe8BNzdwgDyagj46am6x1qsvx9k9BCmTf4cqkYn8v3cLpqC6973vkwM",
+ "sell_sig": "4fgX4wHeA1CBiRWK23EZss6hKqDGBoLkR5fiBc6pKtwbM8LYeN2ouuTM92CbbbK3YFXibeeUPX4tFT6TnxGbtbea",
+ "entry_intel": {
+ "quality_score": 68,
+ "unique_buyers": 52,
+ "unique_sellers": 57,
+ "organic_score": 0.7634,
+ "bundle_score": 0.2962,
+ "concentration_top10": 0.9975
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5411,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.401,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 5208
+ }
+ },
+ {
+ "n": 14,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "DjiUwYXKRXVANurkbLTA2DHz36juVJeJL6pLXQ3zpump",
+ "symbol": "PJT",
+ "opened_at": "2026-07-21T06:26:55.428Z",
+ "closed_at": "2026-07-21T06:56:59.205Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009262,
+ "pnl_sol": -0.000738,
+ "pnl_pct": -7.382569999999999,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6986413964072485,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $PJT on a new_mint trigger with 0.03% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "62RpqH3zs6bmf8i2ypCxbnkCji9CAW5bbJ87tTYv2MXUWJmq6qFcDviu8zX7GyFM3Y51bmCz12LHsj1b1JVZTyBH",
+ "sell_sig": "w8Ee7nHW1N3scwph81MxhoZuqXPwapoenELTYVbFNuQwJj4TKbQdjqS5UXz7pWzqKmKGHtPQu2P5duFZque5eG4",
+ "entry_intel": {
+ "quality_score": 31,
+ "unique_buyers": 4,
+ "unique_sellers": 1,
+ "organic_score": 0.5082,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5247,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2309
+ }
+ },
+ {
+ "n": 15,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "BFqe7j9jwUDaaN735XzoKCvkhnL9D3tqSYNJz6bvpump",
+ "symbol": "$DELU",
+ "opened_at": "2026-07-21T06:56:59.495Z",
+ "closed_at": "2026-07-21T07:27:04.260Z",
+ "hold_seconds": 1805,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009753,
+ "pnl_sol": -0.000247,
+ "pnl_pct": -2.46916,
+ "peak_pct": 4.23,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 17,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985693333333213,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $$DELU on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "27DNPxEVqapbffJppxWjNTbuzcqkmCzWzHiAs1igW24LjPEVmf6bXaHHqGoKqeoaGkXypXdbc3scCS4RpLBiH3dG",
+ "sell_sig": "29NuFZb5JDi2LZLUXe2EFM6LWyLxGkNNZL1AtaQWRie8sZvtoWKJCP7M5GFZTzfwkwFUhWCSE8aqHrxrzBZh2s6q",
+ "entry_intel": {
+ "quality_score": 7,
+ "unique_buyers": 2,
+ "unique_sellers": 1,
+ "organic_score": 0.31,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2348
+ }
+ },
+ {
+ "n": 16,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "7zBy3BzuG6h3xxiA9uFkEnY5SHQByK83wCPCjnhopump",
+ "symbol": "Poze",
+ "opened_at": "2026-07-21T07:27:36.735Z",
+ "closed_at": "2026-07-21T07:28:39.253Z",
+ "hold_seconds": 63,
+ "entry_sol": 0.01,
+ "exit_sol": 0.006106,
+ "pnl_sol": -0.003894,
+ "pnl_pct": -38.9361,
+ "peak_pct": 19.28,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 31,
+ "firewall": "allow",
+ "ledger_confidence": 0.6991190189946596,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $POZE on a new_mint trigger with 0.02% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2jGREMdBPy7JLaYMk7fdo3kbfTsA2CrsNtM8BF9a5vQCphPzRVi8PJXJBU1YLQFQxSCvH1KDkAjUjEJ2SD86EShx",
+ "sell_sig": "31kcdBSvdwrni4xzGuVAnWZyDZkmpkG9wRagz1Z2oJYy4eAJxvR7LJMFdboz6eeiXLzL35umo12ekqiAdcisJzpx",
+ "entry_intel": {
+ "quality_score": 31,
+ "unique_buyers": 41,
+ "unique_sellers": 40,
+ "organic_score": 0.5154,
+ "bundle_score": 0.202,
+ "concentration_top10": 0.6812
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5335,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.407,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 4629
+ }
+ },
+ {
+ "n": 17,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "3ZKyPiD65kNqhqrmZEy2LahKfrt5UchfCxA4yVuypump",
+ "symbol": "MELON",
+ "opened_at": "2026-07-21T07:28:41.199Z",
+ "closed_at": "2026-07-21T07:58:44.588Z",
+ "hold_seconds": 1803,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009746,
+ "pnl_sol": -0.000254,
+ "pnl_pct": -2.53589,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 19,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985703120307214,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $MELON on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "FQBkeWFyJhZ2rAvngU7oBBrhVTsSkuCb1JXt6XFodKdd832nGXdTficshmvSjXUACKF7R2kqnd6cbTMMZqoGTKK",
+ "sell_sig": "3cDh5df2q5osyCztLAwqfX7UG3Ey9D2vaWtrUo816imWkcYbfs2KSa6LKwoUzkz42EczLQ4NgEVbYKjKkLLRfgJb",
+ "entry_intel": {
+ "quality_score": 30,
+ "unique_buyers": 3,
+ "unique_sellers": 1,
+ "organic_score": 0.4477,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2218
+ }
+ },
+ {
+ "n": 18,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "5pxMFSmYNiCHRHECy9cxxbYC8GLoEwMKJVQDEnKNpump",
+ "symbol": "TrippleBBL",
+ "opened_at": "2026-07-21T07:58:54.772Z",
+ "closed_at": "2026-07-21T08:28:59.836Z",
+ "hold_seconds": 1805,
+ "entry_sol": 0.01,
+ "exit_sol": 0.011038,
+ "pnl_sol": 0.001038,
+ "pnl_pct": 10.38374,
+ "peak_pct": 10.38,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 19,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985879889336861,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $TRIPPLEBBL on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "tQbvqseBibJfwPrKtudRvtsSQH1Msjm7cEndKsdqiXGeDbtNXeHuDhcKiLxqPePbMi18qu24pPW911fGoXF4ejx",
+ "sell_sig": "2GjVbbQd15udFkbEgsubDDWxXdMJJQFEDbdHcnJUMnDepHnjBgkpw1VB5ki8fQ4hD7Q9HPs5nSfdJzFpWqFzuiBD",
+ "entry_intel": {
+ "quality_score": 27,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.4898,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 6018,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.361,
+ "post_exit_high_mc_usd": 2313,
+ "post_exit_high_vs_exit_multiple": 0.384,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2523
+ }
+ },
+ {
+ "n": 19,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "2KSF9TqQmTxioZPs7mgFgpPo72Q7gAQhuhamujttpump",
+ "symbol": "SKE",
+ "opened_at": "2026-07-21T08:29:01.121Z",
+ "closed_at": "2026-07-21T08:29:29.818Z",
+ "hold_seconds": 29,
+ "entry_sol": 0.01,
+ "exit_sol": 0.006746,
+ "pnl_sol": -0.003254,
+ "pnl_pct": -32.53964,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 20,
+ "firewall": "allow",
+ "ledger_confidence": 0.6991301544312116,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $SKE on a new_mint trigger with 0.02% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4aGimro4N8M2H8p7jJU5njpWjViGSn6MsY7VPSfP1MUW3QXh7fXsviSfUwVvmcpBRGisEG4ngunn7w79f4io2dRa",
+ "sell_sig": "9gmCti8m3HVEU6NFka6q1kvbWVPYX2UToxcuC8M8irHnJetH614J1ZfWTg8Xm5ekikmzpbPVVQeN17HojcYhVeY",
+ "entry_intel": {
+ "quality_score": 42,
+ "unique_buyers": 15,
+ "unique_sellers": 13,
+ "organic_score": 0.641,
+ "bundle_score": 0.4111,
+ "concentration_top10": 0.9992
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5462,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.397,
+ "post_exit_high_mc_usd": 2208,
+ "post_exit_high_vs_exit_multiple": 0.404,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 3971
+ }
+ },
+ {
+ "n": 20,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "BcGDzbnqt5H56bU7vPtEDzUUUPW8RumbcFLQY5bfpump",
+ "symbol": "test",
+ "opened_at": "2026-07-21T08:29:40.502Z",
+ "closed_at": "2026-07-21T08:59:45.151Z",
+ "hold_seconds": 1805,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009753,
+ "pnl_sol": -0.000247,
+ "pnl_pct": -2.46916,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 15,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985693333333213,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $TEST on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "L8Wn5YRLKu5n1SH34s7hq3fVpbk7b5SiD5UMsoEqBN61PBDjXYxYdiK9G3PSr2u1dZuSbZC2keNUDkuf2Ltzvdt",
+ "sell_sig": "4Hv9qGK8yHV1vXHhtp7JV29yFA856bqghx4DuPJfB6sFBqrippawJKpXekSbSDpYn82QJ8Pcma7QE46mjCjGV2ek",
+ "entry_intel": {
+ "quality_score": 4,
+ "unique_buyers": 1,
+ "unique_sellers": 0,
+ "organic_score": 0.28,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2196
+ }
+ },
+ {
+ "n": 21,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "EP5dhvyFAa3PXQzQrAD4VhM91TvCbpuhNnz646nLpump",
+ "symbol": "JARRETT",
+ "opened_at": "2026-07-21T09:00:10.039Z",
+ "closed_at": "2026-07-21T09:30:15.762Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009753,
+ "pnl_sol": -0.000247,
+ "pnl_pct": -2.46917,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 17,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985693333333213,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $JARRETT on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3MGaXfJ1SuTMeaQ1VSvnAUNXaKDocRJNxh35MDr1vm7UeJfbeLmTfY9aDKspCQvFY4N58w3g98stTt8xFeUhkktR",
+ "sell_sig": "RdV5P3qKsju4UhRX5u4ziKMk2rFCkDLb7DvJgvZpVmN4dbND4MmM65tuVhz5hQkTrW6jNyUsoKCv39CMaPKppzE",
+ "entry_intel": {
+ "quality_score": 4,
+ "unique_buyers": 1,
+ "unique_sellers": 0,
+ "organic_score": 0.28,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2191
+ }
+ },
+ {
+ "n": 22,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "8pwNi88PhJbyX5xsrvnVyfDy32rUTCu4LzqmhWnzpump",
+ "symbol": "House",
+ "opened_at": "2026-07-21T13:18:41.412Z",
+ "closed_at": "2026-07-21T13:19:49.461Z",
+ "hold_seconds": 68,
+ "entry_sol": 0.01,
+ "exit_sol": 0.017388,
+ "pnl_sol": 0.007388,
+ "pnl_pct": 73.87507,
+ "peak_pct": 73.88,
+ "exit_reason": "take_profit",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": 30,
+ "firewall": "allow",
+ "ledger_confidence": 0.6990290659180672,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $HOUSE on a intel_confirmed trigger with 0.02% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2tvE2et8cAvym1QfbWx2zTgshS9XKr1V1WfkZae9kG1pGPjS8c7GPTekd6vXy9PQggNvbADcNZ66VJZeCDCzrN3E",
+ "sell_sig": "5FwxKvGF9EGitXjrvaDPWxceWR9BxToVvsxjzvfZyz5TCJxpzkoqpc2tbEkxYZ1sopufYdoQ7esmGFPHW4v778Zb",
+ "entry_intel": {
+ "quality_score": 79,
+ "unique_buyers": 39,
+ "unique_sellers": 22,
+ "organic_score": 0.8003,
+ "bundle_score": 0.2567,
+ "concentration_top10": 0.8143
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 13784,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.157,
+ "post_exit_high_mc_usd": 5889,
+ "post_exit_high_vs_exit_multiple": 0.427,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 7503
+ }
+ },
+ {
+ "n": 23,
+ "arm": "rules-proven",
+ "mode": "rules",
+ "wallet": "3334ZPryymmAuoRx13pBfB2kepL2ULexoirjwqhFKrsc",
+ "mint": "8STH8GbpZr1Qw5Qu4154HA72TJDD2MQPthH89vbSpump",
+ "symbol": "AG",
+ "opened_at": "2026-07-21T12:54:31.220Z",
+ "closed_at": "2026-07-21T13:26:08.151Z",
+ "hold_seconds": 1897,
+ "entry_sol": 0.05,
+ "exit_sol": 0.037361,
+ "pnl_sol": -0.012639,
+ "pnl_pct": -25.278346000000003,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 28,
+ "firewall": "warn",
+ "ledger_confidence": 0.44887040470511025,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $AG on a new_mint trigger with 0.03% price impact; firewall verdict warn (score 84). Committed 0.0500 SOL expecting a profitable exit.",
+ "buy_sig": "oCLrRvdUt1oGYyu5C8BB7d2GW81LygXAUdQJG9XjAMRPQH7jKWf3E6EKgbK5j4Y7Ew6NzxViiAkDn6rpJg5vYcK",
+ "sell_sig": "eU6JTMcJzk2khdWX2YAJyt37F3p5gTt4E22p6RxS4M625tZhqkgTaFgT8eCeXmAvfNLn5MKv7Hkn8JbYiYJLPX4",
+ "entry_intel": {
+ "quality_score": 63,
+ "unique_buyers": 26,
+ "unique_sellers": 8,
+ "organic_score": 0.7392,
+ "bundle_score": 0.2163,
+ "concentration_top10": 0.9476
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 25467,
+ "now_mc_usd": 11594,
+ "now_vs_exit_multiple": 0.455,
+ "post_exit_high_mc_usd": 14830,
+ "post_exit_high_vs_exit_multiple": 0.582,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "pumped",
+ "ath_mc_usd": 14830
+ }
+ },
+ {
+ "n": 24,
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "mint": "4PoLfkWCL7NNqnR3aSLKxpUM6LkxohJ8bBFRhQdJVhNY",
+ "symbol": "ROGERS",
+ "opened_at": "2026-07-21T13:17:06.618Z",
+ "closed_at": "2026-07-21T13:47:12.959Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009727,
+ "pnl_sol": -0.000273,
+ "pnl_pct": -2.7257,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985740317427388,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $ROGERS on a intel_confirmed trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "ANu5VSHsDGVLrp5PQH9xFB2SJHv61ThvCQBDEgzsjKDKsodUCzEFRkBDw2kTEWmDMjWaMkEvuHT4qq4cPbmYvk6",
+ "sell_sig": "2sWjuYtpgc8HV5xwbvU6kKbVAp3MfgqPtxN9DTvb5R5D9opc9yQdqsmwq9WMPAyEk7gkKeU4TGYoyCqjbdVaSMk1",
+ "entry_intel": {
+ "quality_score": 45,
+ "unique_buyers": 0,
+ "unique_sellers": 0,
+ "organic_score": 0.45,
+ "bundle_score": 0,
+ "concentration_top10": 0
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5251,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2203
+ }
+ },
+ {
+ "n": 25,
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "mint": "4PoLfkWCL7NNqnR3aSLKxpUM6LkxohJ8bBFRhQdJVhNY",
+ "symbol": "ROGERS",
+ "opened_at": "2026-07-21T13:17:06.624Z",
+ "closed_at": "2026-07-21T13:47:15.532Z",
+ "hold_seconds": 1809,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009716,
+ "pnl_sol": -0.000557,
+ "pnl_pct": -5.5661000000000005,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985740317427388,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $ROGERS on a intel_confirmed trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "fDyzBYmLVPBeyt3eWU6FpgQV9SXyCiCbeXZe1tTZDaybh3uK572dAdkMnQxFjur5AcQju5NvGbH6A3nQgt5Zjtu",
+ "sell_sig": "eEs5xHFfbB4kJMw8sfJibSCBHAN6ibLg5Dk5N5k33E684mTQoqErmEyFcgNUDEcNvPYqh8QUXkwMvAzcbbWDSGk",
+ "entry_intel": {
+ "quality_score": 45,
+ "unique_buyers": 0,
+ "unique_sellers": 0,
+ "organic_score": 0.45,
+ "bundle_score": 0,
+ "concentration_top10": 0
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5245,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 2203
+ }
+ },
+ {
+ "n": 26,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "Bgwx3y3LyrUonVZoYbQc2wbEiA3DjjP1rRzSdMc1pump",
+ "symbol": "GABRIEL",
+ "opened_at": "2026-07-21T13:19:49.713Z",
+ "closed_at": "2026-07-21T13:49:52.713Z",
+ "hold_seconds": 1803,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009563,
+ "pnl_sol": -0.000437,
+ "pnl_pct": -4.36845,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "intel_confirmed",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985971893399453,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $GABRIEL on a intel_confirmed trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4nWTrDsef9weqC53YLS78CWyBkBCfY9X7qMECTVjYpHxe4uHCbgyCjeNkiv4ozZeYLhHzkvUvExUG2LiPPYYXifa",
+ "sell_sig": "kQGJbJreXWX1xoaZeeenKVA9HD5xJcAc6wxEScc9U3khKgCPq31FqxsEBYXHkSaT9RQ5Y8HtT3JsCQPHmbxTTRj",
+ "entry_intel": {
+ "quality_score": 13,
+ "unique_buyers": 5,
+ "unique_sellers": 0,
+ "organic_score": 0.3857,
+ "bundle_score": 0.483,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5247,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": "rugged",
+ "ath_mc_usd": 3263
+ }
+ },
+ {
+ "n": 27,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "ocFkqjqbkEBwn3jWnz9DZNebo6ERyDMgYdLqjdkpump",
+ "symbol": null,
+ "opened_at": "2026-07-21T19:23:23.903Z",
+ "closed_at": "2026-07-21T19:27:28.608Z",
+ "hold_seconds": 245,
+ "entry_sol": 0.01,
+ "exit_sol": 0.010523,
+ "pnl_sol": 0.000523,
+ "pnl_pct": 5.225910000000001,
+ "peak_pct": 5.23,
+ "exit_reason": "timeout",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.6880114547570071,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $OCFK on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4Y7uJ6aQaNygFc714eJP5eN9erKcAjFpmUmxs2qN2a5Vyn2CVwZPFwFjTFHiTkkouVSs6BFTJCUti9GFXNUHnujD",
+ "sell_sig": "3EgBaX1KERDz2WckPDhgcptYPtSreaz5jHWR7YAU5QTL8eDWdfrA8Y5tdEBBW7DHUeWS3Eb4spKpnNrhZKTuV7NK",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5978,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 34281069,
+ "now_mc_usd": 1620,
+ "now_vs_exit_multiple": 0,
+ "post_exit_high_mc_usd": 21212439,
+ "post_exit_high_vs_exit_multiple": 0.619,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 28,
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "mint": "2qfkoNV2Y4fh8QLaKnMNobCXHE2d9xNM9CK5aSampump",
+ "symbol": "HOME",
+ "opened_at": "2026-07-21T18:59:15.991Z",
+ "closed_at": "2026-07-21T19:29:18.142Z",
+ "hold_seconds": 1802,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009701,
+ "pnl_sol": -0.000299,
+ "pnl_pct": -2.9896599999999998,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "warn",
+ "ledger_confidence": 0.44857843398311387,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "Strong memetic quality and timely narrative align with market sentiment.",
+ "rationale": "Sniped $HOME on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2oRM8CykSKQfMbme34vDC1SNb42WoJCwRgVoJr1ufmmSCrjsEbu3EH8Pw7PSGE5Toc6PNxi9a8SJFruQT5Tk3JQu",
+ "sell_sig": "3Z7bX2bWeZHHEzw1i97gUuEsvdmfpjNhiLAn1m45Wz4C4usWHq45JJ1E68BHxoQdKcvv4fP95yqG6BjXeAeuUPes",
+ "entry_intel": {
+ "quality_score": 24,
+ "unique_buyers": 3,
+ "unique_sellers": 2,
+ "organic_score": 0.47,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5253,
+ "now_mc_usd": 2171,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 29,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "2qfkoNV2Y4fh8QLaKnMNobCXHE2d9xNM9CK5aSampump",
+ "symbol": "HOME",
+ "opened_at": "2026-07-21T18:59:16.021Z",
+ "closed_at": "2026-07-21T19:29:19.967Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009695,
+ "pnl_sol": -0.000305,
+ "pnl_pct": -3.0531200000000003,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "warn",
+ "ledger_confidence": 0.44857843398311387,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "HOME token has strong memetic quality and a plausible narrative.",
+ "rationale": "Sniped $HOME on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "zCRoSoiWY6Uk1AFP3ukBvVQjmkZJwz4QGa7jRF69b2uQ2afy3JPEYWWCYvVXkEfc67iCW5XNQsTo9sDvTyfVou5",
+ "sell_sig": "3McFqr9kUSMEpYB42MbnB9JmuZjcMEnXztGyGDKqLNPUNxcF1HBBhVBYk61xT3qRR3gvPpPMorKHzdDNiAW84SWq",
+ "entry_intel": {
+ "quality_score": 24,
+ "unique_buyers": 3,
+ "unique_sellers": 2,
+ "organic_score": 0.47,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5250,
+ "now_mc_usd": 2171,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 30,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "xjcfSQLZfntX8USUHCNzT3xnphTyb5FdNJPnoJppump",
+ "symbol": null,
+ "opened_at": "2026-07-21T19:28:55.122Z",
+ "closed_at": "2026-07-21T19:32:58.438Z",
+ "hold_seconds": 243,
+ "entry_sol": 0.01,
+ "exit_sol": 0.010469,
+ "pnl_sol": 0.000469,
+ "pnl_pct": 4.69215,
+ "peak_pct": 4.69,
+ "exit_reason": "timeout",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.6880131768488564,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $XJCF on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "s8LNsqTww9Af4kXWcdS5YwrjXG5pb3M6gAW4TKmH5dGmzS8AoXkYyFJcdcNUAGw2tx8TE5VLcDcRZe5STaSUD5G",
+ "sell_sig": "8iaM7W9cQq4hyRpZaRNvXdFMKtHm2vKugL6dB8k9EYxAPJuwFmUsKQ4sFHGMnaTvG2ZojUapX5objYEGwfuJM7t",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5956,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 40035795,
+ "now_mc_usd": 1498,
+ "now_vs_exit_multiple": 0,
+ "post_exit_high_mc_usd": 1503,
+ "post_exit_high_vs_exit_multiple": 0,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 31,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "Ux3UY87EZArWr9AXgFJm6GVyp6Jr8JD6dMcPrispump",
+ "symbol": null,
+ "opened_at": "2026-07-21T19:45:30.615Z",
+ "closed_at": "2026-07-21T19:48:03.687Z",
+ "hold_seconds": 153,
+ "entry_sol": 0.01,
+ "exit_sol": 0.012085,
+ "pnl_sol": 0.002085,
+ "pnl_pct": 20.85189,
+ "peak_pct": 20.21,
+ "exit_reason": "take_profit",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.6602974696799087,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $UX3U on a graduation_ride trigger with 0.99% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "66UJNgHbCRqP1bs4LCVMhQefNtmSw3ohSL1ZERaF4rR4zBe4K68WNa2E4vZN2J9r86ZNsqHwuqAHuCAWE86jVHwq",
+ "sell_sig": "5qDWLuRXL5qvoS4ofaUHDzTpnft2MiQvcfvfTAYDgEtNVBRHvH3VmL6BNbe7Xa4o3g8si71J1ytCKaDWV5dm2orB",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5968,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 2120289,
+ "now_mc_usd": 1388,
+ "now_vs_exit_multiple": 0.001,
+ "post_exit_high_mc_usd": 1402,
+ "post_exit_high_vs_exit_multiple": 0.001,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 32,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "2UDry5tD5jom6aFXJkqimWvPuA9pAZ8NEY5YKnQUzran",
+ "symbol": null,
+ "opened_at": "2026-07-21T19:49:57.987Z",
+ "closed_at": "2026-07-21T19:50:04.190Z",
+ "hold_seconds": 6,
+ "entry_sol": 0.01,
+ "exit_sol": 0.001571,
+ "pnl_sol": -0.008429,
+ "pnl_pct": -84.29065,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6501094368095287,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $2UDR on a graduation_ride trigger with 1.25% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "d8v8pErPe2prAMrMtpTNnkpeYNgCADDQa3wr4NsEaBSuTMrYtqj4ZHfJgtticVusvpHcEtMaKU4Aj2A6DX4Svvv",
+ "sell_sig": "5Cbn5HP4tQprrXNM6bSGDCfFXYu88y1c86GisvtJcJyvRPbqyeKCWob6UJhANErNd15pkFM3FqK1Pq2D1w7qsNzX",
+ "entry_intel": {
+ "quality_score": 45,
+ "unique_buyers": 0,
+ "unique_sellers": 0,
+ "organic_score": 0.45,
+ "bundle_score": 0,
+ "concentration_top10": 0
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 10177,
+ "now_mc_usd": 1814,
+ "now_vs_exit_multiple": 0.178,
+ "post_exit_high_mc_usd": 1914,
+ "post_exit_high_vs_exit_multiple": 0.188,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 33,
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "mint": "6JsnxhafRJVGd44eYQi5ivNEEZPnrnu4pcAquZ4spump",
+ "symbol": "one",
+ "opened_at": "2026-07-21T19:49:10.891Z",
+ "closed_at": "2026-07-21T19:51:23.826Z",
+ "hold_seconds": 133,
+ "entry_sol": 0.01,
+ "exit_sol": 0.00783,
+ "pnl_sol": -0.00217,
+ "pnl_pct": -21.69801,
+ "peak_pct": 1.18,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6996556366371259,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "Moderately strong market realness and balanced buyer/seller ratio justify a momentum position.",
+ "rationale": "Sniped $ONE on a llm_intel trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "5AnADM9As9Yhbmc7q7SyzcqHzXaQYWS73ShifoYav7Mq9pzk11NNP8pmmvKak7vgGi3kMUgYHRwTuFTptk1UtUV3",
+ "sell_sig": "5boE4SVCeweYQhQdZNNBKLqqofMYkDV8Fy58Ly3gsnUYdJmcG4Cxyqu42Wt68jCTTmD9rkq9mkJuCCfpGnKKUGjE",
+ "entry_intel": {
+ "quality_score": 76,
+ "unique_buyers": 52,
+ "unique_sellers": 30,
+ "organic_score": 0.7656,
+ "bundle_score": 0.1833,
+ "concentration_top10": 0.8703
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 17500,
+ "now_mc_usd": 2171,
+ "now_vs_exit_multiple": 0.124,
+ "post_exit_high_mc_usd": 10006,
+ "post_exit_high_vs_exit_multiple": 0.572,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 34,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "6JsnxhafRJVGd44eYQi5ivNEEZPnrnu4pcAquZ4spump",
+ "symbol": "one",
+ "opened_at": "2026-07-21T19:49:11.195Z",
+ "closed_at": "2026-07-21T19:51:26.869Z",
+ "hold_seconds": 136,
+ "entry_sol": 0.01,
+ "exit_sol": 0.007828,
+ "pnl_sol": -0.002172,
+ "pnl_pct": -21.72068,
+ "peak_pct": 1.18,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6996556366371259,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "Genuine two-sided market and moderate market realness justify a small momentum position.",
+ "rationale": "Sniped $ONE on a llm_intel trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4ADCUvsc9vgvepcUMAyAdhasBGvxPNVFyW5GfRe9av9i2P6SGbLQ24yMhrxz2jnATzk66UVcEnkyaRMrC16q7yRZ",
+ "sell_sig": "31mFniq3oixxxpWQTS7rLJSDzUyv2egVZ5Wc6jZsTktEeEEU442p6Y6VnMF5TCro4yEh8ccEJXvQrgSQhUvPiZNQ",
+ "entry_intel": {
+ "quality_score": 76,
+ "unique_buyers": 52,
+ "unique_sellers": 30,
+ "organic_score": 0.7656,
+ "bundle_score": 0.1833,
+ "concentration_top10": 0.8703
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 17495,
+ "now_mc_usd": 2171,
+ "now_vs_exit_multiple": 0.124,
+ "post_exit_high_mc_usd": 10006,
+ "post_exit_high_vs_exit_multiple": 0.572,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 35,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "848nskfGay318MN7SjnnycSu8hfawxX5ZSiZDHnjpump",
+ "symbol": "掌握",
+ "opened_at": "2026-07-21T20:10:10.838Z",
+ "closed_at": "2026-07-21T20:11:34.577Z",
+ "hold_seconds": 84,
+ "entry_sol": 0.01,
+ "exit_sol": 0.015878,
+ "pnl_sol": 0.005878,
+ "pnl_pct": 58.778600000000004,
+ "peak_pct": 64.28,
+ "exit_reason": "take_profit",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.699686484449716,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "Genuine two-sided market and moderate market realness score justify a small momentum position.",
+ "rationale": "Sniped $掌握 on a llm_intel trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2MjHUZ1skK84mdXQ2D5YgsSe19y4tF5uwLeJ64QexCXdJudswyAEkPKafWYEFH8XgjMbQtrveLBVdjTAZRcfxHc7",
+ "sell_sig": "2v3a9cL28D9aovRgPXLv7db9jBRtRjds3PVnGj8Vtq8dMf5khzhnWF65cieLYt1EeyjKrLQjszkKkJdF2vCWCqAQ",
+ "entry_intel": {
+ "quality_score": 78,
+ "unique_buyers": 41,
+ "unique_sellers": 22,
+ "organic_score": 0.7692,
+ "bundle_score": 0.2364,
+ "concentration_top10": 0.925
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 40784,
+ "now_mc_usd": 1976,
+ "now_vs_exit_multiple": 0.048,
+ "post_exit_high_mc_usd": 33559,
+ "post_exit_high_vs_exit_multiple": 0.823,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 36,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "FUdX6U8ExeAqjXP4Sr4JN3U8wbZZp819P1k74vbzpump",
+ "symbol": "Elon",
+ "opened_at": "2026-07-21T20:24:11.413Z",
+ "closed_at": "2026-07-21T20:24:34.685Z",
+ "hold_seconds": 23,
+ "entry_sol": 0.01,
+ "exit_sol": 0.006256,
+ "pnl_sol": -0.003744,
+ "pnl_pct": -37.44032,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 44,
+ "firewall": "allow",
+ "ledger_confidence": 0.6996168691823402,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "Strong memetic quality and decent market realness justify a small momentum position.",
+ "rationale": "Sniped $ELON on a llm_intel trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2eBiYb9znvAHK1vymNsWFqZ5zYSkY2VvoedjT3GhKmycoLxXcMmZPFchhGc8SJF9TDhLVnD8Ps3rTjWRnbQY9vT",
+ "sell_sig": "5cXaFeP5jPRKopbj3e9NYzDWMzgQHZ9ix9ypo1yAEkH44SjnEHiip3feSTTxmHCLSWSBi82Cu1Bfa4d3e49RgK8R",
+ "entry_intel": {
+ "quality_score": 82,
+ "unique_buyers": 37,
+ "unique_sellers": 22,
+ "organic_score": 0.826,
+ "bundle_score": 0.2206,
+ "concentration_top10": 0.8446
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 12994,
+ "now_mc_usd": 2195,
+ "now_vs_exit_multiple": 0.169,
+ "post_exit_high_mc_usd": 13306,
+ "post_exit_high_vs_exit_multiple": 1.024,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 37,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "DBrD6tMi914mdbVX2tptSzYfyx4shMP7b2PqGTiypump",
+ "symbol": null,
+ "opened_at": "2026-07-21T20:42:55.696Z",
+ "closed_at": "2026-07-21T20:43:00.643Z",
+ "hold_seconds": 5,
+ "entry_sol": 0.01,
+ "exit_sol": 0.008422,
+ "pnl_sol": -0.001578,
+ "pnl_pct": -15.7776,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 16,
+ "firewall": "allow",
+ "ledger_confidence": 0.6522502328429866,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $DBRD on a graduation_ride trigger with 1.19% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2UwRFmCefeh2K6hbjVjJqdPouvA9yqhL6bA5eh88yz2jx2pvTUyaBt1419GfY9aQ1XAkVgFdExxPK9yy8tNh9ZZg",
+ "sell_sig": "5VgZ33RyUfEtGNdstchhxQjqxU3jUkR4F2395gcbQYeWWUuRX9ZF2NFSzCCmY9coB17dGMHqZyBb3MXgU6kzkEnR",
+ "entry_intel": {
+ "quality_score": 4,
+ "unique_buyers": 1,
+ "unique_sellers": 0,
+ "organic_score": 0.28,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 137916,
+ "now_mc_usd": 1489,
+ "now_vs_exit_multiple": 0.011,
+ "post_exit_high_mc_usd": 1577,
+ "post_exit_high_vs_exit_multiple": 0.011,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 38,
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "mint": "6KpQ4DVGFgkw5tovsxnjarCtApddaE6gsd9TDkvYpump",
+ "symbol": "Pink",
+ "opened_at": "2026-07-21T20:58:03.617Z",
+ "closed_at": "2026-07-21T21:28:08.041Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.01,
+ "exit_sol": 0.00973,
+ "pnl_sol": -0.00027,
+ "pnl_pct": -2.69512,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 38,
+ "firewall": "warn",
+ "ledger_confidence": 0.4485761391709926,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Pink grasshopper has a relatively real market with diverse buyers and sellers.",
+ "rationale": "Sniped $PINK on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 86). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2LUnWFMvMYDEEox8JX15uvoaSLTZtYwRhgt5Bb8c28eDdtqfBfRffxo93tiukwBwwVJKHrN6DXoFR4LbzaDyRWwx",
+ "sell_sig": "NopypDB9gWKinyCBDCBBXv6zb2xr9UPWmp11hSGfAE7ZPfD15VHVrSYRCA18oaiGBTQExurwrCa6jNBHu1GvnGQ",
+ "entry_intel": {
+ "quality_score": 34,
+ "unique_buyers": 89,
+ "unique_sellers": 69,
+ "organic_score": 0.5208,
+ "bundle_score": 0.1056,
+ "concentration_top10": 0.5344
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5260,
+ "now_mc_usd": 2172,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": 2183,
+ "post_exit_high_vs_exit_multiple": 0.415,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 39,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "6KpQ4DVGFgkw5tovsxnjarCtApddaE6gsd9TDkvYpump",
+ "symbol": "Pink",
+ "opened_at": "2026-07-21T20:58:03.702Z",
+ "closed_at": "2026-07-21T21:28:10.078Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009724,
+ "pnl_sol": -0.000276,
+ "pnl_pct": -2.7589200000000003,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 38,
+ "firewall": "warn",
+ "ledger_confidence": 0.4485761391709926,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Pink grasshopper has a relatively real market with diverse buyers and sellers.",
+ "rationale": "Sniped $PINK on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 86). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2Rag3ohdAB39ycBTK18LyjKTsaPveciPUFRy7wVsdtdkuaZQPLCdG9RQrRzzRWijNwKA3xfvak66FfCdPHpVwA6R",
+ "sell_sig": "3RpM621wjXcTpFuspbnPTmczdBZnwFMxY7Resmyp2n7NRy2aLz6wWXxRJfcWSGJ3XVdXzsTA31CaBTC1HLFHg2FZ",
+ "entry_intel": {
+ "quality_score": 34,
+ "unique_buyers": 89,
+ "unique_sellers": 69,
+ "organic_score": 0.5208,
+ "bundle_score": 0.1056,
+ "concentration_top10": 0.5344
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5257,
+ "now_mc_usd": 2172,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": 2183,
+ "post_exit_high_vs_exit_multiple": 0.415,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 40,
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "mint": "6KpQ4DVGFgkw5tovsxnjarCtApddaE6gsd9TDkvYpump",
+ "symbol": "Pink",
+ "opened_at": "2026-07-21T20:58:03.770Z",
+ "closed_at": "2026-07-21T21:28:12.237Z",
+ "hold_seconds": 1808,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009718,
+ "pnl_sol": -0.000282,
+ "pnl_pct": -2.82267,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 38,
+ "firewall": "warn",
+ "ledger_confidence": 0.4485761391709926,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Pink grasshopper has a relatively high market realness score indicating genuine two-sided market demand.",
+ "rationale": "Sniped $PINK on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 86). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "5F1XseodXuNEtQHwxEWqaipmmNFDqTvjup2G81MM9ezv6hWut24kTiAMKQ3cfsbadiCwmXnQuYZ7KGrTeze4mirz",
+ "sell_sig": "4bgYkBBZg6rBrjMSdeaNnKXgtUfcuNjj27Vr3JFqGMBZ6SZNhtqAUTMEUnzNkNzS8t185vWCrf1s5gRzNeF9xUp3",
+ "entry_intel": {
+ "quality_score": 34,
+ "unique_buyers": 89,
+ "unique_sellers": 69,
+ "organic_score": 0.5208,
+ "bundle_score": 0.1056,
+ "concentration_top10": 0.5344
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5253,
+ "now_mc_usd": 2172,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": 2183,
+ "post_exit_high_vs_exit_multiple": 0.416,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 41,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "HMimvRKhebLwRstuw5KwnZCgbvdjjdq6W1Rr66Wfpump",
+ "symbol": null,
+ "opened_at": "2026-07-22T00:04:32.381Z",
+ "closed_at": "2026-07-22T00:04:40.554Z",
+ "hold_seconds": 8,
+ "entry_sol": 0.01,
+ "exit_sol": 0.007994,
+ "pnl_sol": -0.002006,
+ "pnl_pct": -20.058329999999998,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.6542915297684923,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $HMIM on a graduation_ride trigger with 1.14% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3cPJ1iYDgjkD574od5rTZQDJdUfzPwcYco5x6UQ69NQNWA1sQ3SVDXe138mVfXwq5MLoXH3hSH5JkviSWY3P3oQc",
+ "sell_sig": "W8d92ARqJdqWNSKzM7P7CxxDLQfAfgvSEzJSazbnwk5E5QdBkdYYENTBNfjNMmiKeNZKxGKGuaTszCsfF64kTpu",
+ "entry_intel": {
+ "quality_score": 50,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.617,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 251303,
+ "now_mc_usd": 1423,
+ "now_vs_exit_multiple": 0.006,
+ "post_exit_high_mc_usd": 1437,
+ "post_exit_high_vs_exit_multiple": 0.006,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 42,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "Y4HEU5VxW4pKz2Fx6N4nJg56MtAW8pbNQSpcsy5pump",
+ "symbol": null,
+ "opened_at": "2026-07-22T00:07:35.835Z",
+ "closed_at": "2026-07-22T00:11:41.137Z",
+ "hold_seconds": 245,
+ "entry_sol": 0.01,
+ "exit_sol": 0.011168,
+ "pnl_sol": 0.001167,
+ "pnl_pct": 11.675,
+ "peak_pct": 11.49,
+ "exit_reason": "timeout",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6880080654839837,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $Y4HE on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4vUqfx4Lu9GEjMWrzQkQ2Yk3QkHfJSwEoBNdvYTngY2YidtNgAWsWiqguDnzBoJZUQe4pEY9yG3TtXnnVASfVYgz",
+ "sell_sig": "4x9YDUehcEG3d6U1KE21Z3N1ZiZA7t6FUeK5K6ipwreEtzmhpiMTfTXi6u2aD1SKep2hwVyf8cekwCGrdZFuyYc6",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5969,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 27595866,
+ "now_mc_usd": 1480,
+ "now_vs_exit_multiple": 0,
+ "post_exit_high_mc_usd": 1514,
+ "post_exit_high_vs_exit_multiple": 0,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 43,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "6r4SeD5RSLJi6ULQcBy1ub8UCMbD76VSXRRUXiQRpump",
+ "symbol": "WhiteBull",
+ "opened_at": "2026-07-22T00:16:05.000Z",
+ "closed_at": "2026-07-22T00:18:56.897Z",
+ "hold_seconds": 172,
+ "entry_sol": 0.01,
+ "exit_sol": 0.016084,
+ "pnl_sol": 0.006084,
+ "pnl_pct": 60.84188,
+ "peak_pct": 60.84,
+ "exit_reason": "take_profit",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "warn",
+ "ledger_confidence": 0.44970289661340346,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "Moderately real market with diverse buyers warrants a small momentum position.",
+ "rationale": "Sniped $WHITEBULL on a llm_intel trigger with 0.01% price impact; firewall verdict warn (score 86). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "5KnwEGAXq6GaHvwqLyDRJ9NbjnKnbvwDTvdBqMBYdcT7AmZgxnGFQmqaguRxRnVaYtgZXATxq5yzwukrL5sbgHpg",
+ "sell_sig": "gHn32VNqqBidP55xLXXAqUCS46bjQpb4sEBa2axJi6yeoXasiibtJx4aS73fGziQFDc5bcScbuYa7Dr4C8n9gpy",
+ "entry_intel": {
+ "quality_score": 30,
+ "unique_buyers": 37,
+ "unique_sellers": 12,
+ "organic_score": 0.5049,
+ "bundle_score": 0.1941,
+ "concentration_top10": 0.6137
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 41664,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.052,
+ "post_exit_high_mc_usd": 19796,
+ "post_exit_high_vs_exit_multiple": 0.475,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 44,
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "mint": "8Yh5aDoY2LwBnJXVhrurUVzX8wCK5K2XTFEpZzUUpump",
+ "symbol": "DEPE",
+ "opened_at": "2026-07-22T00:20:14.835Z",
+ "closed_at": "2026-07-22T00:22:06.435Z",
+ "hold_seconds": 112,
+ "entry_sol": 0.01,
+ "exit_sol": 0.017126,
+ "pnl_sol": 0.007126,
+ "pnl_pct": 71.26499,
+ "peak_pct": 81.88,
+ "exit_reason": "take_profit",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6996416185560599,
+ "llm_model": "fallback:groq#instant",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Strong real-market signal with multiple buyers and substantial wallet holding",
+ "rationale": "Sniped $DEPE on a llm_intel trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "39YjJq5qnSv4WbRVWjuPdoEdmcdzMko43RKCxrBhYpDjGjGoGgYHTSGcx5coycKtVVtu1kb4DhPhkEas3rktm84j",
+ "sell_sig": "PNKvurqwfjPEpAbrPMSdaqT6T1CvyZpKEbmuucTwrhGqQNvXDjrGwujfe2ErLk2vueq7MLixLjR4VNBPeRJYFby",
+ "entry_intel": {
+ "quality_score": 95,
+ "unique_buyers": 51,
+ "unique_sellers": 31,
+ "organic_score": 0.8383,
+ "bundle_score": 0.1885,
+ "concentration_top10": 0.8978
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 37396,
+ "now_mc_usd": 2469,
+ "now_vs_exit_multiple": 0.066,
+ "post_exit_high_mc_usd": 19566,
+ "post_exit_high_vs_exit_multiple": 0.523,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 45,
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "mint": "Bip1uHagXUFmmVUAPJZkjqsZXPRS8aRZRp7nK2Jepump",
+ "symbol": "CQUACK",
+ "opened_at": "2026-07-21T23:57:10.445Z",
+ "closed_at": "2026-07-22T00:27:16.912Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009731,
+ "pnl_sol": -0.000269,
+ "pnl_pct": -2.69358,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "warn",
+ "ledger_confidence": 0.44857262465303904,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "CQUACK's memetic name and symbol may attract initial speculative interest.",
+ "rationale": "Sniped $CQUACK on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2DYZf5YfB3vMcx7HfhrnEkErmvJj4Q1FiwiHX9ptcB5vdcNcssS68x2T4N7kBRbix6fyfCsSwCEkJiiiDfmX2GDk",
+ "sell_sig": "3tLcf8wSL1Km77CHqGoPrRfB6FPJvqqBaVgs6ggB66TWmuWcVBxnnkZqiqhyUeWd49RmiWSRYNpo3hTthsMzae5o",
+ "entry_intel": {
+ "quality_score": 7,
+ "unique_buyers": 2,
+ "unique_sellers": 1,
+ "organic_score": 0.31,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 46,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "StFhwtzbQEnKbWZVTad1X7bx4WXCpvufYiZ99vtpump",
+ "symbol": "MrSue",
+ "opened_at": "2026-07-22T00:00:06.388Z",
+ "closed_at": "2026-07-22T00:30:12.736Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009747,
+ "pnl_sol": -0.000253,
+ "pnl_pct": -2.53336,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 19,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985702748709222,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $MRSUE on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2tboUwQVWFUTw18rE66izQtK6RicGRhQSyR6m3AWSY7WxzHYwYATA7bTQK7KwysBufsB4d7VoouSNeFib9tLyKti",
+ "sell_sig": "YqA5YFXeyMAapXBnL9y6u2fsVAECTnjCmeS4QymaP8Zesdy4xGiwQhwneBRmZA2dtxEmBxofLpSKFve18v7Fx4q",
+ "entry_intel": {
+ "quality_score": 25,
+ "unique_buyers": 2,
+ "unique_sellers": 0,
+ "organic_score": 0.36,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 47,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "aQzS8bMPSbMYF8W6CcpUV7E65i89pXAnS2zNE7hpump",
+ "symbol": null,
+ "opened_at": "2026-07-22T00:46:35.139Z",
+ "closed_at": "2026-07-22T00:50:38.655Z",
+ "hold_seconds": 244,
+ "entry_sol": 0.01,
+ "exit_sol": 0.011201,
+ "pnl_sol": 0.001201,
+ "pnl_pct": 12.00722,
+ "peak_pct": 12.01,
+ "exit_reason": "timeout",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6642511828998282,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $AQZS on a graduation_ride trigger with 0.89% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4w4XVx5KbdofW4we3kHGaGJgj6ngi1RHZgcBBdGokZHeVUdSP8YzDjoUpgGy4a5yGKUn1iY6yV6Gzahj51Rs563g",
+ "sell_sig": "5mEEYxbqWVAKrQCqB9GEdr3SzydFXzMzNfSuisEfH9J3xJ2G98jtiNTCZVRLVUNN25ifL5ZKcYfBt7RGNkJB6ZB4",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5977,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 3974392,
+ "now_mc_usd": 1382,
+ "now_vs_exit_multiple": 0,
+ "post_exit_high_mc_usd": 1955006,
+ "post_exit_high_vs_exit_multiple": 0.492,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 48,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "7FCGc3a1xfpbNNDL155bwEULmYgkzBAxYR5h91P1pump",
+ "symbol": "FLIPPENING",
+ "opened_at": "2026-07-22T00:30:13.985Z",
+ "closed_at": "2026-07-22T01:00:18.245Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.01,
+ "exit_sol": 0.008127,
+ "pnl_sol": -0.001873,
+ "pnl_pct": -18.73254,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6988078390183883,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $FLIPPENING on a new_mint trigger with 0.03% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "42dx4KkXYHWWGhBwGzrRLNPZDKCrMe24Uwo4wFyYj66MnYEVrYVhkEur9mHeXkgEfqDgh2KNeytP5gaGSB57Fo7h",
+ "sell_sig": "5opN7ydf5bVnYetJLHf6Gyz9C6f6htWsCDXrCYXRnAdVEiM2ya6hRWpRmQnUSne9DRa13GBUJ5uA7MKoyWG12Uo1",
+ "entry_intel": {
+ "quality_score": 0,
+ "unique_buyers": 6,
+ "unique_sellers": 3,
+ "organic_score": 0.3259,
+ "bundle_score": 0.6667,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5247,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 49,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "ESQqRXx31ezW191r1KbNnxbCqS8YJyNKTiUN32NSpump",
+ "symbol": "Moon",
+ "opened_at": "2026-07-22T00:42:01.566Z",
+ "closed_at": "2026-07-22T01:12:08.303Z",
+ "hold_seconds": 1807,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009593,
+ "pnl_sol": -0.000407,
+ "pnl_pct": -4.07484,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "warn",
+ "ledger_confidence": 0.44859288299986394,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Memetic quality of 'TO THE MOON' is high and could attract significant attention",
+ "rationale": "Sniped $MOON on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4P84G5PkarcJ31eSt3Hi32WvKMrnQ8KzWf5NYfFSbf9qrPaihVF1gd7b5dBUANbHrkU2odpKFv77tUf9Yr7JuWB8",
+ "sell_sig": "4dtXkCf3vrqSk1kdSxGiihtaUwuimEDRntCRrzau5wi1tmgoapzryx5e3ECv3wL4r7h11FTvePMEzwgUMaXyA8KM",
+ "entry_intel": {
+ "quality_score": 4,
+ "unique_buyers": 1,
+ "unique_sellers": 0,
+ "organic_score": 0.28,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 50,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "JMBush7XqpBk9vMUdAV6ZiM1PBpFDMKtzsiS1sppump",
+ "symbol": null,
+ "opened_at": "2026-07-22T01:54:10.725Z",
+ "closed_at": "2026-07-22T01:58:17.066Z",
+ "hold_seconds": 246,
+ "entry_sol": 0.01,
+ "exit_sol": 0.010502,
+ "pnl_sol": 0.000502,
+ "pnl_pct": 5.02356,
+ "peak_pct": 5.02,
+ "exit_reason": "timeout",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6880100913383886,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $JMBU on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4ZjXauYYseAXEJkbARxrvmQBtZXwCDzPUaJNB8mJS6EUySFhJsXL6r21A6dXV9cx1d9fFaaCLSJz5BZPKHk6NgcY",
+ "sell_sig": "2ZfioUgWLaVB7aKfHmW33otcXYKah5H1xhF82oVg8sLSV5EM3NyFFPHV2UKMMbDwgCmmzkA1dSoTD9e9t46NnoNU",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.596,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 30472559,
+ "now_mc_usd": 1389,
+ "now_vs_exit_multiple": 0,
+ "post_exit_high_mc_usd": 30818920,
+ "post_exit_high_vs_exit_multiple": 1.011,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 51,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "yMDueAB5snd38Ca3n4tLtMDBAQWjYeeh2gBR5pUpump",
+ "symbol": null,
+ "opened_at": "2026-07-22T02:01:40.197Z",
+ "closed_at": "2026-07-22T02:04:37.151Z",
+ "hold_seconds": 177,
+ "entry_sol": 0.01,
+ "exit_sol": 0.000008,
+ "pnl_sol": -0.009992,
+ "pnl_pct": -99.92168,
+ "peak_pct": 4.64,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.6880147256235392,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $YMDU on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4KQJW6VKKeqGzE4fbLhSbGx2DmHAssNsjdRWNypQMRbQsrcPou9huAqPo3jg2EqiwZt1pobykMhAL9V67dw3KREB",
+ "sell_sig": "5PHb23YAMmSiVa5ggNNVveb8eu6nKfBaVeFV7EKWKrdzYyinStmM6kUyW2sAS5SV3TcAsoQfJqKbkaY44racVTws",
+ "entry_intel": {
+ "quality_score": 44,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5987,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 34770,
+ "now_mc_usd": 1488,
+ "now_vs_exit_multiple": 0.043,
+ "post_exit_high_mc_usd": 1569,
+ "post_exit_high_vs_exit_multiple": 0.045,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 52,
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "mint": "GdXEmrvZkrknhWaANSEzrB9MsdJ8n2cgMeKbrg6mpump",
+ "symbol": "Diamond",
+ "opened_at": "2026-07-22T01:38:13.748Z",
+ "closed_at": "2026-07-22T02:08:16.761Z",
+ "hold_seconds": 1803,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009753,
+ "pnl_sol": -0.000247,
+ "pnl_pct": -2.46917,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 17,
+ "firewall": "warn",
+ "ledger_confidence": 0.44857215516025994,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Strong memetic name and ticker align with current market sentiment.",
+ "rationale": "Sniped $DIAMOND on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2o3ELuxvMtLa3FiCKxRi4P5G4y4s3RzeKfBrVTFtAtcMJDQdxGCT7vwgZ9eUxvVnShY6PyFLyEmBdfv2Rj8c4bWm",
+ "sell_sig": "2QrFAJBQrAFSmMbcqfZ9TPtmvac5r49qKAMtnsNRsfRLrVV2Poowkxb99WCkoYehqWWErXaYxHAQHjePPUJWzUPb",
+ "entry_intel": {
+ "quality_score": 7,
+ "unique_buyers": 2,
+ "unique_sellers": 1,
+ "organic_score": 0.31,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5258,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": 2191,
+ "post_exit_high_vs_exit_multiple": 0.417,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 53,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "6dAqWB6CaTRhu5cK8GpLStvrhA3Y7YZCF2NYyfaqpump",
+ "symbol": null,
+ "opened_at": "2026-07-22T02:11:14.587Z",
+ "closed_at": "2026-07-22T02:11:32.620Z",
+ "hold_seconds": 18,
+ "entry_sol": 0.01,
+ "exit_sol": 0.007797,
+ "pnl_sol": -0.002203,
+ "pnl_pct": -22.03106,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 18,
+ "firewall": "allow",
+ "ledger_confidence": 0.6521679975782942,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $6DAQ on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "58JXtLd485udrvbWJ4F5mCEbSaanP1WS4XETQAEaqYXdoi3SoBMwEVgr5tPphEm7Y4AaJRSV4uCtswFUAei82TQo",
+ "sell_sig": "3qGmGeLb7WhepQjLvCkbpR1LpXv66La2QGEzTinFmqiGWM7UxaoRnyEJKZwjGEDkZ1iW5DzdRY2CeHDVFD7FaTGo",
+ "entry_intel": {
+ "quality_score": 22,
+ "unique_buyers": 5,
+ "unique_sellers": 0,
+ "organic_score": 0.5029,
+ "bundle_score": 0.6,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 83716,
+ "now_mc_usd": 1516,
+ "now_vs_exit_multiple": 0.018,
+ "post_exit_high_mc_usd": 1537,
+ "post_exit_high_vs_exit_multiple": 0.018,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 54,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "HLTcEdr183BNh2j5P9LkPKNHPc8gJxj1AScPoBBbpump",
+ "symbol": "tutu",
+ "opened_at": "2026-07-22T02:12:10.874Z",
+ "closed_at": "2026-07-22T02:14:12.117Z",
+ "hold_seconds": 121,
+ "entry_sol": 0.01,
+ "exit_sol": 0.008244,
+ "pnl_sol": -0.001756,
+ "pnl_pct": -17.55941,
+ "peak_pct": 18.42,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6995521871699326,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "Moderately genuine market_realness and decent buyer distribution justify a momentum position.",
+ "rationale": "Sniped $TUTU on a llm_intel trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2jFXv2qG7gNpohJmvHDXJVHGuev7Ks4bBNCHkDhmAYNFVFGJUS3mw6VKgCmZJzZHrSHH2Vv4yWHrQB5z8VbWk8yH",
+ "sell_sig": "3k2aa7JHVS1TDrncHyRFthWAgxzMhKKFtUnvU9ed2DpdV3d2VfPJcBcBKoHC3Eay6icx5Kjm5yQ9DbmtQ93Gqf7h",
+ "entry_intel": {
+ "quality_score": 83,
+ "unique_buyers": 52,
+ "unique_sellers": 33,
+ "organic_score": 0.7925,
+ "bundle_score": 0.1468,
+ "concentration_top10": 0.8533
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 14169,
+ "now_mc_usd": 2319,
+ "now_vs_exit_multiple": 0.164,
+ "post_exit_high_mc_usd": 11091,
+ "post_exit_high_vs_exit_multiple": 0.783,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 55,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "fxppSyaas2Ucvb8iR4BFCAPo8cFjHR54Xf9sz52pump",
+ "symbol": null,
+ "opened_at": "2026-07-22T02:26:40.936Z",
+ "closed_at": "2026-07-22T02:30:47.848Z",
+ "hold_seconds": 247,
+ "entry_sol": 0.01,
+ "exit_sol": 0.01113,
+ "pnl_sol": 0.00113,
+ "pnl_pct": 11.29637,
+ "peak_pct": 11.3,
+ "exit_reason": "timeout",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.6880147217031556,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $FXPP on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3DocFMRiSsvWXEAZVqFU2diBbJoi5JBXkdTe9twFjDwbkYxLhsx2AjZ5xkyMjY2Pwh2375g43Rsv31nmHtUyU58",
+ "sell_sig": "2jDySRnZ61Kg7G2x11sgcXVepEpkLWuDPWY5RvAmWQzFHJgAnWjE93WE2Fh9Un9WpnioH5tHjduqLMSMTKNvtwVi",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5967,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 49443662,
+ "now_mc_usd": 1733,
+ "now_vs_exit_multiple": 0,
+ "post_exit_high_mc_usd": 2458,
+ "post_exit_high_vs_exit_multiple": 0,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 56,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "AwyjqwWAQx72nkd6Q95JvKYTxHpBuo63CRBLomuSpump",
+ "symbol": null,
+ "opened_at": "2026-07-22T02:43:51.110Z",
+ "closed_at": "2026-07-22T02:43:57.998Z",
+ "hold_seconds": 7,
+ "entry_sol": 0.01,
+ "exit_sol": 0.008259,
+ "pnl_sol": -0.001741,
+ "pnl_pct": -17.413890000000002,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6542905305410058,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $AWYJ on a graduation_ride trigger with 1.14% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3V8VLJdCZRR8FnfFG6Vn8kHqsYEhTZnDcAiCkuNYQZaq437Cke3CjhdpGa7pqjahqLyCCsg3bWz53C4jC5XfZCNY",
+ "sell_sig": "h27tvPgWiA6hLYQ9jWJEYHv1XG43qXGS9V7TpHCQxQuyv43mz3fdvqkpGNUtiWcFhQSEJE34ZRZHYCqAcePihKr",
+ "entry_intel": {
+ "quality_score": 50,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.617,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 257383,
+ "now_mc_usd": 1426,
+ "now_vs_exit_multiple": 0.006,
+ "post_exit_high_mc_usd": 1439,
+ "post_exit_high_vs_exit_multiple": 0.006,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 57,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "5V3eh6RPZjP5zk9MwuCezCQe8X4qqjPH8Yb9piZKpump",
+ "symbol": null,
+ "opened_at": "2026-07-22T03:13:01.406Z",
+ "closed_at": "2026-07-22T03:13:09.437Z",
+ "hold_seconds": 8,
+ "entry_sol": 0.01,
+ "exit_sol": 0.00013,
+ "pnl_sol": -0.00987,
+ "pnl_pct": -98.69732,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.6542899620215475,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $5V3E on a graduation_ride trigger with 1.14% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "32mY5um3D1vCQQmXK5s5ETNwhUahAEi3s1a2e2cBuZNckD8jNfc9RkrWiH4ivA178NNgUszrt77NY1MG9TaDHesR",
+ "sell_sig": "3oNCcMqVqY1tMW88mQvExKE9J6Q7RJSozWgFX2meBh1RN4e7rpap3UFUs27HgaXgCJCRm49Jcq1F5S9xGvrvysW",
+ "entry_intel": {
+ "quality_score": 50,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.617,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 4051,
+ "now_mc_usd": 3644,
+ "now_vs_exit_multiple": 0.899,
+ "post_exit_high_mc_usd": 5005,
+ "post_exit_high_vs_exit_multiple": 1.236,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 58,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "ChRFYkB9fJSwHiTJsZ1mgztxs7Gjn7i5jPaYJQTXpump",
+ "symbol": null,
+ "opened_at": "2026-07-22T03:37:26.505Z",
+ "closed_at": "2026-07-22T03:37:35.375Z",
+ "hold_seconds": 9,
+ "entry_sol": 0.01,
+ "exit_sol": 0.000684,
+ "pnl_sol": -0.009316,
+ "pnl_pct": -93.15899,
+ "peak_pct": 0,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 22,
+ "firewall": "allow",
+ "ledger_confidence": 0.6542914234184527,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $CHRF on a graduation_ride trigger with 1.14% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3tdD8wmEP4db8wJi4q4JRfeezLXbsKuAHwiYmimdtc1FcWnNcZbF9iv8K9cJ4gCeRvaQEU4gUaqYPdPxwu9WEasx",
+ "sell_sig": "dKjaAZ8HnwKH2cJJNzmF35kquGR7UQiWAGo8feV7qcDUxCbvQt5q6X53CnKPERhFoaUcrAWPaeT7KWprtMn5p1v",
+ "entry_intel": {
+ "quality_score": 50,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.617,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 6737,
+ "now_mc_usd": 3771,
+ "now_vs_exit_multiple": 0.56,
+ "post_exit_high_mc_usd": 3795,
+ "post_exit_high_vs_exit_multiple": 0.563,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 59,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "qFJmT1z2SQwrYUUDeWz49YTXfZev196KpTcGM9Npump",
+ "symbol": null,
+ "opened_at": "2026-07-22T03:51:50.253Z",
+ "closed_at": "2026-07-22T03:55:15.900Z",
+ "hold_seconds": 206,
+ "entry_sol": 0.01,
+ "exit_sol": 0.012039,
+ "pnl_sol": 0.002039,
+ "pnl_pct": 20.390349999999998,
+ "peak_pct": 20.43,
+ "exit_reason": "take_profit",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.6880147040450197,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $QFJM on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "5fRgUcLKx1mM1hS23qTo9bQ4Ng2TqjNw8CZVCX8pBN8eqfQXSxLZGVSPiQVaAWzem9Spdhd5ZWiYT2jiqMvSmHn9",
+ "sell_sig": "4Jyb4bBv6GodJLxFvt5xsmxrDKmXtUpU7wSHEsSgueeZyyDc9DVgCPev8bnpUqkkUb2mU5cf2UrVWvCzC8M3EVYm",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5955,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 53484541,
+ "now_mc_usd": 1761,
+ "now_vs_exit_multiple": 0,
+ "post_exit_high_mc_usd": 33419046,
+ "post_exit_high_vs_exit_multiple": 0.625,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 60,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "4WkuhssWaukrwDTi2cUpPupQoVU79XxhmcDBNnkbpump",
+ "symbol": null,
+ "opened_at": "2026-07-22T03:59:56.829Z",
+ "closed_at": "2026-07-22T04:00:15.781Z",
+ "hold_seconds": 19,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009128,
+ "pnl_sol": -0.000872,
+ "pnl_pct": -8.71937,
+ "peak_pct": 0,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 19,
+ "firewall": "allow",
+ "ledger_confidence": 0.6521679971462946,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $4WKU on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3mjBVV6Ar7aVpw8HryfMWhPe1Ag2kC3Vcdd3XJXsb6cNfqP7cm6w1YGFv4ssWmgTHW7BmrHXTCAdZrdECyvnTNxd",
+ "sell_sig": "2dh4DKfXFXfVP6mbYTpETxqJxv1aSkctrXHcx9esMGmirESBQv8RVhPxhqGPGFLPHhSQ8uYZJJWnpEpeCgV8jvyh",
+ "entry_intel": {
+ "quality_score": 22,
+ "unique_buyers": 5,
+ "unique_sellers": 0,
+ "organic_score": 0.5032,
+ "bundle_score": 0.6,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 95125,
+ "now_mc_usd": 1511,
+ "now_vs_exit_multiple": 0.016,
+ "post_exit_high_mc_usd": 1520,
+ "post_exit_high_vs_exit_multiple": 0.016,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 61,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "u8oLcbptwbKATDiFApiQKTwFP3mUZ7weyzGGUZjpump",
+ "symbol": null,
+ "opened_at": "2026-07-22T04:03:22.484Z",
+ "closed_at": "2026-07-22T04:07:06.227Z",
+ "hold_seconds": 224,
+ "entry_sol": 0.01,
+ "exit_sol": 0.012018,
+ "pnl_sol": 0.002018,
+ "pnl_pct": 20.180519999999998,
+ "peak_pct": 20.18,
+ "exit_reason": "take_profit",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6880137783742067,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $U8OL on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "39VfU4KdMGanbmgDDtQuP6R1icwf9qPpgwxysDxuWyUvSbiRtJGpqYQQmdxvy8SEatYt6FEf7G1Efxtp6gJ2epWe",
+ "sell_sig": "4hCvfzKyWs2TtxBE2vfmk6P4fMuCTMRUKi2gdVNmSLqHu9WhgwYYucJRyrVAXn5PpiAYWSDDN2W32vC8edxcWs7J",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5956,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 48359811,
+ "now_mc_usd": 1842,
+ "now_vs_exit_multiple": 0,
+ "post_exit_high_mc_usd": 1841,
+ "post_exit_high_vs_exit_multiple": 0,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 62,
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "mint": "HLovMF7JyzrM9YWZreegkgSZrDT32omnMDCTzxL6pump",
+ "symbol": "birry",
+ "opened_at": "2026-07-22T03:38:37.591Z",
+ "closed_at": "2026-07-22T04:08:40.761Z",
+ "hold_seconds": 1803,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009634,
+ "pnl_sol": -0.000366,
+ "pnl_pct": -3.65916,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 28,
+ "firewall": "allow",
+ "ledger_confidence": 0.698586786375934,
+ "llm_model": "fallback:groq#instant",
+ "llm_confidence": 0.7,
+ "llm_thesis": "Strong momentum with genuine market demand",
+ "rationale": "Sniped $BIRRY on a llm_intel trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2JtzZ4PsFF6VRdMiaeMdUz2NSLimaoLMppNHvP6ym9pnv2m3nE1pxTsecbm5wrKguCKvbCoK7PLAbb64JqtdnMRZ",
+ "sell_sig": "3r55xeV4gkYBBVxa6uSmN8Ms8tf5uVarKhN5LSaFMnWFTLTRDwTbLZWptXCCPJi2Gj6su3ocDzrBtGRPMHZGw8an",
+ "entry_intel": {
+ "quality_score": 84,
+ "unique_buyers": 51,
+ "unique_sellers": 46,
+ "organic_score": 0.8401,
+ "bundle_score": 0.2244,
+ "concentration_top10": 0.7345
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 63,
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "mint": "2JjfFcZgw1ao5njxnhrQK9waSuysSQWrNqjn5D8ppump",
+ "symbol": "BLACKHOLE",
+ "opened_at": "2026-07-22T05:29:13.292Z",
+ "closed_at": "2026-07-22T05:31:07.308Z",
+ "hold_seconds": 114,
+ "entry_sol": 0.01,
+ "exit_sol": 0.016313,
+ "pnl_sol": 0.006313,
+ "pnl_pct": 63.12553,
+ "peak_pct": 63.13,
+ "exit_reason": "take_profit",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6995756414937863,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Genuine two-sided market indicated by high market_realness score.",
+ "rationale": "Sniped $BLACKHOLE on a llm_intel trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3a8nJQmLNAeLAugRyjngyfffeRHwhyzHXDQoGGARh2AfsuCVV4aHYfHQeDsXscANLUg4cGk9Z9bUekzgbMX4Qs7Q",
+ "sell_sig": "3kG79Py54KQU1kuiH3EAfPqTobbeM9fjR6hAoLxZ82frRZXwjFuETDe8CFskKgthWmaZfnRCwo4Ug6y1gEumhn31",
+ "entry_intel": {
+ "quality_score": 83,
+ "unique_buyers": 54,
+ "unique_sellers": 33,
+ "organic_score": 0.8167,
+ "bundle_score": 0.1896,
+ "concentration_top10": 0.8671
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 29585,
+ "now_mc_usd": 2194,
+ "now_vs_exit_multiple": 0.074,
+ "post_exit_high_mc_usd": 14830,
+ "post_exit_high_vs_exit_multiple": 0.501,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 64,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "6Jyf3koMSrD8oXJVTy36rvh3wqtAMb9fpm3vkbKXpump",
+ "symbol": "boss",
+ "opened_at": "2026-07-22T05:48:07.022Z",
+ "closed_at": "2026-07-22T06:18:09.584Z",
+ "hold_seconds": 1803,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009533,
+ "pnl_sol": -0.000467,
+ "pnl_pct": -4.67428,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 36,
+ "firewall": "warn",
+ "ledger_confidence": 0.44860744537357006,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Strong market realness and diverse buyer base justify a momentum position.",
+ "rationale": "Sniped $BOSS on a llm_intel trigger with 0.03% price impact; firewall verdict warn (score 86). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "MVJ9vVvfDRkQnyjyE9VvS9JNAPVUxizFekGUxP8ppesxmc9nxU39KTt6KtUdkiDHZt9pUvWTJ2HuBiAMgQ1udMr",
+ "sell_sig": "m2EYbCGJ1rhMbJfi4D5MUDBu5XhRSgZAfwa1sNjKKei1GVGUgyirsA2SVDDAkmPsBdLvRwmT6LCQNErGKJw33Zr",
+ "entry_intel": {
+ "quality_score": 39,
+ "unique_buyers": 44,
+ "unique_sellers": 36,
+ "organic_score": 0.5552,
+ "bundle_score": 0.1008,
+ "concentration_top10": 0.7896
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5269,
+ "now_mc_usd": 2175,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": 2181,
+ "post_exit_high_vs_exit_multiple": 0.414,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 65,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "4zgEaCezd8A2JLRGXkqKSUquNcMrVcav9NiRvyFGpump",
+ "symbol": "$RUGHUNTER",
+ "opened_at": "2026-07-22T08:34:03.301Z",
+ "closed_at": "2026-07-22T09:04:05.330Z",
+ "hold_seconds": 1802,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009753,
+ "pnl_sol": -0.000247,
+ "pnl_pct": -2.46916,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 17,
+ "firewall": "warn",
+ "ledger_confidence": 0.4485705592207721,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Strong memetic name and timely narrative suggest potential for real momentum.",
+ "rationale": "Sniped $$RUGHUNTER on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "41u8RyAW9x6vkifP8QM3mvQbNzcQG9hBKUXoSFwxYvQFxSyvrYkHw2GiXtKTs3kyi96HsZWHuB9TMLJ1SSwxeokY",
+ "sell_sig": "4JLMsmKwYPfRKNW1DTSuvECxM1cMqZiQV2mTAETCfyWkc1Bsc7op788u5wj2DnkkdECSFS1k8VVparL47ep4sNsb",
+ "entry_intel": {
+ "quality_score": 4,
+ "unique_buyers": 1,
+ "unique_sellers": 0,
+ "organic_score": 0.28,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5252,
+ "now_mc_usd": 2172,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 66,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "21oyC4hrRtwyRj5xZ3AeCbXXbX1UP35Pni8i7LCYpump",
+ "symbol": "RCC",
+ "opened_at": "2026-07-22T09:42:16.492Z",
+ "closed_at": "2026-07-22T10:12:22.032Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009753,
+ "pnl_sol": -0.000247,
+ "pnl_pct": -2.46917,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 16,
+ "firewall": "warn",
+ "ledger_confidence": 0.4485693333335771,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Memetic token name and low market cap may attract speculative buyers.",
+ "rationale": "Sniped $RCC on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "4YEjbyy4kKNxc2XGH7ivQmzqTUA4ECtdX92uru9hn4hpbAzC7fxhkQtAfYfEPLK4rVLLKYpcJYH1vcERv46gePFf",
+ "sell_sig": "5QHUkpr3cPRiQzDu9YCCvmBUeG6egv5ToWhqfo9cAYBGaiDXvVxc9sWDD1fB3cz9ihLJk3dbvKdKeyYDseNMXUJG",
+ "entry_intel": {
+ "quality_score": 0,
+ "unique_buyers": 3,
+ "unique_sellers": 2,
+ "organic_score": 0.4116,
+ "bundle_score": 0.525,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 67,
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "mint": "F8AdGWxz9RzffM5SgrBU4pkYgsfzxCVAGPpQBehepump",
+ "symbol": "COOK",
+ "opened_at": "2026-07-22T14:16:05.493Z",
+ "closed_at": "2026-07-22T14:46:09.091Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.01,
+ "exit_sol": 0.011424,
+ "pnl_sol": 0.001424,
+ "pnl_pct": 14.237739999999999,
+ "peak_pct": 14.24,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "warn",
+ "ledger_confidence": 0.44871944222554466,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Strong memetic potential with a catchy name and timely narrative.",
+ "rationale": "Sniped $COOK on a llm_intel trigger with 0.03% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "58YN66FzxC3nqEwcWzZT6pcZzFmQgjXFzpeE5GA14RebtVqKUuH3Ma9mvnPRGuEWpc2febcknnQ1oPGcW72LKJqZ",
+ "sell_sig": "2tfWHSCT8yFtbfE52X4LSbPNLcN8VjSmzy67k5NUuHzrgws6ZzCGizvN71f1SNhCuxnzfxVwf8D9fDVvGL5KZkck",
+ "entry_intel": {
+ "quality_score": 20,
+ "unique_buyers": 3,
+ "unique_sellers": 1,
+ "organic_score": 0.4285,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 6867,
+ "now_mc_usd": 2491,
+ "now_vs_exit_multiple": 0.363,
+ "post_exit_high_mc_usd": 2841,
+ "post_exit_high_vs_exit_multiple": 0.414,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 68,
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "mint": "AD4qkfKC8S2686xHgTpiWh5Spp1TN2MbKpNa49Zcpump",
+ "symbol": "doge",
+ "opened_at": "2026-07-22T15:13:02.564Z",
+ "closed_at": "2026-07-22T15:43:06.113Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009591,
+ "pnl_sol": -0.000409,
+ "pnl_pct": -4.08709,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 17,
+ "firewall": "warn",
+ "ledger_confidence": 0.4485930626700438,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "Strong memetic potential from 'swole' and 'doge' combination",
+ "rationale": "Sniped $DOGE on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "5YQFSrKHGmtVXNMurqc87cHnhnU42vMff4Vh6gjuBJmnqzDwFoWTNQ1v5hf2wVtTazkRTRivYdKr3jMaWP6qk6C4",
+ "sell_sig": "2XhP5rYxHzsf8JQ3835BbD7zsNwRHFEMruQuFeibPwscSk2RjERB1FvQrTQsCzaEg4HQHj7jNBf76znb7tR6nhZG",
+ "entry_intel": {
+ "quality_score": 30,
+ "unique_buyers": 3,
+ "unique_sellers": 1,
+ "organic_score": 0.5208,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 69,
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "mint": "6BiSe1rHss7HBchX9EDveQWZCJytaDy3LhBpqbnPpump",
+ "symbol": "REC",
+ "opened_at": "2026-07-22T17:29:48.453Z",
+ "closed_at": "2026-07-22T17:59:52.434Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009735,
+ "pnl_sol": -0.000265,
+ "pnl_pct": -2.6495,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 20,
+ "firewall": "warn",
+ "ledger_confidence": 0.44857197831453977,
+ "llm_model": "fallback:groq#instant",
+ "llm_confidence": 0.7,
+ "llm_thesis": "REC exhibits strong market_realness signals and timely narrative",
+ "rationale": "Sniped $REC on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "JdgR4VjVcP1HX6f5xwGz5GjR5G9FgtR5Qcz12qeVHqdWLHU7nKwFFYMoQkuecfp2trwTDx5BEeEDVuWKRfBjpaA",
+ "sell_sig": "3M1JDnvZVGUPZhPSmcZwJfa4JtqhMzvmMWJkR16avMZDmZiojskrRworn82d3sYQ8m3S64naBXTZzAb4ZHAzFPVv",
+ "entry_intel": {
+ "quality_score": 23,
+ "unique_buyers": 4,
+ "unique_sellers": 2,
+ "organic_score": 0.4553,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 70,
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "mint": "JDBziXWvxsLe7Na5LNZD3eSNrFBcQad3cCtvTZ4rpump",
+ "symbol": "DUCK",
+ "opened_at": "2026-07-22T22:36:09.029Z",
+ "closed_at": "2026-07-22T22:37:21.068Z",
+ "hold_seconds": 72,
+ "entry_sol": 0.01,
+ "exit_sol": 0.016559,
+ "pnl_sol": 0.006559,
+ "pnl_pct": 65.58952000000001,
+ "peak_pct": 65.59,
+ "exit_reason": "take_profit",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 36,
+ "firewall": "allow",
+ "ledger_confidence": 0.699739359932813,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "DUCK has a decent market_realness score and a relatively balanced buyer-seller ratio.",
+ "rationale": "Sniped $DUCK on a llm_intel trigger with 0.01% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "X6GpUitp5F4sp7GqRdQS6X9mgRfEEsJC6b5kjnvBgYALUxSEDMwAjxnK1F3ycSvyoWJyLCPZduN1v3VSLQbi2Mw",
+ "sell_sig": "3XWzmFtAuSXovRLFRwd6iXw2iueG9ywZdYusfBv8Nv159JRQqLm4GFN3HbcHYXhB2dpPU8RxBixeB6YWDUgXenuY",
+ "entry_intel": {
+ "quality_score": 78,
+ "unique_buyers": 48,
+ "unique_sellers": 24,
+ "organic_score": 0.7823,
+ "bundle_score": 0.1944,
+ "concentration_top10": 0.8605
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 49102,
+ "now_mc_usd": 2185,
+ "now_vs_exit_multiple": 0.045,
+ "post_exit_high_mc_usd": 40087,
+ "post_exit_high_vs_exit_multiple": 0.816,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 71,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "LWZvn5VWRk23xzzkbrSR1yCaWnKNcU1tFCMAnvppump",
+ "symbol": "Aevon",
+ "opened_at": "2026-07-23T00:13:50.867Z",
+ "closed_at": "2026-07-23T00:17:53.895Z",
+ "hold_seconds": 243,
+ "entry_sol": 0.01,
+ "exit_sol": 0.010205,
+ "pnl_sol": 0.000205,
+ "pnl_pct": 2.04817,
+ "peak_pct": 4.84,
+ "exit_reason": "timeout",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6501564930344323,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $AEVON on a graduation_ride trigger with 1.25% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "28toKm1e1RGikeTQiwqPSe7nnkQ9GhhSaJb1jPbLPmBU7XW7h7tfMoctNe6QvqH3pRmQpUAc8Eekwj8nzsGPaBb6",
+ "sell_sig": "2FNvyX9kFxk8g7TzTEcqjUVeU6yideRWtT8Yq4ZPcJdoNFAGRpyM9ufA4SFeRGDJf7GFoAQKTxrituHBvEZxMGov",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 80495,
+ "now_mc_usd": 2634,
+ "now_vs_exit_multiple": 0.033,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 72,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "5f3wMCTBQyhrpgL4NtxaDpdah48TXWHYYg7kUYe7pump",
+ "symbol": "Jrool",
+ "opened_at": "2026-07-23T00:00:06.582Z",
+ "closed_at": "2026-07-23T00:30:10.181Z",
+ "hold_seconds": 1804,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009753,
+ "pnl_sol": -0.000247,
+ "pnl_pct": -2.47069,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985702866343945,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $JROOL on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2FiYZi1GkErcQ6QWuzBCjYYwPbfvd4P2GCvheLqZfys4XcWJvT7RA4Ca3znuwZCN9dciDXaLHT8e6Bier5UxB8fD",
+ "sell_sig": "3TL94ZrKC3m659bMrRdNNR3pfkweUy89LGN3FaatymKSdfekryiC3edpd6sEJwAeg2Swa26ZBxs16ZVyPNSP5GPB",
+ "entry_intel": {
+ "quality_score": 24,
+ "unique_buyers": 2,
+ "unique_sellers": 0,
+ "organic_score": 0.3597,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5251,
+ "now_mc_usd": 2171,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 73,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "5phZkjAE7sgTA5toSrAyduKzoWS1mQULDXNEuZUyASdQ",
+ "symbol": "Walter",
+ "opened_at": "2026-07-23T00:35:39.766Z",
+ "closed_at": "2026-07-23T00:35:54.655Z",
+ "hold_seconds": 15,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009771,
+ "pnl_sol": -0.000229,
+ "pnl_pct": -2.28613,
+ "peak_pct": 0,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6501516871444839,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $WALTER on a graduation_ride trigger with 1.25% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "58S3WgMK9fKcEpbG8Dm7xcG2TYYiw62TBKVSyezgJ79ST3pGfaXEsr8drZAoXLgpRQtxAweNPoj2B8GgJYodRh2r",
+ "sell_sig": "3A9umJdUAK68QAjgWLNLmj37TWzfFqttASbbY6YrL6REyyeBEvuGoPGYXp6ZhycyWHGNt9dJ4NwtHdcQfkU3dteL",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 74229,
+ "now_mc_usd": 6027,
+ "now_vs_exit_multiple": 0.081,
+ "post_exit_high_mc_usd": 31026,
+ "post_exit_high_vs_exit_multiple": 0.418,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 74,
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "mint": "9givLJK4dAx6jdxCYuqti5b3AvMKzenQFTzCy3k7pump",
+ "symbol": "RACOIN",
+ "opened_at": "2026-07-23T00:37:41.576Z",
+ "closed_at": "2026-07-23T00:39:49.657Z",
+ "hold_seconds": 128,
+ "entry_sol": 0.01,
+ "exit_sol": 0.002172,
+ "pnl_sol": -0.007828,
+ "pnl_pct": -78.27683,
+ "peak_pct": 55.04,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 38,
+ "firewall": "warn",
+ "ledger_confidence": 0.4497029843772383,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "RACOIN has a relatively genuine market with diverse buyers and sellers.",
+ "rationale": "Sniped $RACOIN on a llm_intel trigger with 0.01% price impact; firewall verdict warn (score 86). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "kg77xn2BuXqPfxeQpAToRMWRyiMBVhn7YzEi52W1LBYRUY83Smpjh2nmsW6Fab95RrtePSnR54tskbB1sYEa3T3",
+ "sell_sig": "REUibcHUsDt2HCxc9BpRYFY87e6fvmjRV2oKYxDri9TeTaKSqjJjvxYo4KGmuF4mh7sSXZMgAesN8kPYkpQebsS",
+ "entry_intel": {
+ "quality_score": 26,
+ "unique_buyers": 43,
+ "unique_sellers": 8,
+ "organic_score": 0.4936,
+ "bundle_score": 0.247,
+ "concentration_top10": 0.5903
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5629,
+ "now_mc_usd": 2171,
+ "now_vs_exit_multiple": 0.386,
+ "post_exit_high_mc_usd": 2192,
+ "post_exit_high_vs_exit_multiple": 0.389,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 75,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "Ec1ZGqoQmwSzMgKABk6foiKPtNFMPsxRBm1nYyHtpump",
+ "symbol": "VFX",
+ "opened_at": "2026-07-23T00:37:36.093Z",
+ "closed_at": "2026-07-23T00:40:34.678Z",
+ "hold_seconds": 179,
+ "entry_sol": 0.01,
+ "exit_sol": 0.011868,
+ "pnl_sol": 0.001868,
+ "pnl_pct": 18.68204,
+ "peak_pct": 20.68,
+ "exit_reason": "take_profit",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6521215598067988,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $VFX on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3AXFqqv4RMdYiTZeem68GWRzzxFgLK5X2kHqgPnEaaDpV7AiXNKnSgRGrv7sQadabEMM5iWzwpTC9eiESTYhM6nW",
+ "sell_sig": "4GL73TJ1Fo6dJyk97cRAn8qNQPxDxRJh6z567b21BEbfUhzvJDqAJ7ym7EMinyBCoNiZMufq77nKoBvvrKLwkgt6",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 99353,
+ "now_mc_usd": 5183,
+ "now_vs_exit_multiple": 0.052,
+ "post_exit_high_mc_usd": 46155,
+ "post_exit_high_vs_exit_multiple": 0.465,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 76,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "8UvDwzd7g6UDLjTu5qyRBVfUn1KuwQC9VxDBnUyqmvgB",
+ "symbol": "FLL",
+ "opened_at": "2026-07-23T00:45:45.856Z",
+ "closed_at": "2026-07-23T00:48:29.798Z",
+ "hold_seconds": 164,
+ "entry_sol": 0.01,
+ "exit_sol": 0.012001,
+ "pnl_sol": 0.002001,
+ "pnl_pct": 20.01387,
+ "peak_pct": 20.01,
+ "exit_reason": "take_profit",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6521148514567614,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $FLL on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3cyMrLSUm4YQnm8yCDy9vy9MsrkyX25kjNv2mp6doAo4zRY42U67XwzpyPMWhmK2eJxkL1DCkmm4H9XwbwX36k96",
+ "sell_sig": "3XKYRe9Vgj2cgUGuqw94DugWrkfcmzYM5rNN8Zzfiw74zsr6QJ6cmPqQr7UYnMRJPoPz6cEoWjBGV5SrCcicM5Z",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 99101,
+ "now_mc_usd": 3467,
+ "now_vs_exit_multiple": 0.035,
+ "post_exit_high_mc_usd": 46459,
+ "post_exit_high_vs_exit_multiple": 0.469,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 77,
+ "arm": "oracle-open",
+ "mode": "rules",
+ "wallet": "54tvt4wmrb9KbxSczoDvbo5mjLJupdUA7ZuePa8hv23M",
+ "mint": "BB9Cv982GzJ3dFcqSiFRsbvtKjkB4nj92p2vB5iHxaD3",
+ "symbol": "Free",
+ "opened_at": "2026-07-23T00:30:13.231Z",
+ "closed_at": "2026-07-23T01:00:19.763Z",
+ "hold_seconds": 1807,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009753,
+ "pnl_sol": -0.000247,
+ "pnl_pct": -2.46917,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "new_mint",
+ "oracle_conviction": 17,
+ "firewall": "allow",
+ "ledger_confidence": 0.6985693333333213,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $FREE on a new_mint trigger with 0.04% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2CR2E5tPNdpVzjbQ7uJhZ4EeG7C3tF4ztip4gW2yPS2kYxc9VqLzaZmivtfuwsE3ypSwoRzjVcLXxUT1daFTgKSV",
+ "sell_sig": "3XRyTcx49Ah2CuPsTYZfKhqU3G3v4sFZPhJjjAWby7iBzrXrfF7h5vDPegvza4j2eWxM3B2XpFfFdGTNZJBv9r1Q",
+ "entry_intel": {
+ "quality_score": 4,
+ "unique_buyers": 1,
+ "unique_sellers": 0,
+ "organic_score": 0.28,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 78,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "6WP8crGiBx4oar4ptPQ5emVUgPKe6qsKz4oxF5dWpump",
+ "symbol": "SAVIOUR",
+ "opened_at": "2026-07-23T00:50:19.030Z",
+ "closed_at": "2026-07-23T01:20:25.448Z",
+ "hold_seconds": 1806,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009753,
+ "pnl_sol": -0.000247,
+ "pnl_pct": -2.46917,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 17,
+ "firewall": "warn",
+ "ledger_confidence": 0.4485693427531773,
+ "llm_model": "fallback:groq#instant",
+ "llm_confidence": 0.7,
+ "llm_thesis": "SAVIOR may have organic demand due to a compelling narrative and the creator's launch history",
+ "rationale": "Sniped $SAVIOUR on a llm_intel trigger with 0.04% price impact; firewall verdict warn (score 84). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "5vipir2MKQKQNHrDA6nVrRV9wUx3MmtbCMC2u419ucmE5u2W8HFgJy1TRahP7wgnsBjax94p64qts6o145ny4kBW",
+ "sell_sig": "2E5ZFqKfi17KBkDKXTZiWRA4joSxPWhaVMrFsHSFMrL4KW4RhmzyvrGzmJfA26jexBPGp1nyi924EZmhuAK4VUUL",
+ "entry_intel": {
+ "quality_score": 4,
+ "unique_buyers": 1,
+ "unique_sellers": 0,
+ "organic_score": 0.28,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5248,
+ "now_mc_usd": 2170,
+ "now_vs_exit_multiple": 0.413,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 79,
+ "arm": "llm-claude",
+ "mode": "llm",
+ "wallet": "65KauYM8hnLAZVt1KWj3mz6fyhKMyzHXDjz1r5cLw3h8",
+ "mint": "D57Mwn2J7MfvWCtKMNCVs6LXNZNVsCcGLk3CeL3pump",
+ "symbol": "MCP",
+ "opened_at": "2026-07-23T01:24:04.814Z",
+ "closed_at": "2026-07-23T01:25:05.393Z",
+ "hold_seconds": 61,
+ "entry_sol": 0.01,
+ "exit_sol": 0.011065,
+ "pnl_sol": 0.001065,
+ "pnl_pct": 10.64506,
+ "peak_pct": 38.57,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "warn",
+ "ledger_confidence": 0.44974178173293317,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.8,
+ "llm_thesis": "MCP Genesis has a reasonably high market_realness score indicating genuine two-sided market activity.",
+ "rationale": "Sniped $MCP on a llm_intel trigger with 0.01% price impact; firewall verdict warn (score 86). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3hStaap3zHFtCh8mobqh6hJqcpT3wbjKbydwzWBCpt2AaL6HVbdiaQB7qYsTrhEUXex9N8Ag6d1aFLiYgFut1Sd",
+ "sell_sig": "i7KvnkdqUjdT2zEWAVhb9e75f1z9PxnWfdPDc62eMTqRUxkVsHbuKnXFebNapDqWk9drBfqxKg22tBtjekkk3dE",
+ "entry_intel": {
+ "quality_score": 37,
+ "unique_buyers": 108,
+ "unique_sellers": 34,
+ "organic_score": 0.5477,
+ "bundle_score": 0.1414,
+ "concentration_top10": 0.3248
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 32977,
+ "now_mc_usd": 2589,
+ "now_vs_exit_multiple": 0.079,
+ "post_exit_high_mc_usd": 45600,
+ "post_exit_high_vs_exit_multiple": 1.383,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 80,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "DauRrYMGngX25KGwe8AWopHaajiHmEXcxPqcZwURpump",
+ "symbol": "RWA",
+ "opened_at": "2026-07-23T01:32:44.631Z",
+ "closed_at": "2026-07-23T01:34:40.980Z",
+ "hold_seconds": 116,
+ "entry_sol": 0.01,
+ "exit_sol": 0.006435,
+ "pnl_sol": -0.003565,
+ "pnl_pct": -35.64814,
+ "peak_pct": 10.64,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6521990465099807,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $RWA on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2oyvX6YjMkLqaoPhji53zswWTxdWkZtPSyQEj9juN1JLmK16xTrV9LkofHTkDbigEB2KpYZ1PRCVwmPRU1vPRkAn",
+ "sell_sig": "2wYSo99Em8hooTAoQYUQsQSU2uUsXjSwGLqBmXL1dp6iUmeRLQLhJNe1P2xtSWt3siSwNPCkRwFQdyz1Ug2C3C3a",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 78671,
+ "now_mc_usd": 3108,
+ "now_vs_exit_multiple": 0.04,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 81,
+ "arm": "llm-auto",
+ "mode": "llm",
+ "wallet": "HXDzfb4creqEuvpkBRoacFJFQKXQDz7YDB7CiFNg3F3s",
+ "mint": "GzLyn1gAzD7MJi5L3fcgXWSLqKTi5m1rWxrowjmipump",
+ "symbol": "COREY",
+ "opened_at": "2026-07-23T01:40:08.504Z",
+ "closed_at": "2026-07-23T01:40:30.902Z",
+ "hold_seconds": 22,
+ "entry_sol": 0.01,
+ "exit_sol": 0.007361,
+ "pnl_sol": -0.002639,
+ "pnl_pct": -26.38929,
+ "peak_pct": 0,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": null,
+ "firewall": "warn",
+ "ledger_confidence": 0.44922445904131136,
+ "llm_model": "fallback:ovh",
+ "llm_confidence": 0.7,
+ "llm_thesis": "Genuine two-sided market and moderate market realness score indicate potential for real momentum.",
+ "rationale": "Sniped $COREY on a llm_intel trigger with 0.02% price impact; firewall verdict warn (score 86). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "31GDdmcabG5wpovNjSqKTNWzgmebxJSjG41s9fFz673m7SqT233FRxkgi18BEHkoHjAL5cw6Skh99DmiYV6T4Ns5",
+ "sell_sig": "4QkAsfYVwZgARUutp6tuxXGen7Et9zHTomhwAj3hheekPdmKuVDVgEPVCVURvsR3recacTWC2dKwr3iPfxLvZc1i",
+ "entry_intel": {
+ "quality_score": 15,
+ "unique_buyers": 41,
+ "unique_sellers": 27,
+ "organic_score": 0.4509,
+ "bundle_score": 0.33,
+ "concentration_top10": 0.8721
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 7306,
+ "now_mc_usd": 2369,
+ "now_vs_exit_multiple": 0.324,
+ "post_exit_high_mc_usd": 2522,
+ "post_exit_high_vs_exit_multiple": 0.345,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 82,
+ "arm": "llm-grok",
+ "mode": "llm",
+ "wallet": "HBgNvnffvbKRzE1vgmvTfKLNq2taETKZJDpZRHcAm8Ca",
+ "mint": "Bis83beVT53tJQPEoqCNm1rSTVEr7mKugsZXehnKpump",
+ "symbol": "APE",
+ "opened_at": "2026-07-23T01:21:34.909Z",
+ "closed_at": "2026-07-23T01:51:36.934Z",
+ "hold_seconds": 1802,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009077,
+ "pnl_sol": -0.000923,
+ "pnl_pct": -9.2284,
+ "peak_pct": 0,
+ "exit_reason": "timeout",
+ "entry_trigger": "llm_intel",
+ "oracle_conviction": 13,
+ "firewall": "warn",
+ "ledger_confidence": 0.4486850005459779,
+ "llm_model": "fallback:groq#instant",
+ "llm_confidence": 0.8,
+ "llm_thesis": "A moderate momentum position in APE is worth taking due to a decent two-sided market and a sizable dev buy.",
+ "rationale": "Sniped $APE on a llm_intel trigger with 0.03% price impact; firewall verdict warn (score 70). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "5zRnRPwHpoqagsSQbADvJXqa7KFDTDQb8252cyyLCj32BqtVoDcSAH9PwiTAytZzzgtuaAk4gf3rzLTp7kin5nke",
+ "sell_sig": "4HRegva2GWrNAfJ7igbZ6jVefzMevEtkaA2R9fGbBbEz3HxTu6VFc37yMKhCh2fyVui7F3GzZzoonkSD2btEJniQ",
+ "entry_intel": {
+ "quality_score": 16,
+ "unique_buyers": 24,
+ "unique_sellers": 20,
+ "organic_score": 0.4622,
+ "bundle_score": 0.2042,
+ "concentration_top10": 0.9719
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 5313,
+ "now_mc_usd": 2197,
+ "now_vs_exit_multiple": 0.414,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 83,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "9MpNNbsqTJgzKZaF2ChTrkD6tZroQzPKJSw11y8Upump",
+ "symbol": "CWARDIN",
+ "opened_at": "2026-07-23T02:04:23.025Z",
+ "closed_at": "2026-07-23T02:07:33.828Z",
+ "hold_seconds": 191,
+ "entry_sol": 0.01,
+ "exit_sol": 0.00672,
+ "pnl_sol": -0.00328,
+ "pnl_pct": -32.80191,
+ "peak_pct": 16.79,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6521995302029273,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $CWARDIN on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "48XKkBjnq8FDUGvfghhh3sC1e6ehryBaGzieGXYkpH7ZBHfWj1SJdeSnHNeEnzCA47x6KUZBvvSSwSazTXjz1hmW",
+ "sell_sig": "61X8qdSnxrfAJgSPn9BQNwjfrVdeh98GWeL4Qy3ukiEDmCTYyqiUJziWVnJAPHFym6QmfkdYeRbu5vqfPqVuchEx",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 82366,
+ "now_mc_usd": 3038,
+ "now_vs_exit_multiple": 0.037,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 84,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "77xRTpejWU6A9nfyAcu6T7ugZ7YDjakYWxGCeadmpump",
+ "symbol": "BENNER",
+ "opened_at": "2026-07-23T02:10:59.443Z",
+ "closed_at": "2026-07-23T02:14:07.495Z",
+ "hold_seconds": 188,
+ "entry_sol": 0.01,
+ "exit_sol": 0.006569,
+ "pnl_sol": -0.003431,
+ "pnl_pct": -34.3102,
+ "peak_pct": 15.91,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6521962701092452,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $BENNER on a graduation_ride trigger with 1.20% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "31VK6XqCndHXPBgwpGKSroSsVzSVbkWCqLYJKnFhdVbtpU8FqSpVgiMnu8gXTbKRp4WTHf3LhGJrtt4VNGqxUvpC",
+ "sell_sig": "5tPMbwqDNAcpRbL58QPFVdBthf2Ym5cRpg5sfXDhrUnzRwHUx4QH8Pom8hDLJQ6zW3LSHpeRiqD3NFZ1oPM2rqVq",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 82120,
+ "now_mc_usd": 3038,
+ "now_vs_exit_multiple": 0.037,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 85,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "7kGoyY23HEqDYjJhEcYNUdEX2dxF4xWk3dc8TvMbpump",
+ "symbol": "AGIGUY",
+ "opened_at": "2026-07-23T02:17:42.803Z",
+ "closed_at": "2026-07-23T02:20:52.720Z",
+ "hold_seconds": 190,
+ "entry_sol": 0.01,
+ "exit_sol": 0.00656,
+ "pnl_sol": -0.00344,
+ "pnl_pct": -34.40364,
+ "peak_pct": 15.86,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6522068377254041,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $AGIGUY on a graduation_ride trigger with 1.19% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "3KTFL7GNpvXGb7tn8iV4rQkCUtso6Nm4RDyYTwd9GiW5rTgLLXKgPcVRNwhdNCPPLgpajBUYBvjDu8j9UhNyxtYX",
+ "sell_sig": "5k6PNTxfiK3WG55PXv6hvTMpHou1sN31Z9rtRMnS5izrvJ5DfBYRTm7ceeQ4pJ6aFiVxQPTN6BfYEhFGuhii7QWK",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 83683,
+ "now_mc_usd": 3029,
+ "now_vs_exit_multiple": 0.036,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 86,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "DrqyFFNt3ghSzKuPeobYwL3ex7Kz24YHK5qteWCpump",
+ "symbol": null,
+ "opened_at": "2026-07-23T02:21:54.676Z",
+ "closed_at": "2026-07-23T02:25:58.130Z",
+ "hold_seconds": 243,
+ "entry_sol": 0.01,
+ "exit_sol": 0.010773,
+ "pnl_sol": 0.000773,
+ "pnl_pct": 7.72537,
+ "peak_pct": 7.73,
+ "exit_reason": "timeout",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6880147424917009,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $DRQY on a graduation_ride trigger with 0.30% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "z1mbwTwxWJNJXY7KXJxUDXbjRmrtm7qv4dcTWPnDJWA2XiujhT91i8Exy5NC33tnnqkuEj9XDyoWJhPWzxWx45q",
+ "sell_sig": "4HuA8qYdb3UpBDviuo3WG5d1dnJqKPkBF2NfeH3RWUHXCyRFGbbSphHUGGyH8SJUSJhBp5tw45aG1tXT54mFTtWK",
+ "entry_intel": {
+ "quality_score": 43,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.5974,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 47830590,
+ "now_mc_usd": 1722,
+ "now_vs_exit_multiple": 0,
+ "post_exit_high_mc_usd": 51051658,
+ "post_exit_high_vs_exit_multiple": 1.067,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 87,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "moHcoCKnQqRXYR1FYLhgZhL3F9d8z9UYbDBUFrYpump",
+ "symbol": null,
+ "opened_at": "2026-07-23T02:26:48.858Z",
+ "closed_at": "2026-07-23T02:28:43.057Z",
+ "hold_seconds": 114,
+ "entry_sol": 0.01,
+ "exit_sol": 0.009363,
+ "pnl_sol": -0.000637,
+ "pnl_pct": -6.36575,
+ "peak_pct": 1.87,
+ "exit_reason": "trailing_stop",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": 21,
+ "firewall": "allow",
+ "ledger_confidence": 0.652311104164682,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $MOHC on a graduation_ride trigger with 1.19% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "dydCoBLV6cARya6osK5nTK2Boje8WxiLPzDrjRVYhNz7ksEoTkDSXm452UBj23sANT4iP2etgXK2tt53sNzhwqR",
+ "sell_sig": "2AW5rHThYCs2vhr7svsVMoMANf4KXjyJDZAbpT1MuoTUAfg5ahdhyWcEQfKwYjDLpXuc2AnhxPWLyAPx2TLteUwi",
+ "entry_intel": {
+ "quality_score": 50,
+ "unique_buyers": 3,
+ "unique_sellers": 0,
+ "organic_score": 0.617,
+ "bundle_score": 0,
+ "concentration_top10": 1
+ },
+ "post_exit": {
+ "implied_exit_mc_usd": 230800,
+ "now_mc_usd": 1459,
+ "now_vs_exit_multiple": 0.006,
+ "post_exit_high_mc_usd": null,
+ "post_exit_high_vs_exit_multiple": null,
+ "never_traded_after_exit": true,
+ "candle_granularity": "1h",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 88,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "J7x8QDfsfBJMGvgTFz6jtWAPB1ZLBierW7XwmgRvpump",
+ "symbol": "HANU.p",
+ "opened_at": "2026-07-23T02:41:16.880Z",
+ "closed_at": "2026-07-23T02:46:10.354Z",
+ "hold_seconds": 293,
+ "entry_sol": 0.01,
+ "exit_sol": 0.014293,
+ "pnl_sol": 0.004293,
+ "pnl_pct": 42.92525,
+ "peak_pct": 20.32,
+ "exit_reason": "take_profit",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6618961572291103,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $HANU.P on a graduation_ride trigger with 0.95% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "2LxjcHmYw1GJgFMmFPy749ozhbWtcTqS1BZLGbS77CjamkTtkepsDXRHcsbrEerrrooFGKXeCrrx5whe3H7yGgzF",
+ "sell_sig": "4wDukGp1hUYZ7YLrpzqLJpf73YA1uHW9mFcGWUdcQzhsJxfkFPMXQBVoT7XB3pEB3xiyxvdXTZuwXBnKxuk7QG3U",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 118030,
+ "now_mc_usd": 5081,
+ "now_vs_exit_multiple": 0.043,
+ "post_exit_high_mc_usd": 5242,
+ "post_exit_high_vs_exit_multiple": 0.044,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 89,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "51vWTLMpcUhuKSLrfLN7MM4XTZ2eWtfo5DiYUC7ipump",
+ "symbol": "$MRH",
+ "opened_at": "2026-07-23T02:46:10.706Z",
+ "closed_at": "2026-07-23T02:50:24.211Z",
+ "hold_seconds": 254,
+ "entry_sol": 0.01,
+ "exit_sol": 0.006988,
+ "pnl_sol": -0.003012,
+ "pnl_pct": -30.121609999999997,
+ "peak_pct": 10.13,
+ "exit_reason": "stop_loss",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.6522087431199994,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $$MRH on a graduation_ride trigger with 1.19% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "5kwTKYHNPEkrr6NTtscetwHHwVsFoe8eyWYedECmBPE7ssxFdiYEJas9xKcA2Yi3gRffnZX65a9Z1ab24wWCZEe3",
+ "sell_sig": "46vVoUX5wWjcZaHrSGdWjWmFycGMk1HeP3GPXBwtnKsFbhZWbhVvD1U3hfjahPuBoWHZK9BJ7yPJrmnLgQNiXF33",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 90094,
+ "now_mc_usd": 3012,
+ "now_vs_exit_multiple": 0.033,
+ "post_exit_high_mc_usd": 39186,
+ "post_exit_high_vs_exit_multiple": 0.435,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ },
+ {
+ "n": 90,
+ "arm": "boost-ride",
+ "mode": "rules",
+ "wallet": "3yjxcqWqjGpESMJ4EuTpDEAyTNwHvNVA38L4ZGyyaQwt",
+ "mint": "7Ki7ZDjSDoeFhGFV4QkRHJF8eZpjy2vaoC7WCRQSpump",
+ "symbol": "BDAG",
+ "opened_at": "2026-07-23T02:53:15.527Z",
+ "closed_at": "2026-07-23T02:55:30.273Z",
+ "hold_seconds": 135,
+ "entry_sol": 0.01,
+ "exit_sol": 0.012038,
+ "pnl_sol": 0.002038,
+ "pnl_pct": 20.38182,
+ "peak_pct": 20.61,
+ "exit_reason": "take_profit",
+ "entry_trigger": "graduation_ride",
+ "oracle_conviction": null,
+ "firewall": "allow",
+ "ledger_confidence": 0.650158425749426,
+ "llm_model": null,
+ "llm_confidence": null,
+ "llm_thesis": null,
+ "rationale": "Sniped $BDAG on a graduation_ride trigger with 1.25% price impact; firewall verdict allow (score 100). Committed 0.0100 SOL expecting a profitable exit.",
+ "buy_sig": "DXtv7cbafLgcdL9KdeFGfdD48adC48wSLaM5cRRxu2F5SyzVFsWymVKGbXSVADtcVG7DdGJttwogvNk1tUHyhEF",
+ "sell_sig": "21jMZHUhiGGqEqRZcaQn7sKhxXzaNnyc7Yc5bsfzsEvmx9Q9xAEBQsre9ENcgSg6rFhYdHxFvbjPAWMd2LuHiUPT",
+ "entry_intel": null,
+ "post_exit": {
+ "implied_exit_mc_usd": 95584,
+ "now_mc_usd": 5302,
+ "now_vs_exit_multiple": 0.055,
+ "post_exit_high_mc_usd": 46016,
+ "post_exit_high_vs_exit_multiple": 0.481,
+ "never_traded_after_exit": false,
+ "candle_granularity": "1m",
+ "lifetime_outcome": null,
+ "ath_mc_usd": null
+ }
+ }
+ ],
+ "counterfactual": {
+ "window": {
+ "start": "2026-07-20T00:00:00Z",
+ "end": "2026-07-23T04:00:00Z"
+ },
+ "funnel": {
+ "observed": 82994,
+ "conviction_scored": 45784,
+ "quality_scored": 82994,
+ "outcome_labeled": 42995,
+ "bought": 72
+ },
+ "conviction_bands": [
+ {
+ "band": "unscored",
+ "n": 18510,
+ "graduated": 354,
+ "pumped": 1581,
+ "rugged": 15938,
+ "flat": 637,
+ "good_rate": 0.1045
+ },
+ {
+ "band": "0+",
+ "n": 20319,
+ "graduated": 522,
+ "pumped": 1874,
+ "rugged": 17136,
+ "flat": 787,
+ "good_rate": 0.1179
+ },
+ {
+ "band": "30+",
+ "n": 4041,
+ "graduated": 131,
+ "pumped": 571,
+ "rugged": 3276,
+ "flat": 63,
+ "good_rate": 0.1737
+ },
+ {
+ "band": "50+",
+ "n": 71,
+ "graduated": 9,
+ "pumped": 46,
+ "rugged": 16,
+ "flat": 0,
+ "good_rate": 0.7746
+ }
+ ],
+ "high_conviction_50plus": {
+ "coins": 110,
+ "bought": 0,
+ "labeled": 71,
+ "graduated": 9,
+ "pumped": 46,
+ "rugged": 16,
+ "good_rate": 0.7746,
+ "max_score_in_window": 61
+ },
+ "biggest_missed": [
+ {
+ "symbol": "USOH",
+ "mint": "ZEQWnUDZVtGb152LJJyhtQTBEAdZUFEibbK1amhpump",
+ "outcome": "graduated",
+ "ath_mc_usd": 160547284,
+ "ath_multiple": 73975,
+ "quality_score": 43,
+ "conviction": null,
+ "unique_buyers": 3
+ },
+ {
+ "symbol": "DOW",
+ "mint": "EvwoREa1idcHcY55bMzrEt3tSw9Tv7ssMB2qmcmpump",
+ "outcome": "graduated",
+ "ath_mc_usd": 134304128,
+ "ath_multiple": 61692,
+ "quality_score": 36,
+ "conviction": 20,
+ "unique_buyers": 3
+ },
+ {
+ "symbol": "NTFS",
+ "mint": "xddNGoC7NpF1B8iHvaVn9mtoixhobpgHxCeSQaHpump",
+ "outcome": "graduated",
+ "ath_mc_usd": 76214871,
+ "ath_multiple": 35170,
+ "quality_score": 43,
+ "conviction": 21,
+ "unique_buyers": 3
+ },
+ {
+ "symbol": "USWR",
+ "mint": "pwAHEhXXjVJytTJr9zudmFjBSJPdFCLeMFi1zJJpump",
+ "outcome": "graduated",
+ "ath_mc_usd": 67492813,
+ "ath_multiple": 31158,
+ "quality_score": 43,
+ "conviction": 21,
+ "unique_buyers": 3
+ },
+ {
+ "symbol": "VORF",
+ "mint": "Kh8LiWcmi3v3Ro3qY1Pfgi7Kq3HvQN1ZDXBE1iRpump",
+ "outcome": "graduated",
+ "ath_mc_usd": 25320600,
+ "ath_multiple": 11674,
+ "quality_score": 43,
+ "conviction": 21,
+ "unique_buyers": 3
+ }
+ ]
+ },
+ "paperhands": {
+ "sells_checked": 90,
+ "above_exit_today": 0,
+ "median_now_vs_exit_multiple": 0.361,
+ "max_now_vs_exit_multiple": 0.899,
+ "candle_verified": {
+ "tokens_with_post_exit_prints": 53,
+ "tokens_never_traded_after_exit": 37,
+ "post_exit_high_at_or_above_1_5x": 0,
+ "median_post_exit_high_multiple": 0.427,
+ "regret_sol_at_1_5x_threshold": 0
+ }
+ }
+}
\ No newline at end of file
diff --git a/concierge-sdk/README.md b/concierge-sdk/README.md
index 8ed445b50..f197deb02 100644
--- a/concierge-sdk/README.md
+++ b/concierge-sdk/README.md
@@ -71,6 +71,35 @@ There is no crawler and no index to keep fresh. At **ask-time** the widget snaps
Add `data-concierge-ignore` to any element you never want harvested.
+## Shopping mode (Shopify)
+
+On a Shopify store the concierge becomes a full shopping assistant: it reads your **live catalog** and helps visitors find the right product, compare options, and check shipping and returns, then shows real **product cards** (image, live price, link, add-to-cart) for what it recommends.
+
+There is still no crawler, no index, and no product feed to maintain. Shopify serves every storefront's catalog and policies as public endpoints, and the widget reads them at ask-time:
+
+- `GET /products.json` — the live catalog (variants, prices, images, tags, type)
+- `GET /collections.json` — the collections
+- `GET /policies/shipping-policy`, `/policies/refund-policy`, … — shipping/returns/privacy/terms
+
+It fetches these once (same-origin on the store, so no CORS wall), caches them for the session, then for each question runs a small keyword retrieval to pick the handful of products the shopper actually asked about. Only that handful plus a compact store summary is sent to the answer endpoint, and the cards are rendered from that same set, so **prices and links are always real, never model-invented**. No embeddings service, no vector DB.
+
+**Install** is the same one tag, dropped into `theme.liquid` before `</body>`:
+
+```html
+<script type="module"
+ src="https://three.ws/concierge/concierge.global.js"
+ data-concierge
+ data-site-name="Larkspur Supply"
+ data-avatar="nova"
+ data-accent="#3f7d5b"></script>
+```
+
+Shopping mode turns on automatically because the widget detects the Shopify storefront (`window.Shopify`). Force it, target a specific store, or set the currency with `data-shopping="true"`, `data-shop="your-store.myshopify.com"`, and `data-currency="GBP"`.
+
+**Add-to-cart** works when the widget runs on the store itself: the button posts to Shopify's public `/cart/add.js` and fires a `cart:refresh` event so themes update their cart count. Off-store, cards show a **View** link to the product page.
+
+Handles price intent too (`"a gift under $75"`, `"cheapest hoodie"`, `"anything on sale?"`) and grounds shipping/returns answers in your published policies. See [`examples/shopify.html`](./examples/shopify.html) and the tutorial: [three.ws/docs/tutorials/shopify-shopping-assistant](https://three.ws/docs/tutorials/shopify-shopping-assistant).
+
## Options
Constructor config / element attributes / `data-*` script attributes are the same set:
@@ -87,6 +116,10 @@ Constructor config / element attributes / `data-*` script attributes are the sam
| `greeting` | `greeting` | generated | Empty-state + teaser line. |
| `suggestions` | `suggestions` | generated | Prompt chips. Pipe-separated in attributes, max 4. |
| `knowledge` | `knowledge` | none | Curated facts (FAQ, policies, pricing). Leads the grounding. |
+| `shop` | `shop` | auto-detected | Shopify store domain. Turns on shopping mode (catalog + product cards). |
+| `shopping` | `shopping` | auto on a store | Force shopping mode on (`true`) or off (`false`). |
+| `currency` | `currency` | store's / `USD` | ISO code for product prices. |
+| `maxProducts` | `max-products` | `4` | Product cards recommended per answer (1–8). |
| `persona` | `persona` | none | One-line tone instruction for the model. |
| `accent` | `accent` | indigo | Any CSS color; restyles the whole widget. |
| `position` | `position` | `bottom-right` | Or `bottom-left`. |
@@ -109,7 +142,8 @@ c.setAvatar('nova') // hot-swap the rig
c.setMuted(true)
c.reset() // clear the conversation
c.dispose()
-c.on(event, fn) // 'ready' | 'open' | 'close' | 'message' | 'agentchange' | 'error'
+c.on(event, fn) // 'ready' | 'open' | 'close' | 'message' | 'agentchange'
+ // | 'catalog' (store catalog loaded) | 'addtocart' | 'error'
```
`<three-concierge>` proxies the same methods and re-dispatches events as DOM CustomEvents (`three-concierge:message` etc., bubbling + composed).
diff --git a/concierge-sdk/examples/README.md b/concierge-sdk/examples/README.md
index 512ed2319..95bdf29ac 100644
--- a/concierge-sdk/examples/README.md
+++ b/concierge-sdk/examples/README.md
@@ -5,6 +5,7 @@ Runnable examples for every way to use the concierge. The HTML files load the SD
| File | Shows |
| --- | --- |
| [index.html](./index.html) | The one-tag CDN install with `data-*` config, grounded in the page + curated knowledge. |
+| [shopify.html](./shopify.html) | Shopping mode: shopping assistant on a Shopify store — live catalog, product cards, add-to-cart. |
| [web-component.html](./web-component.html) | The declarative `<three-concierge>` element. |
| [imperative.html](./imperative.html) | The `new Concierge({...})` API: events, programmatic `ask()`, hot-swapping avatars. |
| [custom-avatar.html](./custom-avatar.html) | Using your own rigged GLB instead of the catalog. |
diff --git a/concierge-sdk/examples/shopify.html b/concierge-sdk/examples/shopify.html
new file mode 100644
index 000000000..e3daa4e6f
--- /dev/null
+++ b/concierge-sdk/examples/shopify.html
@@ -0,0 +1,73 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <title>Larkspur Supply, 3D shopping assistant demo</title>
+ <meta name="description" content="Larkspur Supply sells small-batch outdoor gear. Ask the assistant to help you find a jacket, a pack, or a gift." />
+ <meta property="og:site_name" content="Larkspur Supply" />
+ <style>
+ body { margin: 0; font-family: system-ui, sans-serif; color: #1a1a1a; background: #fbfaf7; }
+ header { padding: 16px 24px; background: #fff; border-bottom: 1px solid #ece8df; display: flex; gap: 24px; align-items: center; }
+ nav a { margin-right: 16px; color: #5b564c; text-decoration: none; }
+ main { max-width: 760px; margin: 0 auto; padding: 48px 24px; line-height: 1.65; }
+ h1 { font-size: 2.1rem; letter-spacing: -0.02em; }
+ .note { background: #fff; border: 1px solid #ece8df; border-radius: 12px; padding: 16px 20px; margin: 28px 0; font-size: 0.95rem; }
+ code { background: #f0ede5; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
+ pre { background: #17150f; color: #f4f1e8; padding: 16px; border-radius: 12px; overflow-x: auto; font-size: 0.85rem; line-height: 1.55; }
+ </style>
+ </head>
+ <body>
+ <header>
+ <strong>Larkspur Supply</strong>
+ <nav><a href="#">Shop</a><a href="#">Collections</a><a href="#">Shipping</a><a href="#">Contact</a></nav>
+ </header>
+ <main>
+ <h1>Small-batch outdoor gear</h1>
+ <p>Larkspur makes jackets, packs, and layers for people who spend more time outside than in. Every piece is made in limited runs, so the assistant in the corner knows the live catalog and can help you find the right thing, compare options, and check shipping.</p>
+
+ <div class="note">
+ <strong>This is a demo storefront.</strong> On a real Shopify store the assistant reads your live catalog automatically. It fetches your store's public
+ <code>/products.json</code>, <code>/collections.json</code>, and policy pages (no API key, no app install, no product feed to maintain), then recommends real products as cards with live prices and links. Here, <code>window.Shopify</code> is faked so you can see auto-detection kick in; the product cards appear once the catalog loads on the actual store.
+ </div>
+
+ <h2>Install on your Shopify theme</h2>
+ <p>Paste one tag into <code>theme.liquid</code>, just before <code>&lt;/body&gt;</code>. Shopping mode turns on by itself because the widget detects the Shopify storefront:</p>
+ <pre>&lt;script type="module"
+ src="https://three.ws/concierge/concierge.global.js"
+ data-concierge
+ data-site-name="Larkspur Supply"
+ data-accent="#3f7d5b"
+ data-avatar="nova"&gt;&lt;/script&gt;</pre>
+ <p>That's it. Want to point it at a specific store, force shopping mode, or set the currency? Add <code>data-shop</code>, <code>data-shopping="true"</code>, and <code>data-currency</code>.</p>
+ </main>
+
+ <!--
+ Demo only: fake the Shopify global so detectShop() fires and the widget
+ enters shopping mode. On a real store this object is already present, and
+ `/products.json` is same-origin, so the catalog + product cards load with
+ no configuration. `data-shop` is set here so this demo page (which is NOT
+ a Shopify origin) knows which store's catalog to read.
+
+ Serve this folder next to a build of the SDK:
+ npm run build && npx serve .
+ then open /examples/shopify.html. Swap ../dist for the CDN URL to run
+ against the published build.
+ -->
+ <script>
+ window.Shopify = { shop: 'larkspur-supply.myshopify.com', currency: { active: 'USD' } };
+ </script>
+ <script
+ type="module"
+ src="../dist/concierge.global.js"
+ data-concierge
+ data-shop="larkspur-supply.myshopify.com"
+ data-shopping="true"
+ data-site-name="Larkspur Supply"
+ data-accent="#3f7d5b"
+ data-avatar="nova"
+ data-persona="a warm, knowledgeable shop associate who keeps it brief"
+ data-suggestions="Help me pick a rain jacket|What's good for a gift under $75?|Do you ship to Canada?|What's on sale?"
+ ></script>
+ </body>
+</html>
diff --git a/concierge-sdk/src/client.js b/concierge-sdk/src/client.js
index 7a919f02d..3c05ca1b6 100644
--- a/concierge-sdk/src/client.js
+++ b/concierge-sdk/src/client.js
@@ -7,7 +7,7 @@
* tokens render (and speak) as they arrive instead of after the full answer.
*
* Wire format (matches /api/concierge on three.ws):
- * → POST { message, history[], site{...}, persona?, lang? }
+ * → POST { message, history[], site{...}, shopping?{...}, persona?, lang? }
* ← SSE data: { type: 'chunk', text } repeated
* data: { type: 'done', provider?, model? }
* data: { type: 'error', error }
@@ -67,7 +67,7 @@ export function createSseBuffer(onEvent) {
*
* @param {{ endpoint?: string, message: string,
* history?: {role:'user'|'assistant', content:string}[],
- * site?: object, persona?: string, lang?: string,
+ * site?: object, shopping?: object, persona?: string, lang?: string,
* signal?: AbortSignal,
* onChunk?: (text:string)=>void }} opts
* @returns {Promise<{ text: string, provider?: string, model?: string }>}
@@ -85,6 +85,7 @@ export async function askConcierge(opts) {
message: String(opts.message).slice(0, MAX_MESSAGE_CHARS),
history,
site: opts.site || {},
+ shopping: opts.shopping || undefined,
persona: opts.persona || undefined,
lang: opts.lang || (typeof navigator !== 'undefined' ? navigator.language : undefined),
}),
diff --git a/concierge-sdk/src/element.js b/concierge-sdk/src/element.js
index bf885a753..edf37260b 100644
--- a/concierge-sdk/src/element.js
+++ b/concierge-sdk/src/element.js
@@ -21,6 +21,10 @@
* greeting first line shown in the empty state and teaser
* suggestions pipe-separated prompt chips ("a|b|c", max 4)
* knowledge curated facts (FAQ, policies) the answers are grounded in
+ * shop Shopify store domain → shopping mode (catalog + product cards)
+ * shopping "true"/"false" to force shopping mode on/off (auto on a store)
+ * currency ISO currency for product prices (default: the store's / USD)
+ * max-products how many product cards to recommend per answer (1–8, default 4)
* persona one-line tone instruction, e.g. "warm, playful, concise"
* accent CSS color for the whole widget chrome
* position bottom-right | bottom-left
@@ -34,7 +38,8 @@
*
* Methods proxy the controller: ask(text), open(), close(), reset(),
* setAvatar(id), setMuted(bool). Events re-dispatch as DOM CustomEvents:
- * three-concierge:ready | :open | :close | :message | :agentchange | :error
+ * three-concierge:ready | :open | :close | :message | :agentchange
+ * three-concierge:catalog (store catalog loaded) | :addtocart | :error
*/
import { Concierge } from './widget.js';
@@ -57,6 +62,14 @@ export class ThreeConciergeElement extends HTMLElement {
greeting: this.getAttribute('greeting') || undefined,
suggestions: this.getAttribute('suggestions')?.split('|').map((s) => s.trim()).filter(Boolean),
knowledge: this.getAttribute('knowledge') || undefined,
+ shop: this.getAttribute('shop') || undefined,
+ shopping: this.hasAttribute('shopping')
+ ? this.getAttribute('shopping') !== 'false'
+ : undefined,
+ currency: this.getAttribute('currency') || undefined,
+ maxProducts: this.getAttribute('max-products')
+ ? Number(this.getAttribute('max-products'))
+ : undefined,
persona: this.getAttribute('persona') || undefined,
accent: this.getAttribute('accent') || undefined,
position: this.getAttribute('position') || undefined,
@@ -69,7 +82,7 @@ export class ThreeConciergeElement extends HTMLElement {
zIndex: this.getAttribute('z-index') ? Number(this.getAttribute('z-index')) : undefined,
});
- for (const ev of ['ready', 'open', 'close', 'message', 'agentchange', 'error']) {
+ for (const ev of ['ready', 'open', 'close', 'message', 'agentchange', 'catalog', 'addtocart', 'error']) {
this._widget.on(ev, (detail) => {
this.dispatchEvent(
new CustomEvent(`three-concierge:${ev}`, { detail, bubbles: true, composed: true }),
diff --git a/concierge-sdk/src/index.js b/concierge-sdk/src/index.js
index 5435b3285..bf82a607a 100644
--- a/concierge-sdk/src/index.js
+++ b/concierge-sdk/src/index.js
@@ -36,6 +36,11 @@ export {
getAvatar, avatarUrl, customAvatarEntry,
} from './catalog.js';
export { harvestSiteContext, buildSitePayload, MAX_CONTENT_CHARS, MAX_KNOWLEDGE_CHARS } from './context.js';
+export {
+ detectShop, normalizeShopDomain, shopOrigin, fetchCatalog, fetchPolicies,
+ searchProducts, parseIntent, catalogSummary, buildShoppingPayload,
+ normalizeProduct, money, MAX_RECOMMENDATIONS,
+} from './shopify.js';
export { askConcierge, parseSseEvent, createSseBuffer, DEFAULT_ENDPOINT, MAX_HISTORY_TURNS } from './client.js';
export { renderMarkdown, stripMarkdown, escapeHtml } from './markdown.js';
export { createMic, micSupported } from './mic.js';
@@ -79,6 +84,10 @@ function autoInit() {
greeting: d.greeting || undefined,
suggestions: d.suggestions?.split('|').map((s) => s.trim()).filter(Boolean),
knowledge: d.knowledge || undefined,
+ shop: d.shop || undefined,
+ shopping: 'shopping' in d ? d.shopping !== 'false' : undefined,
+ currency: d.currency || undefined,
+ maxProducts: d.maxProducts ? Number(d.maxProducts) : undefined,
persona: d.persona || undefined,
accent: d.accent || undefined,
position: d.position || undefined,
diff --git a/concierge-sdk/src/shopify.js b/concierge-sdk/src/shopify.js
new file mode 100644
index 000000000..39468813f
--- /dev/null
+++ b/concierge-sdk/src/shopify.js
@@ -0,0 +1,416 @@
+/**
+ * Shopify storefront adapter: @three-ws/concierge
+ * ================================================
+ *
+ * Turns the concierge into a real shopping assistant on a Shopify store, with
+ * the same no-crawler / no-index / no-setup ethos as the page harvester: every
+ * Shopify storefront serves its catalog and policies as PUBLIC endpoints that
+ * need no API key and no app install.
+ *
+ * GET /products.json?limit=250&page=N → the live catalog (variants, prices,
+ * images, tags, product_type)
+ * GET /collections.json?limit=250 → the collections
+ * GET /policies/<handle> → shipping / refund / privacy / terms
+ * (HTML; stripped to text here)
+ *
+ * The widget fetches these once (same-origin when embedded on the store, so no
+ * CORS wall), caches them, then per question runs a small keyword retrieval to
+ * pick the handful of products the shopper actually asked about. Only that
+ * handful plus a compact store summary is sent to the answer endpoint, and the
+ * widget renders real product cards (image, price, live link, add-to-cart) for
+ * them. No vector DB, no embeddings service, no product feed to maintain.
+ *
+ * Everything here is pure data-in / data-out with `fetch` and the DOM injected,
+ * so it is unit-testable with a fake fetch and a fake window.
+ */
+
+/** Hard caps so a huge catalog can never blow the request budget. */
+export const MAX_PRODUCTS = 500; // fetched + indexed locally
+export const MAX_RECOMMENDATIONS = 4; // shown as cards / sent to the model
+export const MAX_SUMMARY_CHARS = 500;
+export const MAX_POLICY_CHARS = 1400; // per policy, sent to the model
+export const MAX_PRODUCT_SUMMARY_CHARS = 220;
+
+const POLICY_HANDLES = {
+ shipping: 'shipping-policy',
+ returns: 'refund-policy',
+ privacy: 'privacy-policy',
+ terms: 'terms-of-service',
+};
+
+const STOPWORDS = new Set([
+ 'the', 'a', 'an', 'and', 'or', 'of', 'for', 'to', 'in', 'on', 'is', 'are',
+ 'do', 'does', 'i', 'you', 'me', 'my', 'we', 'it', 'this', 'that', 'with',
+ 'can', 'have', 'get', 'want', 'need', 'show', 'find', 'looking', 'look',
+ 'any', 'some', 'what', 'which', 'whats', 'about', 'please', 'would', 'like',
+ 'buy', 'purchase', 'shop', 'product', 'products', 'item', 'items', 'store',
+]);
+
+// ── Domain / detection ──────────────────────────────────────────────────────
+
+/**
+ * Normalize any store reference (a bare domain, a full URL, a myshopify host)
+ * into a plain hostname. Returns '' for junk so callers can guard on it.
+ */
+export function normalizeShopDomain(input) {
+ const raw = String(input || '').trim();
+ if (!raw) return '';
+ try {
+ const url = new URL(raw.includes('://') ? raw : `https://${raw}`);
+ return url.hostname.toLowerCase();
+ } catch {
+ return '';
+ }
+}
+
+/** Origin (`https://host`) for a normalized domain. */
+export function shopOrigin(domain) {
+ const host = normalizeShopDomain(domain);
+ return host ? `https://${host}` : '';
+}
+
+/**
+ * Detect a Shopify store from the runtime. Returns `{ shop, currency }` when the
+ * page is a Shopify storefront (the global object Shopify injects), else null.
+ * `window.Shopify` is present on every themed storefront and carries the shop
+ * domain and active currency, so an on-store embed needs zero configuration.
+ */
+export function detectShop(win = typeof window !== 'undefined' ? window : undefined) {
+ const S = win?.Shopify;
+ if (!S) return null;
+ const shop = normalizeShopDomain(S.shop || win.location?.hostname);
+ if (!shop) return null;
+ return { shop, currency: S.currency?.active || 'USD' };
+}
+
+// ── Normalization ───────────────────────────────────────────────────────────
+
+/** Strip HTML to a trimmed, single-spaced text summary. */
+export function htmlToText(html, max = MAX_PRODUCT_SUMMARY_CHARS) {
+ const text = String(html || '')
+ .replace(/<[^>]+>/g, ' ')
+ .replace(/&nbsp;/g, ' ')
+ .replace(/&amp;/g, '&')
+ .replace(/&lt;/g, '<')
+ .replace(/&gt;/g, '>')
+ .replace(/&#39;|&rsquo;|&lsquo;/g, "'")
+ .replace(/&quot;|&ldquo;|&rdquo;/g, '"')
+ .replace(/\s+/g, ' ')
+ .trim();
+ return max && text.length > max ? text.slice(0, max - 1).trimEnd() + '…' : text;
+}
+
+/** Parse a Shopify decimal price string ("19.99") into a number; NaN → 0. */
+function priceNumber(v) {
+ const n = Number.parseFloat(v);
+ return Number.isFinite(n) ? n : 0;
+}
+
+/**
+ * Format a price as a localized currency string. Shopify products.json prices
+ * are major-unit decimal strings, not cents.
+ */
+export function money(amount, currency = 'USD') {
+ const n = typeof amount === 'number' ? amount : priceNumber(amount);
+ try {
+ return new Intl.NumberFormat(undefined, { style: 'currency', currency }).format(n);
+ } catch {
+ // Unknown currency code: fall back to a plain amount + code.
+ return `${n.toFixed(2)} ${currency}`;
+ }
+}
+
+/**
+ * Normalize a raw Shopify product (from products.json) into the compact shape
+ * the widget and prompt use. Keeps only what a shopper cares about.
+ */
+export function normalizeProduct(raw, origin, currency = 'USD') {
+ if (!raw || !raw.handle) return null;
+ const variants = Array.isArray(raw.variants) ? raw.variants : [];
+ const prices = variants.map((v) => priceNumber(v.price)).filter((n) => n > 0);
+ const priceMin = prices.length ? Math.min(...prices) : 0;
+ const priceMax = prices.length ? Math.max(...prices) : 0;
+ const available = variants.some((v) => v.available !== false);
+ const firstAvailable = variants.find((v) => v.available !== false) || variants[0];
+ const compareAt = variants
+ .map((v) => priceNumber(v.compare_at_price))
+ .filter((n) => n > 0);
+ const onSale = compareAt.some((c) => c > priceMin);
+ const image =
+ raw.image?.src || (Array.isArray(raw.images) && raw.images[0]?.src) || '';
+ const tags = Array.isArray(raw.tags)
+ ? raw.tags.map((t) => String(t).trim()).filter(Boolean)
+ : String(raw.tags || '')
+ .split(',')
+ .map((t) => t.trim())
+ .filter(Boolean);
+
+ return {
+ id: raw.id,
+ handle: raw.handle,
+ title: String(raw.title || '').trim(),
+ url: `${origin}/products/${raw.handle}`,
+ type: String(raw.product_type || '').trim(),
+ vendor: String(raw.vendor || '').trim(),
+ tags,
+ priceMin,
+ priceMax,
+ currency,
+ available,
+ onSale,
+ image: image ? String(image).replace(/^http:/, 'https:') : '',
+ variantId: firstAvailable?.id || variants[0]?.id || null,
+ summary: htmlToText(raw.body_html),
+ };
+}
+
+// ── Fetching ────────────────────────────────────────────────────────────────
+
+async function getJson(url, { fetchImpl, signal }) {
+ const res = await fetchImpl(url, {
+ signal,
+ headers: { accept: 'application/json' },
+ credentials: 'omit',
+ });
+ if (!res.ok) throw new Error(`GET ${url} → HTTP ${res.status}`);
+ return res.json();
+}
+
+/**
+ * Fetch the full catalog + collections for a store. Paginates products.json
+ * until it runs dry or the cap is hit. Never rejects on a partial failure: a
+ * store with collections disabled still yields its products.
+ *
+ * @returns {Promise<{ store:string, origin:string, currency:string,
+ * products:object[], collections:{title,handle,url}[] }>}
+ */
+export async function fetchCatalog({
+ shop,
+ fetchImpl = typeof fetch !== 'undefined' ? fetch : undefined,
+ signal,
+ currency = 'USD',
+ limit = 250,
+ maxProducts = MAX_PRODUCTS,
+} = {}) {
+ const domain = normalizeShopDomain(shop);
+ const origin = shopOrigin(domain);
+ if (!origin) throw new Error('fetchCatalog: a Shopify shop domain is required');
+ if (!fetchImpl) throw new Error('fetchCatalog: no fetch implementation available');
+
+ const products = [];
+ for (let page = 1; products.length < maxProducts; page++) {
+ let batch;
+ try {
+ const data = await getJson(
+ `${origin}/products.json?limit=${limit}&page=${page}`,
+ { fetchImpl, signal },
+ );
+ batch = Array.isArray(data?.products) ? data.products : [];
+ } catch (err) {
+ if (page === 1) throw err; // the store has no public catalog: surface it
+ break; // a later page failed: keep what we have
+ }
+ if (!batch.length) break;
+ for (const raw of batch) {
+ const p = normalizeProduct(raw, origin, currency);
+ if (p) products.push(p);
+ if (products.length >= maxProducts) break;
+ }
+ if (batch.length < limit) break; // last page
+ }
+
+ let collections = [];
+ try {
+ const data = await getJson(`${origin}/collections.json?limit=250`, { fetchImpl, signal });
+ collections = (Array.isArray(data?.collections) ? data.collections : [])
+ .filter((c) => c?.handle && c?.title)
+ .map((c) => ({
+ title: String(c.title).trim(),
+ handle: c.handle,
+ url: `${origin}/collections/${c.handle}`,
+ }));
+ } catch {
+ /* collections endpoint disabled or empty: products alone still work */
+ }
+
+ return { store: domain, origin, currency, products, collections };
+}
+
+/**
+ * Fetch the store's published policies. Each lives at a stable public URL and
+ * is HTML; we strip it to text. Missing policies (404) are simply omitted.
+ */
+export async function fetchPolicies({
+ shop,
+ fetchImpl = typeof fetch !== 'undefined' ? fetch : undefined,
+ signal,
+} = {}) {
+ const origin = shopOrigin(shop);
+ if (!origin || !fetchImpl) return {};
+ const out = {};
+ await Promise.all(
+ Object.entries(POLICY_HANDLES).map(async ([key, handle]) => {
+ try {
+ const res = await fetchImpl(`${origin}/policies/${handle}`, {
+ signal,
+ credentials: 'omit',
+ });
+ if (!res.ok) return;
+ const html = await res.text();
+ // Policy pages wrap the body in a <main>/<article>; strip everything
+ // to text and cap. Good enough to ground shipping/return answers.
+ const text = htmlToText(html, MAX_POLICY_CHARS);
+ if (text && text.length > 40) out[key] = text;
+ } catch {
+ /* one policy failing must not sink the others */
+ }
+ }),
+ );
+ return out;
+}
+
+// ── Retrieval ───────────────────────────────────────────────────────────────
+
+function tokenize(s) {
+ return String(s || '')
+ .toLowerCase()
+ .replace(/[^a-z0-9\s]/g, ' ')
+ .split(/\s+/)
+ .filter((t) => t.length >= 2 && !STOPWORDS.has(t));
+}
+
+/**
+ * Parse light shopping intent from a question: a max price ("under $50") and a
+ * cheap/premium sort hint. Real shoppers ask this way; honoring it makes the
+ * recommendations feel like a person, not a search box.
+ */
+export function parseIntent(query) {
+ const q = String(query || '').toLowerCase();
+ let maxPrice = null;
+ const under = q.match(/(?:under|below|less than|up to|max)\s*\$?\s*(\d+(?:\.\d+)?)/);
+ if (under) maxPrice = Number.parseFloat(under[1]);
+ const cheap = /\b(cheap|cheapest|budget|affordable|inexpensive|lowest)\b/.test(q);
+ const premium = /\b(premium|luxury|best|top|high[- ]?end|nicest)\b/.test(q);
+ const onSale = /\b(sale|discount|deal|deals|clearance|reduced)\b/.test(q);
+ return {
+ maxPrice,
+ sort: cheap ? 'price-asc' : premium ? 'price-desc' : null,
+ onSale,
+ };
+}
+
+/**
+ * Rank products against a question by weighted keyword overlap. No embeddings:
+ * a compact catalog and honest term matching answer "do you have a blue wool
+ * scarf" better than a cosine score nobody can debug.
+ *
+ * @returns {object[]} the top-k matching products (may be empty)
+ */
+export function searchProducts(products, query, k = MAX_RECOMMENDATIONS) {
+ const list = Array.isArray(products) ? products : [];
+ const tokens = tokenize(query);
+ const intent = parseIntent(query);
+ const phrase = String(query || '').toLowerCase().trim();
+
+ const pool = intent.maxPrice
+ ? list.filter((p) => p.priceMin <= intent.maxPrice)
+ : list;
+
+ const scored = pool.map((p) => {
+ const title = p.title.toLowerCase();
+ const type = p.type.toLowerCase();
+ const vendor = p.vendor.toLowerCase();
+ const tags = p.tags.join(' ').toLowerCase();
+ const summary = p.summary.toLowerCase();
+ let score = 0;
+ for (const tok of tokens) {
+ if (title.includes(tok)) score += 6;
+ else if (type.includes(tok)) score += 4;
+ else if (tags.includes(tok)) score += 3;
+ else if (vendor.includes(tok)) score += 2;
+ else if (summary.includes(tok)) score += 1;
+ }
+ if (phrase.length >= 4 && title.includes(phrase)) score += 8; // exact phrase in title
+ if (intent.onSale && p.onSale) score += 4;
+ if (intent.onSale && !p.onSale) score -= 2;
+ if (!p.available) score -= 3; // in-stock first, never hide entirely
+ return { p, score };
+ });
+
+ let matched = scored.filter((s) => s.score > 0);
+
+ // A bare "what's cheapest / on sale" with no product noun still deserves an
+ // answer: fall back to the whole (price-filtered) pool so the sort applies.
+ if (!matched.length && (intent.sort || intent.onSale || intent.maxPrice)) {
+ matched = pool.map((p) => ({ p, score: p.available ? 1 : 0 }));
+ if (intent.onSale) matched = matched.filter((s) => s.p.onSale);
+ }
+
+ matched.sort((a, b) => {
+ if (intent.sort === 'price-asc') return a.p.priceMin - b.p.priceMin || b.score - a.score;
+ if (intent.sort === 'price-desc') return b.p.priceMin - a.p.priceMin || b.score - a.score;
+ return b.score - a.score || a.p.priceMin - b.p.priceMin;
+ });
+
+ return matched.slice(0, k).map((s) => s.p);
+}
+
+// ── Formatting for the answer endpoint ──────────────────────────────────────
+
+/** A compact one-line store overview, always sent so the model knows its shape. */
+export function catalogSummary(catalog) {
+ const products = catalog?.products || [];
+ if (!products.length) return '';
+ const types = [...new Set(products.map((p) => p.type).filter(Boolean))].slice(0, 12);
+ const prices = products.map((p) => p.priceMin).filter((n) => n > 0);
+ const lo = prices.length ? Math.min(...prices) : 0;
+ const hi = prices.length ? Math.max(...prices) : 0;
+ const currency = catalog.currency || 'USD';
+ const parts = [`${products.length} products`];
+ if (types.length) parts.push(`categories: ${types.join(', ')}`);
+ if (prices.length) parts.push(`prices from ${money(lo, currency)} to ${money(hi, currency)}`);
+ return parts.join(' · ').slice(0, MAX_SUMMARY_CHARS);
+}
+
+/** Compact prompt line for one product. */
+function productLine(p) {
+ const price =
+ p.priceMax > p.priceMin
+ ? `${money(p.priceMin, p.currency)}–${money(p.priceMax, p.currency)}`
+ : money(p.priceMin, p.currency);
+ const bits = [`- ${p.title} (${price}${p.available ? '' : ', sold out'}${p.onSale ? ', on sale' : ''})`];
+ if (p.type) bits.push(`type: ${p.type}`);
+ if (p.summary) bits.push(p.summary);
+ bits.push(`link: ${p.url}`);
+ return bits.join(' · ');
+}
+
+/**
+ * Build the bounded `shopping` payload the /api/concierge endpoint grounds on.
+ * Only the retrieved products (not the whole catalog) plus a store summary,
+ * collection names, and relevant policies are sent, keeping the request small.
+ */
+export function buildShoppingPayload(catalog, recommended, policies = {}, question = '') {
+ if (!catalog) return null;
+ const currency = catalog.currency || 'USD';
+ const collections = (catalog.collections || []).slice(0, 24).map((c) => c.title);
+
+ // Pull the policy the question is actually about, so a "do you ship to
+ // Canada" answer is grounded without spending budget on the refund text.
+ const q = question.toLowerCase();
+ const wantShip = /ship|deliver|postage|arrive|dispatch/.test(q);
+ const wantReturn = /return|refund|exchange|money back|warranty/.test(q);
+ const policyText = [];
+ if (policies.shipping && (wantShip || !wantReturn)) policyText.push(`Shipping policy: ${policies.shipping}`);
+ if (policies.returns && (wantReturn || !wantShip)) policyText.push(`Returns policy: ${policies.returns}`);
+ if (!policyText.length && policies.shipping) policyText.push(`Shipping policy: ${policies.shipping}`);
+
+ return {
+ store: catalog.store || '',
+ currency,
+ summary: catalogSummary(catalog),
+ collections,
+ policies: policyText.join('\n\n').slice(0, MAX_POLICY_CHARS * 2),
+ products: (recommended || []).map(productLine).join('\n'),
+ };
+}
diff --git a/concierge-sdk/src/styles.js b/concierge-sdk/src/styles.js
index cf4f54443..ea62bee4c 100644
--- a/concierge-sdk/src/styles.js
+++ b/concierge-sdk/src/styles.js
@@ -162,6 +162,30 @@ export const CSS = `
.tc-foot a{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;color:var(--tc-text-dim);text-decoration:none;transition:color .15s ease}
.tc-foot a:hover{color:var(--tc-accent)}
+/* Product recommendation cards (shopping mode) */
+.tc-products{display:flex;flex-direction:column;gap:8px;margin-top:10px}
+.tc-product{display:flex;gap:10px;padding:8px;border-radius:12px;background:var(--tc-surface);border:1px solid var(--tc-border);transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease}
+.tc-product:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--tc-accent) 45%,transparent);box-shadow:0 6px 18px rgba(0,0,0,.14)}
+.tc-product-media{position:relative;flex-shrink:0;width:66px;height:66px;border-radius:9px;overflow:hidden;background:var(--tc-surface-2);display:block}
+.tc-product-media img{width:100%;height:100%;object-fit:cover;display:block}
+.tc-product-noimg{position:absolute;inset:0;background:linear-gradient(135deg,var(--tc-surface-2),color-mix(in srgb,var(--tc-accent) 14%,var(--tc-surface-2)))}
+.tc-product-badge{position:absolute;top:4px;left:4px;font-size:9.5px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:#fff;background:#ef4444;padding:1px 5px;border-radius:5px}
+.tc-product-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
+.tc-product-title{font-size:13px;font-weight:600;line-height:1.25;color:var(--tc-text);text-decoration:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
+.tc-product-title:hover{color:var(--tc-accent)}
+.tc-product-meta{display:flex;align-items:center;gap:8px;margin-top:auto}
+.tc-product-price{font-size:13px;font-weight:650;color:var(--tc-text)}
+.tc-product-oos{font-size:10.5px;color:var(--tc-text-dim);text-transform:uppercase;letter-spacing:.03em}
+.tc-product-actions{display:flex;gap:6px;margin-top:4px}
+.tc-product-view,.tc-product-add{font-size:12px;font-weight:600;padding:5px 12px;border-radius:8px;text-decoration:none;transition:filter .15s ease,background .15s ease,transform .1s ease;white-space:nowrap}
+.tc-product-view{color:var(--tc-text);background:var(--tc-surface-2);border:1px solid var(--tc-border)}
+.tc-product-view:hover{border-color:color-mix(in srgb,var(--tc-accent) 55%,transparent);color:var(--tc-accent)}
+.tc-product-add{color:#fff;border:none;background:linear-gradient(135deg,color-mix(in srgb,var(--tc-accent) 88%,#fff 12%),color-mix(in srgb,var(--tc-accent) 80%,#000 20%))}
+.tc-product-add:hover{filter:brightness(1.08)}
+.tc-product-add:active{transform:scale(.95)}
+.tc-product-add:disabled{opacity:.7;cursor:default}
+.tc-product-add.is-added{background:#22c55e;filter:none}
+
/* Picker */
.tc-picker{position:absolute;inset:auto 0 0 0;top:0;z-index:5;background:color-mix(in srgb,var(--tc-bg) 88%,transparent);backdrop-filter:blur(8px);
display:flex;flex-direction:column;padding:14px;overflow-y:auto;opacity:0;pointer-events:none;transition:opacity .2s ease}
diff --git a/concierge-sdk/src/widget.js b/concierge-sdk/src/widget.js
index 6408bc1e7..d3bdd23d4 100644
--- a/concierge-sdk/src/widget.js
+++ b/concierge-sdk/src/widget.js
@@ -25,11 +25,24 @@ import { askConcierge, DEFAULT_ENDPOINT, MAX_HISTORY_TURNS } from './client.js';
import { renderMarkdown, stripMarkdown, escapeHtml } from './markdown.js';
import { createMic, micSupported } from './mic.js';
import { ensureStyles } from './styles.js';
+import {
+ detectShop,
+ normalizeShopDomain,
+ shopOrigin,
+ fetchCatalog,
+ fetchPolicies,
+ searchProducts,
+ buildShoppingPayload,
+ money,
+ MAX_RECOMMENDATIONS,
+} from './shopify.js';
const LS_AVATAR = 'tc:avatar';
const LS_MUTED = 'tc:muted';
const SS_THREAD = 'tc:thread';
const SS_TEASED = 'tc:teased';
+const SS_CATALOG = 'tc:shop'; // per-store catalog cache key prefix
+const CATALOG_TTL_MS = 30 * 60 * 1000; // re-fetch the catalog every 30 min
const ICONS = {
spark:
@@ -114,8 +127,29 @@ export class Concierge {
teaser: config.teaser !== false,
zIndex: config.zIndex,
lang: config.lang || '',
+ shop: normalizeShopDomain(config.shop),
+ shopping: config.shopping,
+ currency: config.currency || '',
+ maxProducts:
+ Number.isFinite(config.maxProducts) && config.maxProducts > 0
+ ? Math.min(config.maxProducts, 8)
+ : MAX_RECOMMENDATIONS,
};
+ // Shopping mode: explicit `shop` domain, or auto-detected when the widget
+ // is embedded on a Shopify storefront (the Shopify global is present). The
+ // host can force it off with `shopping: false`.
+ const detected = detectShop();
+ if (!this.config.shop && detected) this.config.shop = detected.shop;
+ if (!this.config.currency && detected) this.config.currency = detected.currency;
+ this.config.shopping =
+ config.shopping === false ? false : !!(config.shopping || this.config.shop);
+ // Add-to-cart only works same-origin on the store itself.
+ this._onStore = !!(detected && this.config.shop && detected.shop === this.config.shop);
+ this._catalog = null;
+ this._policies = {};
+ this._catalogPromise = null;
+
this._custom = config.customAvatar ? customAvatarEntry(config.customAvatar) : null;
const savedId = storageGet('localStorage', LS_AVATAR);
this.avatar = this._custom || getAvatarFrom(this.config.avatars, config.avatar || savedId);
@@ -311,6 +345,7 @@ export class Concierge {
this.$.panel.hidden = false;
requestAnimationFrame(() => this.root.classList.add('is-open'));
this._ensureStage();
+ this._ensureCatalog(); // warm the store catalog so the first ask is instant
this.$.textarea.focus({ preventScroll: true });
this._scrollThread(false);
} else {
@@ -368,9 +403,78 @@ export class Concierge {
_greetingText() {
if (this.config.greeting) return this.config.greeting;
const site = this.config.siteName || document.querySelector('meta[property="og:site_name"]')?.content || '';
+ if (this.config.shopping) {
+ return site
+ ? `Hi! I can help you find the right thing at ${site} — ask away.`
+ : 'Hi! Tell me what you\'re shopping for and I\'ll help you find it.';
+ }
return site ? `Hi! Ask me anything about ${site}.` : 'Hi! Ask me anything about this site.';
}
+ // ── Shopify catalog (lazy) ──────────────────────────────────────────────────
+ /** Load the store catalog once, from session cache or the live storefront. */
+ _ensureCatalog() {
+ if (!this.config.shopping || !this.config.shop) return Promise.resolve(null);
+ if (this._catalog) return Promise.resolve(this._catalog);
+ if (this._catalogPromise) return this._catalogPromise;
+ this._catalogPromise = this._loadCatalog().finally(() => {
+ this._catalogPromise = null;
+ });
+ return this._catalogPromise;
+ }
+
+ async _loadCatalog() {
+ const shop = this.config.shop;
+ const cached = this._readCatalogCache(shop);
+ if (cached) {
+ this._catalog = cached.catalog;
+ this._policies = cached.policies || {};
+ return this._catalog;
+ }
+ this._catalogAbort = new AbortController();
+ try {
+ const [catalog, policies] = await Promise.all([
+ fetchCatalog({
+ shop,
+ currency: this.config.currency || 'USD',
+ signal: this._catalogAbort.signal,
+ }),
+ fetchPolicies({ shop, signal: this._catalogAbort.signal }).catch(() => ({})),
+ ]);
+ if (this.config.currency) catalog.currency = this.config.currency;
+ this._catalog = catalog;
+ this._policies = policies || {};
+ this._writeCatalogCache(shop, catalog, this._policies);
+ this._emit('catalog', { store: catalog.store, products: catalog.products.length });
+ return catalog;
+ } catch (err) {
+ // A store with a disabled public catalog: shopping cards go quiet, the
+ // concierge still answers from the page + any curated knowledge.
+ this._emit('error', err instanceof Error ? err : new Error(String(err)));
+ this._catalog = { store: shop, origin: shopOrigin(shop), currency: this.config.currency || 'USD', products: [], collections: [] };
+ return this._catalog;
+ }
+ }
+
+ _readCatalogCache(shop) {
+ try {
+ const raw = storageGet('sessionStorage', `${SS_CATALOG}:${shop}`);
+ if (!raw) return null;
+ const parsed = JSON.parse(raw);
+ if (!parsed || Date.now() - parsed.t > CATALOG_TTL_MS) return null;
+ if (!parsed.catalog?.products?.length) return null;
+ return parsed;
+ } catch {
+ return null;
+ }
+ }
+
+ _writeCatalogCache(shop, catalog, policies) {
+ // Only worth caching a real catalog; keep it lean for the sessionStorage cap.
+ if (!catalog?.products?.length) return;
+ storageSet('sessionStorage', `${SS_CATALOG}:${shop}`, JSON.stringify({ t: Date.now(), catalog, policies }));
+ }
+
// ── 3D stage (lazy) ───────────────────────────────────────────────────────
async _ensureStage() {
if (this._stage || this._stageLoading) return;
@@ -525,7 +629,9 @@ export class Concierge {
empty.appendChild(title);
const suggestions = this.config.suggestions.length
? this.config.suggestions
- : defaultSuggestions(this.config.siteName);
+ : this.config.shopping
+ ? shoppingSuggestions()
+ : defaultSuggestions(this.config.siteName);
if (suggestions.length) {
const chips = document.createElement('div');
chips.className = 'tc-chips';
@@ -542,18 +648,110 @@ export class Concierge {
thread.appendChild(empty);
return;
}
- for (const m of this.messages) thread.appendChild(this._bubble(m.role, m.content));
+ for (const m of this.messages) thread.appendChild(this._bubble(m.role, m.content, { products: m.products }));
this._scrollThread(false);
}
- _bubble(role, content, { error = false } = {}) {
+ _bubble(role, content, { error = false, products = null } = {}) {
const el = document.createElement('div');
el.className = `tc-msg is-${role === 'user' ? 'user' : 'bot'}${error ? ' is-error' : ''}`;
if (role === 'user') el.textContent = content;
- else el.innerHTML = renderMarkdown(content);
+ else {
+ el.innerHTML = renderMarkdown(content);
+ if (Array.isArray(products) && products.length) this._renderProductCards(el, products);
+ }
return el;
}
+ /**
+ * Render product recommendation cards under an answer. The set comes from the
+ * widget's own retrieval, so image, price, and link are always real. On the
+ * store itself an "Add" button posts to Shopify's public /cart/add.js.
+ */
+ _renderProductCards(afterEl, products) {
+ const wrap = document.createElement('div');
+ wrap.className = 'tc-products';
+ wrap.setAttribute('role', 'list');
+ wrap.setAttribute('aria-label', 'Recommended products');
+ for (const p of products) {
+ const priceLabel =
+ p.priceMax > p.priceMin
+ ? `${money(p.priceMin, p.currency)} – ${money(p.priceMax, p.currency)}`
+ : money(p.priceMin, p.currency);
+ const card = document.createElement('div');
+ card.className = 'tc-product';
+ card.setAttribute('role', 'listitem');
+ card.innerHTML = `
+ <a class="tc-product-media" href="${escapeHtml(p.url)}" target="_top" rel="noopener" aria-label="${escapeHtml(p.title)}">
+ ${p.image ? `<img loading="lazy" src="${escapeHtml(p.image)}" alt="">` : '<span class="tc-product-noimg" aria-hidden="true"></span>'}
+ ${p.onSale ? '<span class="tc-product-badge">Sale</span>' : ''}
+ </a>
+ <div class="tc-product-body">
+ <a class="tc-product-title" href="${escapeHtml(p.url)}" target="_top" rel="noopener">${escapeHtml(p.title)}</a>
+ <div class="tc-product-meta">
+ <span class="tc-product-price">${escapeHtml(priceLabel)}</span>
+ ${p.available ? '' : '<span class="tc-product-oos">Sold out</span>'}
+ </div>
+ <div class="tc-product-actions"></div>
+ </div>`;
+ const actions = card.querySelector('.tc-product-actions');
+ const view = document.createElement('a');
+ view.className = 'tc-product-view';
+ view.href = p.url;
+ view.target = '_top';
+ view.rel = 'noopener';
+ view.textContent = 'View';
+ actions.appendChild(view);
+ if (this._onStore && p.available && p.variantId) {
+ const add = document.createElement('button');
+ add.type = 'button';
+ add.className = 'tc-product-add';
+ add.textContent = 'Add to cart';
+ add.addEventListener('click', () => this._addToCart(p, add));
+ actions.appendChild(add);
+ }
+ wrap.appendChild(card);
+ }
+ afterEl.appendChild(wrap);
+ this._scrollThread();
+ }
+
+ /** Add a variant to the Shopify cart via the store's public AJAX endpoint. */
+ async _addToCart(product, btn) {
+ if (!this._onStore || !product.variantId) return;
+ const origin = shopOrigin(this.config.shop);
+ btn.disabled = true;
+ const original = btn.textContent;
+ btn.textContent = 'Adding…';
+ try {
+ const res = await fetch(`${origin}/cart/add.js`, {
+ method: 'POST',
+ headers: { 'content-type': 'application/json' },
+ body: JSON.stringify({ items: [{ id: product.variantId, quantity: 1 }] }),
+ });
+ if (!res.ok) throw new Error(`cart/add → HTTP ${res.status}`);
+ btn.textContent = 'Added ✓';
+ btn.classList.add('is-added');
+ this._emit('addtocart', { product });
+ // Nudge Shopify themes that watch for cart changes to refresh their count.
+ try {
+ document.dispatchEvent(new CustomEvent('cart:refresh', { bubbles: true }));
+ } catch {
+ /* theme has no such hook: the item is still in the cart */
+ }
+ setTimeout(() => {
+ if (!btn.isConnected) return;
+ btn.textContent = original;
+ btn.classList.remove('is-added');
+ btn.disabled = false;
+ }, 2400);
+ } catch (err) {
+ btn.textContent = 'Try again';
+ btn.disabled = false;
+ this._emit('error', err instanceof Error ? err : new Error(String(err)));
+ }
+ }
+
_scrollThread(smooth = true) {
const t = this.$.thread;
t.scrollTo({ top: t.scrollHeight, behavior: smooth && !matchMedia('(prefers-reduced-motion: reduce)').matches ? 'smooth' : 'auto' });
@@ -609,6 +807,23 @@ export class Concierge {
let spoken = ''; // buffer of not-yet-spoken text
let started = false;
+ // Shopping mode: retrieve the products this question is about and ground
+ // the answer in them. The cards are rendered from this same set, so prices
+ // and links are always real, never model-invented.
+ let shopping = null;
+ let recommended = [];
+ if (this.config.shopping) {
+ try {
+ const catalog = await this._ensureCatalog();
+ if (catalog?.products?.length) {
+ recommended = searchProducts(catalog.products, question, this.config.maxProducts);
+ shopping = buildShoppingPayload(catalog, recommended, this._policies, question);
+ }
+ } catch {
+ /* retrieval must never block the answer */
+ }
+ }
+
this._abort = new AbortController();
let answer = '';
try {
@@ -620,6 +835,7 @@ export class Concierge {
knowledge: this.config.knowledge,
siteName: this.config.siteName,
}),
+ shopping: shopping || undefined,
persona: this.config.persona || undefined,
lang: this.config.lang || undefined,
signal: this._abort.signal,
@@ -653,9 +869,14 @@ export class Concierge {
} else {
if (!started) this.$.thread.appendChild(streamEl);
streamEl.innerHTML = renderMarkdown(answer);
- this.messages.push({ role: 'assistant', content: answer });
+ if (recommended.length) this._renderProductCards(streamEl, recommended);
+ this.messages.push({
+ role: 'assistant',
+ content: answer,
+ products: recommended.length ? recommended.map(compactCard) : undefined,
+ });
this._persistThread();
- this._emit('message', { role: 'assistant', content: answer });
+ this._emit('message', { role: 'assistant', content: answer, products: recommended });
}
} catch (err) {
typing.remove();
@@ -713,6 +934,7 @@ export class Concierge {
if (this._destroyed) return;
this._destroyed = true;
this._abort?.abort();
+ this._catalogAbort?.abort();
this._killTeaser();
this._mq?.removeEventListener?.('change', this._onScheme);
this._themeObs?.disconnect();
@@ -732,3 +954,23 @@ function defaultSuggestions(siteName) {
const site = siteName || 'this site';
return [`What is ${site}?`, 'How do I get started?', 'What does it cost?'];
}
+
+function shoppingSuggestions() {
+ return ['What do you recommend?', 'Help me find a gift', "What's on sale?", 'Do you ship internationally?'];
+}
+
+/** Minimal product shape persisted on a message so cards survive a reload. */
+function compactCard(p) {
+ return {
+ handle: p.handle,
+ title: p.title,
+ url: p.url,
+ image: p.image,
+ priceMin: p.priceMin,
+ priceMax: p.priceMax,
+ currency: p.currency,
+ available: p.available,
+ onSale: p.onSale,
+ variantId: p.variantId,
+ };
+}
diff --git a/concierge-sdk/test/shopify.test.js b/concierge-sdk/test/shopify.test.js
new file mode 100644
index 000000000..06e9e54b6
--- /dev/null
+++ b/concierge-sdk/test/shopify.test.js
@@ -0,0 +1,165 @@
+import { test } from 'node:test';
+import assert from 'node:assert/strict';
+import {
+ normalizeShopDomain,
+ shopOrigin,
+ detectShop,
+ htmlToText,
+ money,
+ normalizeProduct,
+ fetchCatalog,
+ fetchPolicies,
+ parseIntent,
+ searchProducts,
+ catalogSummary,
+ buildShoppingPayload,
+} from '../src/shopify.js';
+
+// A tiny fake Shopify products.json product.
+function raw(overrides = {}) {
+ return {
+ id: 100,
+ title: 'Merino Wool Scarf',
+ handle: 'merino-wool-scarf',
+ body_html: '<p>A <b>soft</b> blue scarf for cold days.</p>',
+ vendor: 'Highland',
+ product_type: 'Scarves',
+ tags: ['wool', 'blue', 'winter'],
+ images: [{ src: 'http://cdn/scarf.jpg' }],
+ variants: [
+ { id: 1, price: '48.00', compare_at_price: '60.00', available: true },
+ { id: 2, price: '52.00', available: false },
+ ],
+ ...overrides,
+ };
+}
+
+test('normalizeShopDomain accepts bare domains and full URLs', () => {
+ assert.equal(normalizeShopDomain('shop.example.com'), 'shop.example.com');
+ assert.equal(normalizeShopDomain('https://Shop.Example.com/products'), 'shop.example.com');
+ assert.equal(normalizeShopDomain('store.myshopify.com/collections/all'), 'store.myshopify.com');
+ assert.equal(normalizeShopDomain(''), '');
+ assert.equal(shopOrigin('shop.example.com'), 'https://shop.example.com');
+});
+
+test('detectShop reads the Shopify global, null when absent', () => {
+ assert.equal(detectShop({}), null);
+ const win = { Shopify: { shop: 'acme.myshopify.com', currency: { active: 'GBP' } } };
+ assert.deepEqual(detectShop(win), { shop: 'acme.myshopify.com', currency: 'GBP' });
+});
+
+test('htmlToText strips tags, entities, and caps length', () => {
+ assert.equal(htmlToText('<p>Hello&nbsp;&amp; welcome</p>'), 'Hello & welcome');
+ assert.equal(htmlToText('<b>x</b>'.repeat(400), 40).length <= 40, true);
+});
+
+test('money formats with currency, degrades on a malformed code', () => {
+ assert.match(money('48.00', 'USD'), /\$48\.00/);
+ assert.equal(money(10, 'US'), '10.00 US'); // 2-letter code throws in Intl → fallback
+});
+
+test('normalizeProduct compacts variants, price range, sale, https image', () => {
+ const p = normalizeProduct(raw(), 'https://shop.example.com', 'USD');
+ assert.equal(p.title, 'Merino Wool Scarf');
+ assert.equal(p.url, 'https://shop.example.com/products/merino-wool-scarf');
+ assert.equal(p.priceMin, 48);
+ assert.equal(p.priceMax, 52);
+ assert.equal(p.available, true);
+ assert.equal(p.onSale, true); // compare_at 60 > 48
+ assert.equal(p.image, 'https://cdn/scarf.jpg'); // http upgraded
+ assert.equal(p.variantId, 1); // first available variant
+ assert.match(p.summary, /soft blue scarf/);
+ assert.equal(normalizeProduct({}, 'https://x'), null); // no handle → dropped
+});
+
+test('fetchCatalog paginates products and reads collections', async () => {
+ const pages = {
+ 'https://shop.example.com/products.json?limit=250&page=1': {
+ products: Array.from({ length: 250 }, (_, i) => raw({ id: i, handle: `p${i}`, title: `Product ${i}` })),
+ },
+ 'https://shop.example.com/products.json?limit=250&page=2': {
+ products: [raw({ id: 999, handle: 'last', title: 'Last One' })],
+ },
+ 'https://shop.example.com/collections.json?limit=250': {
+ collections: [{ id: 1, title: 'Winter', handle: 'winter' }],
+ },
+ };
+ const fetchImpl = async (url) => ({
+ ok: url in pages,
+ status: url in pages ? 200 : 404,
+ json: async () => pages[url],
+ });
+ const cat = await fetchCatalog({ shop: 'shop.example.com', fetchImpl });
+ assert.equal(cat.products.length, 251);
+ assert.equal(cat.products[250].title, 'Last One');
+ assert.equal(cat.collections[0].url, 'https://shop.example.com/collections/winter');
+});
+
+test('fetchCatalog throws only when the very first page is unreachable', async () => {
+ const fetchImpl = async () => ({ ok: false, status: 404, json: async () => ({}) });
+ await assert.rejects(fetchCatalog({ shop: 'shop.example.com', fetchImpl }), /products\.json/);
+});
+
+test('fetchPolicies strips HTML and omits 404s', async () => {
+ const fetchImpl = async (url) => {
+ if (url.endsWith('/policies/shipping-policy')) {
+ return { ok: true, status: 200, text: async () => '<main>We ship worldwide within 3 business days.</main>' };
+ }
+ return { ok: false, status: 404, text: async () => '' };
+ };
+ const pol = await fetchPolicies({ shop: 'shop.example.com', fetchImpl });
+ assert.match(pol.shipping, /ship worldwide within 3 business days/);
+ assert.equal(pol.returns, undefined);
+});
+
+test('parseIntent reads price ceiling and sort hints', () => {
+ assert.deepEqual(parseIntent('scarf under $50'), { maxPrice: 50, sort: null, onSale: false });
+ assert.equal(parseIntent('cheapest hoodie').sort, 'price-asc');
+ assert.equal(parseIntent('your best jacket').sort, 'price-desc');
+ assert.equal(parseIntent('anything on sale').onSale, true);
+});
+
+const CATALOG = {
+ store: 'shop.example.com',
+ currency: 'USD',
+ collections: [{ title: 'Winter', handle: 'winter', url: 'https://shop.example.com/collections/winter' }],
+ products: [
+ normalizeProduct(raw({ id: 1, handle: 'scarf', title: 'Merino Wool Scarf', product_type: 'Scarves', tags: ['blue', 'wool'], variants: [{ id: 11, price: '48', available: true }] }), 'https://shop.example.com'),
+ normalizeProduct(raw({ id: 2, handle: 'beanie', title: 'Cashmere Beanie', product_type: 'Hats', tags: ['grey', 'wool'], body_html: 'A warm hat.', variants: [{ id: 21, price: '30', available: true }] }), 'https://shop.example.com'),
+ normalizeProduct(raw({ id: 3, handle: 'gloves', title: 'Leather Gloves', product_type: 'Gloves', tags: ['brown'], body_html: 'Sold out gloves.', variants: [{ id: 31, price: '75', available: false }] }), 'https://shop.example.com'),
+ ],
+};
+
+test('searchProducts ranks by weighted overlap, title wins', () => {
+ const hits = searchProducts(CATALOG.products, 'do you have a wool scarf');
+ assert.equal(hits[0].title, 'Merino Wool Scarf'); // title "scarf" + tag "wool"
+ assert.ok(hits.length >= 1);
+});
+
+test('searchProducts honors a price ceiling and cheapest sort', () => {
+ const under40 = searchProducts(CATALOG.products, 'a hat under $40');
+ assert.equal(under40[0].title, 'Cashmere Beanie');
+ const cheap = searchProducts(CATALOG.products, 'cheapest thing you have');
+ assert.equal(cheap[0].priceMin, 30); // beanie, the cheapest in-stock
+});
+
+test('searchProducts returns nothing for an off-catalog ask', () => {
+ assert.deepEqual(searchProducts(CATALOG.products, 'do you sell airplanes'), []);
+});
+
+test('catalogSummary describes count, categories, price range', () => {
+ const s = catalogSummary(CATALOG);
+ assert.match(s, /3 products/);
+ assert.match(s, /Scarves/);
+ assert.match(s, /\$30\.00 to \$75\.00/);
+});
+
+test('buildShoppingPayload sends only recommended products + relevant policy', () => {
+ const recs = searchProducts(CATALOG.products, 'wool scarf');
+ const payload = buildShoppingPayload(CATALOG, recs, { shipping: 'Ships in 3 days.', returns: '30 day returns.' }, 'do you ship fast?');
+ assert.equal(payload.store, 'shop.example.com');
+ assert.match(payload.products, /Merino Wool Scarf/);
+ assert.deepEqual(payload.collections, ['Winter']);
+ assert.match(payload.policies, /Ships in 3 days/);
+ assert.doesNotMatch(payload.policies, /30 day returns/); // shipping question → shipping policy only
+});
diff --git a/data/changelog.json b/data/changelog.json
index 5cbcf5d33..11433177a 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,16 @@
{
"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-07-23",
+ "title": "The Concierge becomes a Shopify shopping assistant, with product cards",
+ "summary": "The embeddable AI concierge (the floating chat with a 3D avatar) now turns into a full shopping assistant on any Shopify store, from the same one script tag. It reads your live catalog and policies straight from Shopify's public endpoints, no app, no API key, and no product feed to keep in sync, then helps shoppers find the right thing and shows real product cards with the live image, price, and an add-to-cart button. It understands how people actually shop (\"a gift under $75\", \"cheapest hoodie\", \"anything on sale?\") and answers shipping and returns from your published policies. Because the cards are drawn from your real catalog, it can never invent a product, a price, or a discount.",
+ "tags": [
+ "feature",
+ "sdk"
+ ],
+ "link": "/tutorials/shopify-shopping-assistant"
+ },
{
"date": "2026-07-23",
"title": "The sniper learns from its own postmortem: conviction-crossing entries and smarter trailing stops",
@@ -15529,6 +15539,13 @@
"feature"
],
"link": "/docs/sign-language"
+ },
+ {
+ "date": "2026-07-20",
+ "title": "Sign Language gets its own home",
+ "summary": "There is now a dedicated Sign Language page at three.ws/sign-language: a live avatar signing on arrival, an input that fingerspells anything you type (words and numbers), the three ways avatars use ASL explained, and a webcam demo that reads your own fingerspelling. Find it in the Build menu under 3D and avatars, or the new card on the home page.",
+ "tags": ["feature"],
+ "link": "/sign-language"
}
]
}
diff --git a/data/pages.json b/data/pages.json
index bf8f03c32..d987a0717 100644
--- a/data/pages.json
+++ b/data/pages.json
@@ -56,6 +56,15 @@
"added": "2026-07-19",
"showcase": true
},
+ {
+ "path": "/sign-language",
+ "title": "Sign Language Avatars",
+ "description": "three.ws avatars sign in American Sign Language: fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D.",
+ "priority": 0.9,
+ "changefreq": "weekly",
+ "added": "2026-07-20",
+ "showcase": true
+ },
{
"path": "/objects",
"title": "Object Library",
@@ -2747,6 +2756,14 @@
"changefreq": "monthly",
"added": "2026-07-05"
},
+ {
+ "path": "/tutorials/shopify-shopping-assistant",
+ "title": "Tutorial · 3D AI Shopping Assistant for Shopify",
+ "description": "Add a chat assistant with a 3D face to your Shopify store: it reads your live catalog, recommends real products as cards with add-to-cart, and answers shipping and returns, all from one script tag.",
+ "priority": 0.8,
+ "changefreq": "monthly",
+ "added": "2026-07-23"
+ },
{
"path": "/tutorials/shopify-store-guide",
"title": "Tutorial · 3D Store Guide for Shopify (No Code)",
diff --git a/docs/concierge.md b/docs/concierge.md
index 5c9d822ab..7df44dd64 100644
--- a/docs/concierge.md
+++ b/docs/concierge.md
@@ -47,6 +47,10 @@ Most site chatbots need a crawler, an index, and an onboarding flow. Concierge s
Because the page itself is the knowledge source, the concierge is never stale: edit your pricing page and the very next answer reflects it.
+## Shopping mode (Shopify)
+
+On a Shopify store the concierge becomes a shopping assistant that knows your live catalog and shows real product cards. It needs no app, no API key, and no product feed: Shopify serves every storefront's catalog and policies publicly, and the widget reads them at ask-time (`/products.json`, `/collections.json`, `/policies/*`, all same-origin on the store). Per question it retrieves the handful of products the shopper asked about, grounds the streamed answer in them, and renders cards (image, live price, link, add-to-cart) from that same set, so prices and links are always real. It understands shopping intent ("a gift under $75", "cheapest hoodie", "anything on sale?") and answers shipping and returns from your published policies. Turn it on with the same one tag: it auto-detects the storefront, or force it with `data-shopping="true"` / `data-shop="your-store.myshopify.com"`. Full walkthrough: [Shopify shopping assistant tutorial](/tutorials/shopify-shopping-assistant).
+
## The avatar
The catalog (`sol`, `nova`, `vera`, `atlas`, `echo`) is the same rigged, viseme-capable roster the [page-agent](https://www.npmjs.com/package/@three-ws/page-agent) ships, served from `https://three.ws/avatars/`. Visitors pick their concierge from the built-in picker (their choice persists), or the host pins a single custom rigged GLB with `custom-avatar`. The 3D stage initializes on first open only, so a closed widget costs the host page zero GPU and no GLB download.
@@ -56,7 +60,7 @@ The catalog (`sol`, `nova`, `vera`, `atlas`, `echo`) is the same rigged, viseme-
The hosted endpoint is free, but the wire format is open. Any server that accepts the POST body and streams the same three SSE event types can be swapped in via the `endpoint` option:
```
-→ POST { message, history[], site{url,name,title,description,headings,nav,knowledge,content}, persona?, lang? }
+→ POST { message, history[], site{url,name,title,description,headings,nav,knowledge,content}, shopping?{store,currency,summary,collections[],policies,products}, persona?, lang? }
← data: {"type":"chunk","text":"..."}
← data: {"type":"done","provider":"...","model":"..."}
← data: {"type":"error","code":"...","message":"..."}
diff --git a/docs/tutorials/shopify-shopping-assistant.md b/docs/tutorials/shopify-shopping-assistant.md
new file mode 100644
index 000000000..1ed0515ed
--- /dev/null
+++ b/docs/tutorials/shopify-shopping-assistant.md
@@ -0,0 +1,103 @@
+# Add a 3D AI shopping assistant to your Shopify store
+
+Give your store a shopping assistant with a face: a floating chat where a rigged 3D avatar answers questions, recommends real products from your live catalog, and helps shoppers check out, all from one script tag. It is the [Concierge](/concierge) widget in **shopping mode**, and it needs no app install, no API key, and no product feed to maintain.
+
+This is different from the [3D Store Guide](/tutorials/shopify-store-guide), which walks a visitor through your storefront like a tour. The shopping assistant is a persistent chat: the shopper types (or speaks) what they want, and the assistant finds it.
+
+What you need: a Shopify store and two minutes. That is genuinely all.
+
+---
+
+## What it does
+
+- **Knows your live catalog.** It reads your store's public `/products.json`, `/collections.json`, and policy pages at ask-time. Change a price or add a product and the assistant knows immediately, with nothing to re-sync.
+- **Recommends real products as cards.** When a shopper asks "help me find a rain jacket under $120," it shows product cards with the real image, live price, and a link, plus an **Add to cart** button that works on the store.
+- **Answers shipping and returns** grounded in your published policies, not made up.
+- **Has a face and a voice.** A 3D avatar blinks, idles, and lipsyncs the answer aloud, with push-to-talk voice input where the browser supports it.
+
+Prices and links on the cards come straight from your catalog, so the assistant can never invent a product, a price, or a discount.
+
+## Step 1: paste one tag
+
+In your Shopify admin go to **Online Store → Themes → Edit code → `theme.liquid`**, and paste this just before `</body>`:
+
+```html
+<script type="module"
+ src="https://three.ws/concierge/concierge.global.js"
+ data-concierge
+ data-site-name="Your Store"
+ data-avatar="nova"
+ data-accent="#3f7d5b"></script>
+```
+
+Save. Open your store. A launcher appears in the corner; click it and ask "what do you recommend?" Shopping mode turned itself on because the widget detected your Shopify storefront.
+
+## Step 2: make it yours
+
+Every attribute is optional. The ones that matter for a store:
+
+| Attribute | What it does |
+| --- | --- |
+| `data-site-name` | Your store name, used in the greeting and answers. |
+| `data-avatar` | `sol`, `nova`, `vera`, `atlas`, or `echo`. Or bring your own with `data-custom-avatar="<glb-url>"`. |
+| `data-accent` | Any CSS color; restyles the whole widget to match your brand. |
+| `data-currency` | ISO code (`USD`, `GBP`, `EUR`, …) if prices should show in a specific currency. |
+| `data-max-products` | How many product cards to show per answer (1–8, default 4). |
+| `data-persona` | One line of tone, e.g. `"a warm, expert associate who keeps it brief"`. |
+| `data-suggestions` | Starter chips, pipe-separated: `"Help me pick a gift\|What's on sale?\|Do you ship to Canada?"`. |
+
+Force shopping mode on or off with `data-shopping="true"` / `"false"`, or point it at a specific storefront with `data-shop="your-store.myshopify.com"` (useful if you embed it somewhere that is not the store origin).
+
+## Step 3: see it work
+
+Ask the assistant the way a customer would. It understands shopping intent, not just keywords:
+
+- **"a warm wool scarf"** → ranks your catalog by relevance and shows the closest matches.
+- **"a gift under $75"** → filters to products at or below that price.
+- **"cheapest hoodie you have"** → sorts by price.
+- **"anything on sale?"** → surfaces products with a compare-at price.
+- **"do you ship to Canada?"** → answers from your shipping policy.
+
+If nothing in the catalog fits, it says so honestly and points the shopper to a collection to browse, instead of inventing a product.
+
+## How it works (for the curious)
+
+There is no crawler and no vector database. Every Shopify storefront exposes its catalog publicly, and the widget reads it directly:
+
+```
+GET https://your-store.myshopify.com/products.json?limit=250 → catalog
+GET https://your-store.myshopify.com/collections.json → collections
+GET https://your-store.myshopify.com/policies/shipping-policy → shipping
+GET https://your-store.myshopify.com/policies/refund-policy → returns
+```
+
+On the store these are same-origin, so there is no CORS wall. The widget fetches them once, caches them for the session, and for each question runs a small keyword retrieval to pick the handful of products the shopper asked about. Only that handful, plus a compact store summary and the relevant policy, is sent to the answer endpoint. The answer streams back grounded in exactly those products, and the cards are rendered from the same set, so what the assistant says and what it shows always match.
+
+Add-to-cart posts to Shopify's public `/cart/add.js` and fires a `cart:refresh` event so your theme updates its cart count.
+
+## Do it in code
+
+Prefer to wire it yourself, or run your own backend? The same building blocks are exported from [`@three-ws/concierge`](https://www.npmjs.com/package/@three-ws/concierge):
+
+```js
+import {
+ fetchCatalog, fetchPolicies, searchProducts, buildShoppingPayload,
+} from '@three-ws/concierge';
+
+const catalog = await fetchCatalog({ shop: 'your-store.myshopify.com' });
+const policies = await fetchPolicies({ shop: 'your-store.myshopify.com' });
+
+const question = 'a warm wool scarf under $60';
+const recommended = searchProducts(catalog.products, question, 4);
+const shopping = buildShoppingPayload(catalog, recommended, policies, question);
+// → POST { message: question, shopping } to /api/concierge, render `recommended` as cards
+```
+
+`searchProducts` returns already-ranked, price-filtered products. `buildShoppingPayload` bounds what is sent to the model. Point `endpoint` at your own SSE server if you want to host the answer engine yourself; the [wire format](/docs/concierge) is documented.
+
+## Related
+
+- [Concierge](/concierge) — the widget this is built on, for any website.
+- [3D Store Guide for Shopify](/tutorials/shopify-store-guide) — a guided storefront tour (complementary: run both, hand off from the tour to the assistant).
+- [Assistant widget](/docs/assistant-widget) — a full-body avatar assistant, the sibling surface.
+- Use it from an AI agent: [`@three-ws/concierge-mcp`](https://www.npmjs.com/package/@three-ws/concierge-mcp).
diff --git a/pages/home.html b/pages/home.html
index e47286177..8f88a53dd 100644
--- a/pages/home.html
+++ b/pages/home.html
@@ -5100,6 +5100,22 @@
</div>
</div>
+ <!-- Sign Language -->
+ <a class="bento-card" href="/sign-language" style="text-decoration:none;color:inherit;display:block">
+ <div class="bento-icon">
+ <span class="dot" style="background:#a78bfa;box-shadow:0 0 8px #a78bfa55"></span>
+ <span style="font-family:var(--font-mono);font-size:11px;letter-spacing:0.15em;text-transform:uppercase;color:var(--text-3)">Sign Language · New</span>
+ </div>
+ <p class="bento-title">Avatars that sign in ASL 🤟</p>
+ <p class="bento-desc">Fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole conversation in American Sign Language, live in 3D.</p>
+ <div class="bento-pills">
+ <span class="bento-pill">Fingerspelling</span>
+ <span class="bento-pill">Signed replies</span>
+ <span class="bento-pill">Webcam input</span>
+ <span class="bento-pill">A–Z + 0–9</span>
+ </div>
+ </a>
+
<!-- Voice & Mocap -->
<div class="bento-card">
<div class="bento-icon">
diff --git a/pages/sign-language.html b/pages/sign-language.html
new file mode 100644
index 000000000..415d13852
--- /dev/null
+++ b/pages/sign-language.html
@@ -0,0 +1,234 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <script>/* three.ws theme boot — no-flash */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <title>Sign Language Avatars · three.ws</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
+ <meta
+ name="description"
+ content="three.ws avatars sign in American Sign Language. Fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D."
+ />
+ <meta name="theme-color" content="#000000" />
+ <link rel="canonical" href="https://three.ws/sign-language" />
+
+ <meta property="og:type" content="website" />
+ <meta property="og:title" content="Sign Language Avatars · three.ws" />
+ <meta property="og:description" content="Avatars that sign in ASL. Fingerspell anything, get signed chat replies, and sign back with your webcam — live in 3D." />
+ <meta property="og:url" content="https://three.ws/sign-language" />
+ <meta property="og:site_name" content="three.ws" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=main&amp;t=Sign+Language+Avatars&amp;d=Avatars+that+sign+in+ASL.+Fingerspell+anything%2C+get+signed+chat+replies%2C+and+sign+back+with+your+webcam+%E2%80%94+live+in+3D&amp;p=%2Fsign-language" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:title" content="Sign Language Avatars · three.ws" />
+ <meta name="twitter:description" content="Avatars that sign in ASL — fingerspelling, signed chat replies, and webcam sign input, live in 3D." />
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=main&amp;t=Sign+Language+Avatars&amp;d=Avatars+that+sign+in+ASL.+Fingerspell+anything%2C+get+signed+chat+replies%2C+and+sign+back+with+your+webcam+%E2%80%94+live+in+3D&amp;p=%2Fsign-language" />
+ <meta name="twitter:site" content="@trythreews" />
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
+ <meta property="og:locale" content="en_US" />
+
+ <link rel="shortcut icon" href="/favicon.ico" />
+ <link rel="stylesheet" href="/style.css" />
+ <link rel="stylesheet" href="/nav.css" />
+ <link rel="stylesheet" href="/footer.css" />
+ <link rel="stylesheet" href="/fonts/fonts.css" />
+ <script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"Sign Language Avatars","description":"three.ws avatars sign in American Sign Language: fingerspelling for any word or number, signed chat replies, and webcam sign-to-text recognition — the full loop, live in 3D.","url":"https://three.ws/sign-language","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script>
+
+ <style>
+ .sl-main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 96px; }
+
+ /* Hero: live avatar left, pitch + input right */
+ .sl-hero {
+ display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px);
+ align-items: center; padding: clamp(28px, 5vw, 64px) 0 clamp(20px, 3vw, 40px);
+ }
+ .sl-chip {
+ display: inline-flex; align-items: center; gap: 8px;
+ padding: 5px 12px; border: 1px solid var(--stroke); border-radius: 999px;
+ background: var(--surface-1); font-size: 12px; letter-spacing: .04em;
+ text-transform: uppercase; color: var(--ink-dim); font-family: var(--font-mono);
+ }
+ .sl-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: #a78bfa; box-shadow: 0 0 0 3px rgba(167,139,250,.18); }
+ .sl-hero h1 { font-size: clamp(32px, 5.2vw, 58px); line-height: 1.03; margin: 18px 0 14px; letter-spacing: -.02em; }
+ .sl-hero-lede { max-width: 54ch; color: var(--ink-dim); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.6; margin: 0; }
+
+ .sl-stage-wrap { position: relative; border: 1px solid var(--stroke); border-radius: 20px; overflow: hidden; background: radial-gradient(120% 120% at 50% 0%, rgba(167,139,250,.10), transparent 60%), var(--surface-1); aspect-ratio: 4 / 5; min-height: 380px; }
+ #sl-stage { position: absolute; inset: 0; width: 100%; height: 100%; }
+ .sl-status { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; font-family: var(--font-mono); font-size: 13px; color: var(--ink); background: linear-gradient(to top, rgba(0,0,0,.55), transparent); pointer-events: none; min-height: 20px; }
+ :root[data-theme='light'] .sl-status { color: #fff; }
+
+ /* Spell input */
+ .sl-try { margin-top: 26px; }
+ .sl-try-label { font-size: 13px; color: var(--ink-dim); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
+ .sl-input-row { display: flex; gap: 8px; }
+ .sl-input {
+ flex: 1 1 auto; min-width: 0; box-sizing: border-box;
+ background: rgba(167,139,250,.06); border: 1px solid rgba(167,139,250,.4);
+ color: var(--ink); font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 12px;
+ }
+ .sl-input::placeholder { color: var(--ink-dim); }
+ .sl-input:focus { outline: none; border-color: rgba(167,139,250,.8); box-shadow: 0 0 0 3px rgba(167,139,250,.2); }
+ .sl-btn {
+ flex: 0 0 auto; appearance: none; border: 1px solid rgba(167,139,250,.5);
+ background: rgba(167,139,250,.16); color: var(--ink); font: inherit; font-weight: 600;
+ font-size: 15px; padding: 12px 20px; border-radius: 12px; cursor: pointer;
+ transition: background .12s ease, border-color .12s ease;
+ }
+ .sl-btn:hover:not(:disabled) { background: rgba(167,139,250,.28); border-color: rgba(167,139,250,.75); }
+ .sl-btn:disabled { opacity: .6; cursor: default; }
+ .sl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
+ .sl-phrase-chip {
+ appearance: none; border: 1px solid var(--stroke); background: var(--surface-2);
+ color: var(--ink-dim); font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
+ transition: border-color .12s ease, color .12s ease;
+ }
+ .sl-phrase-chip:hover { border-color: rgba(167,139,250,.6); color: var(--ink); }
+
+ /* Capability cards */
+ .sl-caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
+ .sl-cap { border: 1px solid var(--stroke); border-radius: 16px; padding: 24px; background: var(--surface-1); display: flex; flex-direction: column; }
+ .sl-cap-icon { font-size: 26px; line-height: 1; }
+ .sl-cap h3 { font-size: 18px; margin: 14px 0 8px; letter-spacing: -.01em; }
+ .sl-cap p { color: var(--ink-dim); font-size: 14px; line-height: 1.6; margin: 0 0 16px; flex: 1 1 auto; }
+ .sl-cap-link { color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(167,139,250,.5); align-self: flex-start; padding-bottom: 1px; }
+ .sl-cap-link:hover { border-bottom-color: rgba(167,139,250,.9); }
+
+ /* Webcam demo */
+ .sl-webcam { margin-top: clamp(40px, 6vw, 72px); border: 1px solid var(--stroke); border-radius: 20px; padding: clamp(24px, 4vw, 40px); background: var(--surface-1); }
+ .sl-webcam h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 10px; letter-spacing: -.02em; }
+ .sl-webcam p { color: var(--ink-dim); font-size: 15px; line-height: 1.6; max-width: 64ch; margin: 0 0 20px; }
+ .sl-webcam-grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
+ #sl-cam-preview { border: 1px solid var(--stroke); border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #000; }
+ .sl-cam-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
+ .sl-cam-side { display: flex; flex-direction: column; gap: 14px; }
+ #sl-cam-btn.is-live { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.6); }
+ .sl-cam-result { min-height: 48px; border: 1px dashed var(--stroke); border-radius: 12px; padding: 14px; font-size: 17px; color: var(--ink); background: var(--surface-2); }
+ .sl-cam-result[data-state='low'] { border-color: rgba(239,68,68,.5); }
+ .sl-cam-result[data-state='ok'] { border-color: rgba(56,211,159,.5); }
+ .sl-cam-hint { font-size: 13px; color: var(--ink-dim); line-height: 1.5; }
+
+ /* Honest scope note */
+ .sl-note { margin-top: clamp(36px, 5vw, 56px); border-left: 2px solid rgba(167,139,250,.5); padding: 4px 0 4px 18px; color: var(--ink-dim); font-size: 14px; line-height: 1.65; max-width: 72ch; }
+
+ @media (max-width: 900px) {
+ .sl-hero { grid-template-columns: 1fr; }
+ .sl-caps { grid-template-columns: 1fr; }
+ .sl-webcam-grid { grid-template-columns: 1fr; }
+ #sl-cam-preview { max-width: 360px; }
+ }
+ </style>
+ </head>
+ <body>
+ <header>
+ <div id="nav-container"></div>
+ </header>
+ <script src="/nav.js"></script>
+
+ <main class="sl-main">
+ <section class="sl-hero">
+ <div class="sl-stage-wrap">
+ <div id="sl-stage" role="img" aria-label="A 3D avatar signing in American Sign Language"></div>
+ <div class="sl-status" id="sl-status" aria-live="polite"></div>
+ </div>
+
+ <div class="sl-hero-copy">
+ <span class="sl-chip"><span class="sl-chip-dot"></span> American Sign Language · live in 3D</span>
+ <h1>Your avatar speaks sign language.</h1>
+ <p class="sl-hero-lede">
+ three.ws avatars fingerspell any word or number in ASL, sign every chat reply,
+ and read your own signing back from a webcam. The whole conversation, both
+ directions, in 3D that runs in the browser.
+ </p>
+
+ <div class="sl-try">
+ <div class="sl-try-label">Try it — type anything</div>
+ <div class="sl-input-row">
+ <input
+ id="sl-spell-input"
+ class="sl-input"
+ type="text"
+ maxlength="48"
+ placeholder="your name, a word, a number…"
+ aria-label="Text for the avatar to sign"
+ autocomplete="off"
+ />
+ <button id="sl-spell-btn" class="sl-btn" type="button">🤟 Sign it</button>
+ </div>
+ <div class="sl-chips">
+ <button class="sl-phrase-chip" type="button" data-sl-phrase="THANK YOU">thank you</button>
+ <button class="sl-phrase-chip" type="button" data-sl-phrase="I LOVE THREE WS">i love three.ws</button>
+ <button class="sl-phrase-chip" type="button" data-sl-phrase="42">42</button>
+ <button class="sl-phrase-chip" type="button" data-sl-phrase="GM">gm</button>
+ </div>
+ </div>
+ </div>
+ </section>
+
+ <section class="sl-caps" aria-label="What sign language avatars can do">
+ <article class="sl-cap">
+ <span class="sl-cap-icon">🤟</span>
+ <h3>Fingerspell anything</h3>
+ <p>
+ All 26 ASL letter handshapes plus the numbers 0–9, with the traced J and Z
+ and the double-letter bounce. Type a word in the Animation Studio and export
+ the signing as an animated GLB, or share it as a link.
+ </p>
+ <a class="sl-cap-link" href="/pose">Open the Animation Studio →</a>
+ </article>
+ <article class="sl-cap">
+ <span class="sl-cap-icon">💬</span>
+ <h3>Signed chat replies</h3>
+ <p>
+ Turn on sign mode in the agent chat and the avatar signs every answer —
+ library signs where they exist, fingerspelling for the rest. Any embedded
+ avatar gets it with one <code>sign-language</code> attribute.
+ </p>
+ <a class="sl-cap-link" href="/app">Chat with an agent →</a>
+ </article>
+ <article class="sl-cap">
+ <span class="sl-cap-icon">🎥</span>
+ <h3>Sign back with your camera</h3>
+ <p>
+ Fingerspell into your webcam and the AI reads it to text — landmarks are
+ extracted on your device, so the video never leaves your machine. The demo
+ below runs the same recognizer.
+ </p>
+ <a class="sl-cap-link" href="#sl-webcam">Try the webcam demo ↓</a>
+ </article>
+ </section>
+
+ <section class="sl-webcam" id="sl-webcam" aria-label="Webcam sign recognition demo">
+ <h2>Sign to us — we’ll read it</h2>
+ <p>
+ Click start, fingerspell a word at your camera, then stop. Your browser turns
+ the video into hand and body landmarks locally; only those coordinates are sent
+ for recognition. Webcam fingerspelling is imperfect (expect the odd wrong
+ letter), so review the text before you trust it.
+ </p>
+ <div class="sl-webcam-grid">
+ <div id="sl-cam-preview" hidden></div>
+ <div class="sl-cam-side">
+ <button id="sl-cam-btn" class="sl-btn" type="button">🎥 Start signing</button>
+ <div id="sl-cam-result" class="sl-cam-result" aria-live="polite"></div>
+ <p class="sl-cam-hint">
+ Best results: good light, hand in frame, one letter at a time. Numbers and
+ the full A–Z alphabet are supported.
+ </p>
+ </div>
+ </div>
+ </section>
+
+ <p class="sl-note">
+ Fingerspelling spells words letter by letter; it is not full grammatical ASL, which
+ has its own grammar and facial-expression markers. Lexical signs come from recordings
+ of real signers through our motion-capture pipeline, never synthesized guesses — which
+ is why the sign dictionary grows deliberately. Read the
+ <a href="/docs/sign-language">full breakdown</a>.
+ </p>
+ </main>
+
+ <script src="/footer.js" defer></script>
+ <script type="module" src="/src/sign-language-page.js"></script>
+ <script type="module" src="/i18n.js"></script>
+ </body>
+</html>
diff --git a/public/changelog.json b/public/changelog.json
index 2cd9adf53..d52ec0fba 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,11 +1,21 @@
{
- "generated_at": "2026-07-23T05:53:57.500Z",
+ "generated_at": "2026-07-23T07:41:45.574Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
"entries": [
+ {
+ "date": "2026-07-23",
+ "type": "launch",
+ "title": "Tutorial · 3D AI Shopping Assistant for Shopify",
+ "summary": "Add a chat assistant with a 3D face to your Shopify store: it reads your live catalog, recommends real products as cards with add-to-cart, and answers shipping and returns, all from one script tag.",
+ "link": "/tutorials/shopify-shopping-assistant",
+ "tags": [
+ "launch"
+ ]
+ },
{
"date": "2026-07-23",
"type": "launch",
@@ -58,6 +68,17 @@
"improvement"
]
},
+ {
+ "date": "2026-07-23",
+ "type": "update",
+ "title": "The Concierge becomes a Shopify shopping assistant, with product cards",
+ "summary": "The embeddable AI concierge (the floating chat with a 3D avatar) now turns into a full shopping assistant on any Shopify store, from the same one script tag. It reads your live catalog and policies straight from Shopify's public endpoints, no app, no API key, and no product feed to keep in sync, then helps shoppers find the right thing and shows real product cards with the live image, price, and an add-to-cart button. It understands how people actually shop (\"a gift under $75\", \"cheapest hoodie\", \"anything on sale?\") and answers shipping and returns from your published policies. Because the cards are drawn from your real catalog, it can never invent a product, a price, or a discount.",
+ "link": "/tutorials/shopify-shopping-assistant",
+ "tags": [
+ "feature",
+ "sdk"
+ ]
+ },
{
"date": "2026-07-23",
"type": "update",
@@ -444,6 +465,16 @@
"launch"
]
},
+ {
+ "date": "2026-07-20",
+ "type": "launch",
+ "title": "Sign Language Avatars",
+ "summary": "three.ws avatars sign in American Sign Language: fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D.",
+ "link": "/sign-language",
+ "tags": [
+ "launch"
+ ]
+ },
{
"date": "2026-07-20",
"type": "update",
@@ -551,6 +582,16 @@
"docs"
]
},
+ {
+ "date": "2026-07-20",
+ "type": "update",
+ "title": "Sign Language gets its own home",
+ "summary": "There is now a dedicated Sign Language page at three.ws/sign-language: a live avatar signing on arrival, an input that fingerspells anything you type (words and numbers), the three ways avatars use ASL explained, and a webcam demo that reads your own fingerspelling. Find it in the Build menu under 3D and avatars, or the new card on the home page.",
+ "link": "/sign-language",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-07-20",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 693502b77..d36454c19 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -6,6 +6,14 @@
<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/>
<description>What's new on three.ws — features, improvements, and releases, newest first.</description>
<language>en</language>
+ <item>
+ <title>Tutorial · 3D AI Shopping Assistant for Shopify</title>
+ <link>https://three.ws/tutorials/shopify-shopping-assistant</link>
+ <guid isPermaLink="false">2026-07-23:Tutorial · 3D AI Shopping Assistant for Shopify</guid>
+ <pubDate>Thu, 23 Jul 2026 12:00:00 GMT</pubDate>
+ <category>launch</category>
+ <description>Add a chat assistant with a 3D face to your Shopify store: it reads your live catalog, recommends real products as cards with add-to-cart, and answers shipping and returns, all from one script tag.</description>
+ </item>
<item>
<title>We Gave 11 AI Agents Their Own Wallets and Real SOL. Here Are All 90 Trades.</title>
<link>https://three.ws/blog/all-90-trades</link>
@@ -46,6 +54,14 @@
<category>improvement</category>
<description>Previewing a prop from the CC0 object library (a wrench, a vase, an ammo box) used to drop you into the embodied-agent surface, complete with an &quot;Ask the agent&quot; box and prompts like &quot;Why are you embodied?&quot; that make no sense for an inanimate object. Objects now open in a dedicated viewer mode: the agent chat and avatar controls are gone, replaced by the things you actually want for a 3D thing — Restyle to recolor or AI-restyle its materials, View in AR to place it in your room, and Download the CC0 GLB. Avatars are untouched and still open with the full agent experience.</description>
</item>
+ <item>
+ <title>The Concierge becomes a Shopify shopping assistant, with product cards</title>
+ <link>https://three.ws/tutorials/shopify-shopping-assistant</link>
+ <guid isPermaLink="false">2026-07-23:The Concierge becomes a Shopify shopping assistant, with product cards</guid>
+ <pubDate>Thu, 23 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>The embeddable AI concierge (the floating chat with a 3D avatar) now turns into a full shopping assistant on any Shopify store, from the same one script tag. It reads your live catalog and policies straight from Shopify's public endpoints, no app, no API key, and no product feed to keep in sync, then helps shoppers find the right thing and shows real product cards with the live image, price, and an add-to-cart button. It understands how people actually shop (&quot;a gift under $75&quot;, &quot;cheapest hoodie&quot;, &quot;anything on sale?&quot;) and answers shipping and returns from your published policies. Because the cards are drawn from your real catalog, it can never invent a product, a price, or a discount.</description>
+ </item>
<item>
<title>The sniper learns from its own postmortem: conviction-crossing entries and smarter trailing stops</title>
<link>https://three.ws/blog/all-90-trades</link>
@@ -342,6 +358,14 @@
<category>launch</category>
<description>An agent's every consequential decision (what it decided, why, what it predicted, and what actually happened) in a tamper-evident, on-chain-anchored, independently verifiable ledger. Open any agent's at /ledger/&lt;agentId&gt;. Being wrong is visible; honesty is the trust signal.</description>
</item>
+ <item>
+ <title>Sign Language Avatars</title>
+ <link>https://three.ws/sign-language</link>
+ <guid isPermaLink="false">2026-07-20:Sign Language Avatars</guid>
+ <pubDate>Mon, 20 Jul 2026 12:00:00 GMT</pubDate>
+ <category>launch</category>
+ <description>three.ws avatars sign in American Sign Language: fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D.</description>
+ </item>
<item>
<title>Audit any agent's trade decisions, linked from the write-ups</title>
<link>https://three.ws/ledger/4c0e4d18-0544-4c95-a0db-a16896b029be</link>
@@ -422,6 +446,14 @@
<category>improvement</category>
<description>three.ws had six legal documents and no index, so /legal itself went nowhere. It is now a real page: every policy listed with a plain-language summary and its effective date, plus which address actually reaches the right desk (copyright, abuse, privacy, general, support). Publishers who think we are showing too much of their work get a direct answer and a direct address instead of a search.</description>
</item>
+ <item>
+ <title>Sign Language gets its own home</title>
+ <link>https://three.ws/sign-language</link>
+ <guid isPermaLink="false">2026-07-20:Sign Language gets its own home</guid>
+ <pubDate>Mon, 20 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>There is now a dedicated Sign Language page at three.ws/sign-language: a live avatar signing on arrival, an input that fingerspells anything you type (words and numbers), the three ways avatars use ASL explained, and a webcam demo that reads your own fingerspelling. Find it in the Build menu under 3D and avatars, or the new card on the home page.</description>
+ </item>
<item>
<title>Sign to the chat with your camera</title>
<link>https://three.ws/docs/sign-language</link>
diff --git a/public/concierge/concierge.global.js b/public/concierge/concierge.global.js
index b6ec05315..70bd4708a 100644
--- a/public/concierge/concierge.global.js
+++ b/public/concierge/concierge.global.js
@@ -1,11 +1,11 @@
/* @three-ws/concierge, https://three.ws/concierge */
-var ff=Object.defineProperty;var pf=(s,e,t)=>()=>{if(t)throw t[0];try{return s&&(e=s(s=0)),e}catch(n){throw t=[n],n}};var Lh=(s,e)=>{for(var t in e)ff(s,t,{get:e[t],enumerable:!0})};var Hd={};Lh(Hd,{MeshoptDecoder:()=>_x});var _x,Wd=pf(()=>{_x=(function(){var s="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuixkbeeeddddillviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WboY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbrl79IV9Rbwq:VZkdbk:XYi5ud9:du8Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxcj;abad9Uc;WFbGcjdadca0EhmaialfgPar9Rgoadfhsavaoadz:jjjjbgzceVhHcbhOdndninaeaO9nmeaPax9RaD6mdamaeaO9RaOamfgoae6EgAcsfglc9WGhCabaOad2fhXaAcethQaxaDfhiaOaeaoaeao6E9RhLalcl4cifcd4hKazcj;cbfaAfhYcbh8AazcjdfhEaHh3incbh5dnawTmbaxa8Acd4fRbbh5kcbh8Eazcj;cbfhqinaih8Fdndndndna5a8Ecet4ciGgoc9:fPdebdkaPa8F9RaA6mrazcj;cbfa8EaA2fa8FaAz:jjjjb8Aa8FaAfhixdkazcj;cbfa8EaA2fcbaAz:kjjjb8Aa8FhixekaPa8F9RaK6mva8FaKfhidnaCTmbaPai9RcK6mbaocdtc:q:G:cjbfcj:G:cjbawEhaczhrcbhlinargoc9Wfghaqfhrdndndndndndnaaa8Fahco4fRbbalcoG4ciGcdtfydbPDbedvivvvlvkar9cb83bwar9cb83bbxlkarcbaiRbdai8Xbb9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbaqaofgrcGfcbaicdfa8J9c8N1:NfghRbbag9cjjjjjw:dg8J9qE86bbarcVfcbaha8J9c8M1:NfghRbbag9cjjjjjl:dg8J9qE86bbarc7fcbaha8J9c8L1:NfghRbbag9cjjjjjd:dg8J9qE86bbarctfcbaha8J9c8K1:NfghRbbag9cjjjjje:dg8J9qE86bbarc91fcbaha8J9c8J1:NfghRbbag9cjjjj;ab:dg8J9qE86bbarc4fcbaha8J9cg1:NfghRbbag9cjjjja:dg8J9qE86bbarc93fcbaha8J9ch1:NfghRbbag9cjjjjz:dgg9qE86bbarc94fcbahag9ca1:NfghRbbai8Xbe9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbarc95fcbaha8J9c8N1:NfgiRbbag9cjjjjjw:dg8J9qE86bbarc96fcbaia8J9c8M1:NfgiRbbag9cjjjjjl:dg8J9qE86bbarc97fcbaia8J9c8L1:NfgiRbbag9cjjjjjd:dg8J9qE86bbarc98fcbaia8J9c8K1:NfgiRbbag9cjjjjje:dg8J9qE86bbarc99fcbaia8J9c8J1:NfgiRbbag9cjjjj;ab:dg8J9qE86bbarc9:fcbaia8J9cg1:NfgiRbbag9cjjjja:dg8J9qE86bbarcufcbaia8J9ch1:NfgiRbbag9cjjjjz:dgg9qE86bbaiag9ca1:NfhixikaraiRblaiRbbghco4g8Ka8KciSg8KE86bbaqaofgrcGfaiclfa8Kfg8KRbbahcl4ciGg8La8LciSg8LE86bbarcVfa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc7fa8Ka8Lfg8KRbbahciGghahciSghE86bbarctfa8Kahfg8KRbbaiRbeghco4g8La8LciSg8LE86bbarc91fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc4fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc93fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc94fa8Kahfg8KRbbaiRbdghco4g8La8LciSg8LE86bbarc95fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc96fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc97fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc98fa8KahfghRbbaiRbigico4g8Ka8KciSg8KE86bbarc99faha8KfghRbbaicl4ciGg8Ka8KciSg8KE86bbarc9:faha8KfghRbbaicd4ciGg8Ka8KciSg8KE86bbarcufaha8KfgrRbbaiciGgiaiciSgiE86bbaraifhixdkaraiRbwaiRbbghcl4g8Ka8KcsSg8KE86bbaqaofgrcGfaicwfa8Kfg8KRbbahcsGghahcsSghE86bbarcVfa8KahfghRbbaiRbeg8Kcl4g8La8LcsSg8LE86bbarc7faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarctfaha8KfghRbbaiRbdg8Kcl4g8La8LcsSg8LE86bbarc91faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc4faha8KfghRbbaiRbig8Kcl4g8La8LcsSg8LE86bbarc93faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc94faha8KfghRbbaiRblg8Kcl4g8La8LcsSg8LE86bbarc95faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc96faha8KfghRbbaiRbvg8Kcl4g8La8LcsSg8LE86bbarc97faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc98faha8KfghRbbaiRbog8Kcl4g8La8LcsSg8LE86bbarc99faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc9:faha8KfghRbbaiRbrgicl4g8Ka8KcsSg8KE86bbarcufaha8KfgrRbbaicsGgiaicsSgiE86bbaraifhixekarai8Pbw83bwarai8Pbb83bbaiczfhikdnaoaC9pmbalcdfhlaoczfhraPai9RcL0mekkaoaC6moaimexokaCmva8FTmvkaqaAfhqa8Ecefg8Ecl9hmbkdndndndnawTmbasa8Acd4fRbbgociGPlbedrbkaATmdaza8Afh8Fazcj;cbfhhcbh8EaEhaina8FRbbhraahocbhlinaoahalfRbbgqce4cbaqceG9R7arfgr86bbaoadfhoaAalcefgl9hmbkaacefhaa8Fcefh8FahaAfhha8Ecefg8Ecl9hmbxikkaATmeaza8Afhaazcj;cbfhhcbhoceh8EaYh8FinaEaofhlaa8Vbbhrcbhoinala8FaofRbbcwtahaofRbbgqVc;:FiGce4cbaqceG9R7arfgr87bbaladfhlaLaocefgofmbka8FaQfh8FcdhoaacdfhaahaQfhha8EceGhlcbh8EalmbxdkkaATmbaocl4h8Eaza8AfRbbhqcwhoa3hlinalRbbaotaqVhqalcefhlaocwfgoca9hmbkcbhhaEh8FaYhainazcj;cbfahfRbbhrcwhoaahlinalRbbaotarVhralaAfhlaocwfgoca9hmbkara8E94aq7hqcbhoa8Fhlinalaqao486bbalcefhlaocwfgoca9hmbka8Fadfh8FaacefhaahcefghaA9hmbkkaEclfhEa3clfh3a8Aclfg8Aad6mbkaXazcjdfaAad2z:jjjjb8AazazcjdfaAcufad2fadz:jjjjb8AaAaOfhOaihxaimbkc9:hoxdkcbc99aPax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaok:ysezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:kjjjb8Aav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk:4ioiue99dud99dud99dnaeTmbcbhiabhlindndnal8Uebgv:YgoJ:ji:1Salcof8UebgrciVgw:Y:vgDNJbbbZJbbb:;avcu9kEMgq:lJbbb9p9DTmbaq:Ohkxekcjjjj94hkkalclf8Uebhvalcdf8UebhxalarcefciGcetfak87ebdndnax:YgqaDNJbbbZJbbb:;axcu9kEMgm:lJbbb9p9DTmbam:Ohxxekcjjjj94hxkabaiarciGgkfcd7cetfax87ebdndnav:YgmaDNJbbbZJbbb:;avcu9kEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkalarcufciGcetfav87ebdndnawaw2:ZgPaPMaoaoN:taqaqN:tamamN:tgoJbbbbaoJbbbb9GE:raDNJbbbZMgD:lJbbb9p9DTmbaD:Ohrxekcjjjj94hrkalakcetfar87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk:Tvirud99eudndnadcl9hmbaeTmeindndnabRbbgiabcefgl8Sbbgvabcdfgo8Sbbgrf9R:YJbbuJabcifgwRbbgdce4adVgDcd4aDVgDcl4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax86bbdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao86bbdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai86bbdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad86bbabclfhbaecufgembxdkkaeTmbindndnab8Vebgiabcdfgl8Uebgvabclfgo8Uebgrf9R:YJbFu9habcofgw8Vebgdce4adVgDcd4aDVgDcl4aDVgDcw4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax87ebdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao87ebdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai87ebdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad87ebabcwfhbaecufgembkkk9teiucbcbyd:K:G:cjbgeabcifc98GfgbBd:K:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkk83dbcj:Gdk8Kbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbc:K:Gdkl8W:qbb",e="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuixkbbebeeddddilve9Weeeviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WbwY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbDl79IV9Rbqq:W9Dklbzik94evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaeai86b:q:W:cjbaecitab8Piw83i:q:G:cjbaecefgecjd9hmbkk:JBl8Aud97dur978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaialfgxar9RhodnadTgmmbavaoad;8qbbkaicefhPcj;abad9Uc;WFbGcjdadca0EhsdndndnadTmbaoadfhzcbhHinaeaH9nmdaxaP9RaD6miabaHad2fhOaPaDfhAasaeaH9RaHasfae6EgCcsfgocl4cifcd4hXavcj;cbfaoc9WGgQcetfhLavcj;cbfaQci2fhKavcj;cbfaQfhYcbh8Aaoc;ab6hEincbh3dnawTmbaPa8Acd4fRbbh3kcbh5avcj;cbfh8Eindndndndna3a5cet4ciGgoc9:fPdebdkaxaA9RaQ6mwdnaQTmbavcj;cbfa5aQ2faAaQ;8qbbkaAaCfhAxdkaQTmeavcj;cbfa5aQ2fcbaQ;8kbxekaxaA9RaX6moaoclVcbawEhraAaXfhocbhidnaEmbaxao9Rc;Gb6mbcbhlina8EalfhidndndndndndnaAalco4fRbbgqciGarfPDbedibledibkaipxbbbbbbbbbbbbbbbbpklbxlkaiaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiaopbbbpklbaoczfhoxekaiaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcd4ciGarfPDbedibledibkaiczfpxbbbbbbbbbbbbbbbbpklbxlkaiczfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiczfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiczfaopbbbpklbaoczfhoxekaiczfaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcl4ciGarfPDbedibledibkaicafpxbbbbbbbbbbbbbbbbpklbxlkaicafaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaicafaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaicafaopbbbpklbaoczfhoxekaicafaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqco4arfPDbedibledibkaic8Wfpxbbbbbbbbbbbbbbbbpklbxlkaic8Wfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaoclffaqRb:q:W:cjbfhoxikaic8Wfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaocwffaqRb:q:W:cjbfhoxdkaic8Wfaopbbbpklbaoczfhoxekaic8WfaopbbdaoRbbgicitpbi:q:G:cjbaiRb:q:W:cjbgipsaoRbegqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbaiaocdffaqRb:q:W:cjbfhokalc;abfhialcjefaQ0meaihlaxao9Rc;Fb0mbkkdnaiaQ9pmbaici4hlinaxao9RcK6mwa8EaifhqdndndndndndnaAaico4fRbbalcoG4ciGarfPDbedibledibkaqpxbbbbbbbbbbbbbbbbpkbbxlkaqaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaoclffagRb:q:W:cjbfhoxikaqaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaocwffagRb:q:W:cjbfhoxdkaqaopbbbpkbbaoczfhoxekaqaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpkbbahaocdffagRb:q:W:cjbfhokalcdfhlaiczfgiaQ6mbkkaohAaoTmoka8EaQfh8Ea5cefg5cl9hmbkdndndndnawTmbaza8Acd4fRbbglciGPlbedwbkaQTmdavcjdfa8Afhlava8Afpbdbh8Jcbhoinalavcj;cbfaofpblbg8KaYaofpblbg8LpmbzeHdOiAlCvXoQrLg8MaLaofpblbg8NaKaofpblbgypmbzeHdOiAlCvXoQrLg8PpmbezHdiOAlvCXorQLg8Fcep9Ta8Fpxeeeeeeeeeeeeeeeegap9op9Hp9rg8Fa8Jp9Ug8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9Abbbaladfgla8Ja8Ma8PpmwDKYqk8AExm35Ps8E8Fg8Fcep9Ta8Faap9op9Hp9rg8Fp9Ug8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9Abbbaladfgla8Ja8Ka8LpmwKDYq8AkEx3m5P8Es8Fg8Ka8NaypmwKDYq8AkEx3m5P8Es8Fg8LpmbezHdiOAlvCXorQLg8Fcep9Ta8Faap9op9Hp9rg8Fp9Ug8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9Abbbaladfgla8Ja8Ka8LpmwDKYqk8AExm35Ps8E8Fg8Fcep9Ta8Faap9op9Hp9rg8Fp9Ugap9Abbbaladfglaaa8Fa8Fpmlvorlvorlvorlvorp9Ugap9Abbbaladfglaaa8Fa8FpmwDqkwDqkwDqkwDqkp9Ugap9Abbbaladfglaaa8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9AbbbaladfhlaoczfgoaQ6mbxikkaQTmeavcjdfa8Afhlava8Afpbdbh8Jcbhoinalavcj;cbfaofpblbg8KaYaofpblbg8LpmbzeHdOiAlCvXoQrLg8MaLaofpblbg8NaKaofpblbgypmbzeHdOiAlCvXoQrLg8PpmbezHdiOAlvCXorQLg8Fcep:nea8Fpxebebebebebebebebgap9op:bep9rg8Fa8Jp:oeg8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9Abbbaladfgla8Ja8Ma8PpmwDKYqk8AExm35Ps8E8Fg8Fcep:nea8Faap9op:bep9rg8Fp:oeg8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9Abbbaladfgla8Ja8Ka8LpmwKDYq8AkEx3m5P8Es8Fg8Ka8NaypmwKDYq8AkEx3m5P8Es8Fg8LpmbezHdiOAlvCXorQLg8Fcep:nea8Faap9op:bep9rg8Fp:oeg8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9Abbbaladfgla8Ja8Ka8LpmwDKYqk8AExm35Ps8E8Fg8Fcep:nea8Faap9op:bep9rg8Fp:oegap9Abbbaladfglaaa8Fa8Fpmlvorlvorlvorlvorp:oegap9Abbbaladfglaaa8Fa8FpmwDqkwDqkwDqkwDqkp:oegap9Abbbaladfglaaa8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9AbbbaladfhlaoczfgoaQ6mbxdkkaQTmbcbhocbalcl4gl9Rc8FGhiavcjdfa8Afhrava8Afpbdbhainaravcj;cbfaofpblbg8JaYaofpblbg8KpmbzeHdOiAlCvXoQrLg8LaLaofpblbg8MaKaofpblbg8NpmbzeHdOiAlCvXoQrLgypmbezHdiOAlvCXorQLg8Faip:Rea8Falp:Tep9qg8Faap9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8LaypmwDKYqk8AExm35Ps8E8Fg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8Ja8KpmwKDYq8AkEx3m5P8Es8Fg8Ja8Ma8NpmwKDYq8AkEx3m5P8Es8Fg8KpmbezHdiOAlvCXorQLg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8Ja8KpmwDKYqk8AExm35Ps8E8Fg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9AbbbaradfhraoczfgoaQ6mbkka8Aclfg8Aad6mbkdnaCad2goTmbaOavcjdfao;8qbbkdnammbavavcjdfaCcufad2fad;8qbbkaCaHfhHc9:hoaAhPaAmbxlkkaeTmbaDalfhrcbhocuhlinaralaD9RglfaD6mdasaeao9Raoasfae6Eaofgoae6mbkaial9RhPkcbc99axaP9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaokwbz:bjjjbkNsezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk;Toio97eue97aec98Ghedndnadcl9hmbaeTmecbhdinababpbbbgicKp:RecKp:Sep;6eglaicwp:RecKp:Sep;6ealp;Geaiczp:RecKp:Sep;6egvp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgwp9op9rp;Keglpxbb;:9cbb;:9cbb;:9cbb;:9calalp;Meaoaop;Meavaravawp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFbbbFbbbFbbbFbbbp9oaipxbbbFbbbFbbbFbbbFp9op9qalavp;Mearp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaoavp;Mearp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgDaDpbbbgipxbbbbbbFFbbbbbbFFgwp9oabpbbbgoaipmbediwDqkzHOAKY8AEgvczp:Reczp:Sep;6eglaoaipmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eavczp:Sep;6egvp;Gealp;Gep;Kep;Legipxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgqp9op9rp;Keglpxb;:FSb;:FSb;:FSb;:FSalalp;Meaiaip;Meavaravaqp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbp9oaiavp;Mearp;Keczp:Rep9qgialavp;Mearp;KepxFFbbFFbbFFbbFFbbp9oglpmwDKYqk8AExm35Ps8E8Fp9qpkbbabaoawp9oaialpmbezHdiOAlvCXorQLp9qpkbbabcafhbadclfgdae6mbkkk;2ileue97euo97dnaec98GgiTmbcbheinabcKfpx:ji:1S:ji:1S:ji:1S:ji:1SabpbbbglabczfgvpbbbgopmlvorxmPsCXQL358E8Fgrczp:Segwpxibbbibbbibbbibbbp9qp;6egDp;NegqaDaDp;MegDaDp;KealaopmbediwDqkzHOAKY8AEgDczp:Reczp:Sep;6eglalp;MeaDczp:Sep;6egoaop;Mearczp:Reczp:Sep;6egrarp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gDp;KepxFFbbFFbbFFbbFFbbgkp9oaqaop;MeaDp;Keczp:Rep9qgoaqalp;MeaDp;Keakp9oaqarp;MeaDp;Keczp:Rep9qgDpmwDKYqk8AExm35Ps8E8Fglp5eawclp:RegqpEi:T:j83ibavalp5baqpEd:T:j83ibabcwfaoaDpmbezHdiOAlvCXorQLgDp5eaqpEe:T:j83ibabaDp5baqpEb:T:j83ibabcafhbaeclfgeai6mbkkkuee97dnadcd4ae2c98GgeTmbcbhdinababpbbbgicwp:Recwp:Sep;6eaicep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbabczfhbadclfgdae6mbkkk:Sodw97euaec98Ghedndnadcl9hmbaeTmecbhdinabpxbbuJbbuJbbuJbbuJabpbbbgicKp:TeglaicYp:Tep9qgvcdp:Teavp9qgvclp:Teavp9qgop;6ep;Negvaicwp:RecKp:SegraipxFbbbFbbbFbbbFbbbgwp9ogDp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oavaDarp:Xeaiczp:RecKp:Segip:Uep;6ep;Meaqp;Keawp9op9qavaDaraip:Uep:Xep;6ep;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qavaoalcep:Rep9oalpxebbbebbbebbbebbbp9op9qp;6ep;Meaqp;KecKp:Rep9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgkpxbFu9hbFu9hbFu9hbFu9habpbbbglakpbbbgrpmlvorxmPsCXQL358E8Fgvczp:TegqavcHp:Tep9qgicdp:Teaip9qgiclp:Teaip9qgicwp:Teaip9qgop;6ep;NegialarpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbglp9ograDczp:Segwp:Ueavczp:Reczp:SegDp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gvp;Kealp9oaiarawaDp:Uep:Xep;6ep;Meavp;Keczp:Rep9qgwaiaoaqcep:Rep9oaqpxebbbebbbebbbebbbp9op9qp;6ep;Meavp;Keczp:ReaiaDarp:Uep;6ep;Meavp;Kealp9op9qgipmwDKYqk8AExm35Ps8E8FpkbbabawaipmbezHdiOAlvCXorQLpkbbabcafhbadclfgdae6mbkkk9teiucbcbydj:G:cjbgeabcifc98GfgbBdj:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkxebcj:Gdklz:zbb",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var i=WebAssembly.validate(t)?o(e):o(s),r,a=WebAssembly.instantiate(i,{}).then(function(p){r=p.instance,r.exports.__wasm_call_ctors()});function o(p){for(var v=new Uint8Array(p.length),S=0;S<p.length;++S){var M=p.charCodeAt(S);v[S]=M>96?M-97:M>64?M-39:M+4}for(var E=0,S=0;S<p.length;++S)v[E++]=v[S]<60?n[v[S]]:(v[S]-60)*64+v[++S];return v.buffer.slice(0,E)}function c(p,v,S,M,E,T,C){var x=p.exports.sbrk,w=M+3&-4,L=x(w*E),R=x(T.length),O=new Uint8Array(p.exports.memory.buffer);O.set(T,R);var H=v(L,M,E,R,T.length);if(H==0&&C&&C(L,w,E),S.set(O.subarray(L,L+M*E)),x(L-x(0)),H!=0)throw new Error("Malformed buffer data: "+H)}var l={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp",COLOR:"meshopt_decodeFilterColor"},h={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},u=[],d=0;function f(p){var v={object:new Worker(p),pending:0,requests:{}};return v.object.onmessage=function(S){var M=S.data;v.pending-=M.count,v.requests[M.id][M.action](M.value),delete v.requests[M.id]},v}function g(p){for(var v="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(i)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+m.name+";"+c.toString()+m.toString(),S=new Blob([v],{type:"text/javascript"}),M=URL.createObjectURL(S),E=u.length;E<p;++E)u[E]=f(M);for(var E=p;E<u.length;++E)u[E].object.postMessage({});u.length=p,URL.revokeObjectURL(M)}function _(p,v,S,M,E){for(var T=u[0],C=1;C<u.length;++C)u[C].pending<T.pending&&(T=u[C]);return new Promise(function(x,w){var L=new Uint8Array(S),R=++d;T.pending+=p,T.requests[R]={resolve:x,reject:w},T.object.postMessage({id:R,count:p,size:v,source:L,mode:M,filter:E},[L.buffer])})}function m(p){var v=p.data;self.ready.then(function(S){if(!v.id)return self.close();try{var M=new Uint8Array(v.count*v.size);c(S,S.exports[v.mode],M,v.count,v.size,v.source,S.exports[v.filter]),self.postMessage({id:v.id,count:v.count,action:"resolve",value:M},[M.buffer])}catch(E){self.postMessage({id:v.id,count:v.count,action:"reject",value:E})}})}return{ready:a,supported:!0,useWorkers:function(p){g(p)},decodeVertexBuffer:function(p,v,S,M,E){c(r,r.exports.meshopt_decodeVertexBuffer,p,v,S,M,r.exports[l[E]])},decodeIndexBuffer:function(p,v,S,M){c(r,r.exports.meshopt_decodeIndexBuffer,p,v,S,M)},decodeIndexSequence:function(p,v,S,M){c(r,r.exports.meshopt_decodeIndexSequence,p,v,S,M)},decodeGltfBuffer:function(p,v,S,M,E,T){c(r,r.exports[h[E]],p,v,S,M,r.exports[l[T]])},decodeGltfBufferAsync:function(p,v,S,M,E){return u.length>0?_(p,v,S,h[M],l[E]):a.then(function(){var T=new Uint8Array(p*v);return c(r,r.exports[h[M]],T,p,v,S,r.exports[l[E]]),T})}}})()});var Sh={};Lh(Sh,{AVATARS:()=>qi,AvatarStage:()=>Ns,CSS:()=>yh,Concierge:()=>an,DEFAULT_ASSET_BASE:()=>zr,DEFAULT_AVATAR_ID:()=>ks,DEFAULT_ENDPOINT:()=>Hr,MAX_CONTENT_CHARS:()=>Kd,MAX_HISTORY_TURNS:()=>sc,MAX_KNOWLEDGE_CHARS:()=>Jd,SpeechNarrator:()=>Os,ThreeConciergeElement:()=>qr,VERSION:()=>Ex,askConcierge:()=>rc,avatarUrl:()=>Vr,buildMorphMap:()=>ec,buildSitePayload:()=>ic,createLipsync:()=>tc,createMic:()=>oc,createSseBuffer:()=>_h,customAvatarEntry:()=>nc,default:()=>Cx,drainSentences:()=>Mh,ensureStyles:()=>cc,escapeHtml:()=>Xi,estimateDurationMs:()=>Br,getAvatar:()=>Gr,harvestSiteContext:()=>bh,micSupported:()=>ac,mount:()=>Rx,parseSseEvent:()=>xh,registerElement:()=>dc,renderMarkdown:()=>Bs,stripMarkdown:()=>Wr});var mu=0,Zc=1,gu=2;var Mr=1,bu=2,As=3,pn=0,Pt=1,sn=2,Dn=0,Ri=1,$c=2,Qc=3,el=4,xu=5;var ci=100,_u=101,vu=102,yu=103,Mu=104,Su=200,Au=201,Tu=202,wu=203,ya=204,Ma=205,Eu=206,Ru=207,Cu=208,Pu=209,Iu=210,Lu=211,Du=212,Fu=213,Nu=214,Sa=0,Aa=1,Ta=2,Ci=3,wa=4,Ea=5,Ra=6,Ca=7,$a=0,Uu=1,Ou=2,bn=0,tl=1,nl=2,il=3,Sr=4,sl=5,rl=6,al=7,Gc="attached",ku="detached",ol=300,pi=301,zi=302,Qa=303,eo=304,Ar=306,li=1e3,nn=1001,hs=1002,xt=1003,to=1004;var Gi=1005;var _t=1006,Ts=1007;var xn=1008;var qt=1009,cl=1010,ll=1011,ws=1012,no=1013,_n=1014,$t=1015,Fn=1016,io=1017,so=1018,Es=1020,hl=35902,ul=35899,dl=1021,fl=1022,Qt=1023,Tn=1026,mi=1027,ro=1028,ao=1029,gi=1030,oo=1031;var co=1033,Tr=33776,wr=33777,Er=33778,Rr=33779,lo=35840,ho=35841,uo=35842,fo=35843,po=36196,mo=37492,go=37496,bo=37488,xo=37489,Cr=37490,_o=37491,vo=37808,yo=37809,Mo=37810,So=37811,Ao=37812,To=37813,wo=37814,Eo=37815,Ro=37816,Co=37817,Po=37818,Io=37819,Lo=37820,Do=37821,Fo=36492,No=36494,Uo=36495,Oo=36283,ko=36284,Pr=36285,Bo=36286,Bu=2200,Ir=2201,zu=2202,Pi=2300,Ii=2301,va=2302,Vc=2303,wi=2400,Ei=2401,Ys=2402,zo=2500,Gu=2501,pl=0,Lr=1,Rs=2,Vu=3200;var Dr=0,Hu=1,Zn="",bt="srgb",kt="srgb-linear",Zs="linear",Je="srgb";var Ti=7680;var Hc=519,Wu=512,qu=513,Xu=514,Go=515,ju=516,Ku=517,Vo=518,Ju=519,Pa=35044;var ml="300 es",un=2e3,us=2001;function mf(s){for(let e=s.length-1;e>=0;--e)if(s[e]>=65535)return!0;return!1}function gf(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function ds(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function Yu(){let s=ds("canvas");return s.style.display="block",s}var Dh={},fs=null;function $s(...s){let e="THREE."+s.shift();fs?fs("log",e,...s):console.log(e,...s)}function Zu(s){let e=s[0];if(typeof e=="string"&&e.startsWith("TSL:")){let t=s[1];t&&t.isStackTrace?s[0]+=" "+t.getLocation():s[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return s}function _e(...s){s=Zu(s);let e="THREE."+s.shift();if(fs)fs("warn",e,...s);else{let t=s[0];t&&t.isStackTrace?console.warn(t.getError(e)):console.warn(e,...s)}}function we(...s){s=Zu(s);let e="THREE."+s.shift();if(fs)fs("error",e,...s);else{let t=s[0];t&&t.isStackTrace?console.error(t.getError(e)):console.error(e,...s)}}function Ia(...s){let e=s.join(" ");e in Dh||(Dh[e]=!0,_e(...s))}function $u(s,e,t){return new Promise(function(n,i){function r(){switch(s.clientWaitSync(e,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:i();break;case s.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:n()}}setTimeout(r,t)})}var Qu={[Sa]:Aa,[Ta]:Ra,[wa]:Ca,[Ci]:Ea,[Aa]:Sa,[Ra]:Ta,[Ca]:wa,[Ea]:Ci},mn=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let i=n[e];if(i!==void 0){let r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let i=n.slice(0);for(let r=0,a=i.length;r<a;r++)i[r].call(this,e);e.target=null}}},Lt=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],Fh=1234567,Ks=Math.PI/180,Li=180/Math.PI;function fn(){let s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Lt[s&255]+Lt[s>>8&255]+Lt[s>>16&255]+Lt[s>>24&255]+"-"+Lt[e&255]+Lt[e>>8&255]+"-"+Lt[e>>16&15|64]+Lt[e>>24&255]+"-"+Lt[t&63|128]+Lt[t>>8&255]+"-"+Lt[t>>16&255]+Lt[t>>24&255]+Lt[n&255]+Lt[n>>8&255]+Lt[n>>16&255]+Lt[n>>24&255]).toLowerCase()}function Ve(s,e,t){return Math.max(e,Math.min(t,s))}function gl(s,e){return(s%e+e)%e}function bf(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function xf(s,e,t){return s!==e?(t-s)/(e-s):0}function Js(s,e,t){return(1-t)*s+t*e}function _f(s,e,t,n){return Js(s,e,1-Math.exp(-t*n))}function vf(s,e=1){return e-Math.abs(gl(s,e*2)-e)}function yf(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function Mf(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function Sf(s,e){return s+Math.floor(Math.random()*(e-s+1))}function Af(s,e){return s+Math.random()*(e-s)}function Tf(s){return s*(.5-Math.random())}function wf(s){s!==void 0&&(Fh=s);let e=Fh+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Ef(s){return s*Ks}function Rf(s){return s*Li}function Cf(s){return(s&s-1)===0&&s!==0}function Pf(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function If(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function Lf(s,e,t,n,i){let r=Math.cos,a=Math.sin,o=r(t/2),c=a(t/2),l=r((e+n)/2),h=a((e+n)/2),u=r((e-n)/2),d=a((e-n)/2),f=r((n-e)/2),g=a((n-e)/2);switch(i){case"XYX":s.set(o*h,c*u,c*d,o*l);break;case"YZY":s.set(c*d,o*h,c*u,o*l);break;case"ZXZ":s.set(c*u,c*d,o*h,o*l);break;case"XZX":s.set(o*h,c*g,c*f,o*l);break;case"YXY":s.set(c*f,o*h,c*g,o*l);break;case"ZYZ":s.set(c*g,c*f,o*h,o*l);break;default:_e("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function hn(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function Ye(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}var Fr={DEG2RAD:Ks,RAD2DEG:Li,generateUUID:fn,clamp:Ve,euclideanModulo:gl,mapLinear:bf,inverseLerp:xf,lerp:Js,damp:_f,pingpong:vf,smoothstep:yf,smootherstep:Mf,randInt:Sf,randFloat:Af,randFloatSpread:Tf,seededRandom:wf,degToRad:Ef,radToDeg:Rf,isPowerOfTwo:Cf,ceilPowerOfTwo:Pf,floorPowerOfTwo:If,setQuaternionFromProperEuler:Lf,normalize:Ye,denormalize:hn},yl=class yl{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Ve(this.x,e.x,t.x),this.y=Ve(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ve(this.x,e,t),this.y=Ve(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ve(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ve(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*n-a*i+e.x,this.y=r*i+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};yl.prototype.isVector2=!0;var He=yl,Ft=class{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,a,o){let c=n[i+0],l=n[i+1],h=n[i+2],u=n[i+3],d=r[a+0],f=r[a+1],g=r[a+2],_=r[a+3];if(u!==_||c!==d||l!==f||h!==g){let m=c*d+l*f+h*g+u*_;m<0&&(d=-d,f=-f,g=-g,_=-_,m=-m);let p=1-o;if(m<.9995){let v=Math.acos(m),S=Math.sin(v);p=Math.sin(p*v)/S,o=Math.sin(o*v)/S,c=c*p+d*o,l=l*p+f*o,h=h*p+g*o,u=u*p+_*o}else{c=c*p+d*o,l=l*p+f*o,h=h*p+g*o,u=u*p+_*o;let v=1/Math.sqrt(c*c+l*l+h*h+u*u);c*=v,l*=v,h*=v,u*=v}}e[t]=c,e[t+1]=l,e[t+2]=h,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,i,r,a){let o=n[i],c=n[i+1],l=n[i+2],h=n[i+3],u=r[a],d=r[a+1],f=r[a+2],g=r[a+3];return e[t]=o*g+h*u+c*f-l*d,e[t+1]=c*g+h*d+l*u-o*f,e[t+2]=l*g+h*f+o*d-c*u,e[t+3]=h*g-o*u-c*d-l*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,i=e._y,r=e._z,a=e._order,o=Math.cos,c=Math.sin,l=o(n/2),h=o(i/2),u=o(r/2),d=c(n/2),f=c(i/2),g=c(r/2);switch(a){case"XYZ":this._x=d*h*u+l*f*g,this._y=l*f*u-d*h*g,this._z=l*h*g+d*f*u,this._w=l*h*u-d*f*g;break;case"YXZ":this._x=d*h*u+l*f*g,this._y=l*f*u-d*h*g,this._z=l*h*g-d*f*u,this._w=l*h*u+d*f*g;break;case"ZXY":this._x=d*h*u-l*f*g,this._y=l*f*u+d*h*g,this._z=l*h*g+d*f*u,this._w=l*h*u-d*f*g;break;case"ZYX":this._x=d*h*u-l*f*g,this._y=l*f*u+d*h*g,this._z=l*h*g-d*f*u,this._w=l*h*u+d*f*g;break;case"YZX":this._x=d*h*u+l*f*g,this._y=l*f*u+d*h*g,this._z=l*h*g-d*f*u,this._w=l*h*u-d*f*g;break;case"XZY":this._x=d*h*u-l*f*g,this._y=l*f*u-d*h*g,this._z=l*h*g+d*f*u,this._w=l*h*u+d*f*g;break;default:_e("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],i=t[4],r=t[8],a=t[1],o=t[5],c=t[9],l=t[2],h=t[6],u=t[10],d=n+o+u;if(d>0){let f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(h-c)*f,this._y=(r-l)*f,this._z=(a-i)*f}else if(n>o&&n>u){let f=2*Math.sqrt(1+n-o-u);this._w=(h-c)/f,this._x=.25*f,this._y=(i+a)/f,this._z=(r+l)/f}else if(o>u){let f=2*Math.sqrt(1+o-n-u);this._w=(r-l)/f,this._x=(i+a)/f,this._y=.25*f,this._z=(c+h)/f}else{let f=2*Math.sqrt(1+u-n-o);this._w=(a-i)/f,this._x=(r+l)/f,this._y=(c+h)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ve(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,i=e._y,r=e._z,a=e._w,o=t._x,c=t._y,l=t._z,h=t._w;return this._x=n*h+a*o+i*l-r*c,this._y=i*h+a*c+r*o-n*l,this._z=r*h+a*l+n*c-i*o,this._w=a*h-n*o-i*c-r*l,this._onChangeCallback(),this}slerp(e,t){let n=e._x,i=e._y,r=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,i=-i,r=-r,a=-a,o=-o);let c=1-t;if(o<.9995){let l=Math.acos(o),h=Math.sin(l);c=Math.sin(c*l)/h,t=Math.sin(t*l)/h,this._x=this._x*c+n*t,this._y=this._y*c+i*t,this._z=this._z*c+r*t,this._w=this._w*c+a*t,this._onChangeCallback()}else this._x=this._x*c+n*t,this._y=this._y*c+i*t,this._z=this._z*c+r*t,this._w=this._w*c+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Ml=class Ml{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Nh.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Nh.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,r=e.elements,a=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*a,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,i=this.z,r=e.x,a=e.y,o=e.z,c=e.w,l=2*(a*i-o*n),h=2*(o*t-r*i),u=2*(r*n-a*t);return this.x=t+c*l+a*u-o*h,this.y=n+c*h+o*l-r*u,this.z=i+c*u+r*h-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Ve(this.x,e.x,t.x),this.y=Ve(this.y,e.y,t.y),this.z=Ve(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ve(this.x,e,t),this.y=Ve(this.y,e,t),this.z=Ve(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ve(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,i=e.y,r=e.z,a=t.x,o=t.y,c=t.z;return this.x=i*c-r*o,this.y=r*a-n*c,this.z=n*o-i*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return mc.copy(this).projectOnVector(e),this.sub(mc)}reflect(e){return this.sub(mc.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ve(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};Ml.prototype.isVector3=!0;var F=Ml,mc=new F,Nh=new Ft,Sl=class Sl{constructor(e,t,n,i,r,a,o,c,l){this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,a,o,c,l)}set(e,t,n,i,r,a,o,c,l){let h=this.elements;return h[0]=e,h[1]=i,h[2]=o,h[3]=t,h[4]=r,h[5]=c,h[6]=n,h[7]=a,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,r=this.elements,a=n[0],o=n[3],c=n[6],l=n[1],h=n[4],u=n[7],d=n[2],f=n[5],g=n[8],_=i[0],m=i[3],p=i[6],v=i[1],S=i[4],M=i[7],E=i[2],T=i[5],C=i[8];return r[0]=a*_+o*v+c*E,r[3]=a*m+o*S+c*T,r[6]=a*p+o*M+c*C,r[1]=l*_+h*v+u*E,r[4]=l*m+h*S+u*T,r[7]=l*p+h*M+u*C,r[2]=d*_+f*v+g*E,r[5]=d*m+f*S+g*T,r[8]=d*p+f*M+g*C,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],c=e[6],l=e[7],h=e[8];return t*a*h-t*o*l-n*r*h+n*o*c+i*r*l-i*a*c}invert(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],c=e[6],l=e[7],h=e[8],u=h*a-o*l,d=o*c-h*r,f=l*r-a*c,g=t*u+n*d+i*f;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);let _=1/g;return e[0]=u*_,e[1]=(i*l-h*n)*_,e[2]=(o*n-i*a)*_,e[3]=d*_,e[4]=(h*t-i*c)*_,e[5]=(i*r-o*t)*_,e[6]=f*_,e[7]=(n*c-l*t)*_,e[8]=(a*t-n*r)*_,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,a,o){let c=Math.cos(r),l=Math.sin(r);return this.set(n*c,n*l,-n*(c*a+l*o)+a+e,-i*l,i*c,-i*(-l*a+c*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(gc.makeScale(e,t)),this}rotate(e){return this.premultiply(gc.makeRotation(-e)),this}translate(e,t){return this.premultiply(gc.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}};Sl.prototype.isMatrix3=!0;var Pe=Sl,gc=new Pe,Uh=new Pe().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Oh=new Pe().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Df(){let s={enabled:!0,workingColorSpace:kt,spaces:{},convert:function(i,r,a){return this.enabled===!1||r===a||!r||!a||(this.spaces[r].transfer===Je&&(i.r=Xn(i.r),i.g=Xn(i.g),i.b=Xn(i.b)),this.spaces[r].primaries!==this.spaces[a].primaries&&(i.applyMatrix3(this.spaces[r].toXYZ),i.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===Je&&(i.r=ls(i.r),i.g=ls(i.g),i.b=ls(i.b))),i},workingToColorSpace:function(i,r){return this.convert(i,this.workingColorSpace,r)},colorSpaceToWorking:function(i,r){return this.convert(i,r,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Zn?Zs:this.spaces[i].transfer},getToneMappingMode:function(i){return this.spaces[i].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(i,r=this.workingColorSpace){return i.fromArray(this.spaces[r].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,r,a){return i.copy(this.spaces[r].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,r){return Ia("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),s.workingToColorSpace(i,r)},toWorkingColorSpace:function(i,r){return Ia("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),s.colorSpaceToWorking(i,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return s.define({[kt]:{primaries:e,whitePoint:n,transfer:Zs,toXYZ:Uh,fromXYZ:Oh,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:bt},outputColorSpaceConfig:{drawingBufferColorSpace:bt}},[bt]:{primaries:e,whitePoint:n,transfer:Je,toXYZ:Uh,fromXYZ:Oh,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:bt}}}),s}var Be=Df();function Xn(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function ls(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}var Ji,La=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Ji===void 0&&(Ji=ds("canvas")),Ji.width=e.width,Ji.height=e.height;let i=Ji.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=Ji}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=ds("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let a=0;a<r.length;a++)r[a]=Xn(r[a]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Xn(t[n]/255)*255):t[n]=Xn(t[n]);return{data:t,width:e.width,height:e.height}}else return _e("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},Ff=0,ps=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Ff++}),this.uuid=fn(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let a=0,o=i.length;a<o;a++)i[a].isDataTexture?r.push(bc(i[a].image)):r.push(bc(i[a]))}else r=bc(i);n.url=r}return t||(e.images[this.uuid]=n),n}};function bc(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap?La.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(_e("Texture: Unable to serialize Texture."),{})}var Nf=0,xc=new F,Ct=class s extends mn{constructor(e=s.DEFAULT_IMAGE,t=s.DEFAULT_MAPPING,n=nn,i=nn,r=_t,a=xn,o=Qt,c=qt,l=s.DEFAULT_ANISOTROPY,h=Zn){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Nf++}),this.uuid=fn(),this.name="",this.source=new ps(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=a,this.anisotropy=l,this.format=o,this.internalFormat=null,this.type=c,this.offset=new He(0,0),this.repeat=new He(1,1),this.center=new He(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Pe,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(xc).x}get height(){return this.source.getSize(xc).y}get depth(){return this.source.getSize(xc).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(n===void 0){_e(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let i=this[t];if(i===void 0){_e(`Texture.setValues(): property '${t}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==ol)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case li:e.x=e.x-Math.floor(e.x);break;case nn:e.x=e.x<0?0:1;break;case hs:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case li:e.y=e.y-Math.floor(e.y);break;case nn:e.y=e.y<0?0:1;break;case hs:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};Ct.DEFAULT_IMAGE=null;Ct.DEFAULT_MAPPING=ol;Ct.DEFAULT_ANISOTROPY=1;var Al=class Al{constructor(e=0,t=0,n=0,i=1){this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i+a[12]*r,this.y=a[1]*t+a[5]*n+a[9]*i+a[13]*r,this.z=a[2]*t+a[6]*n+a[10]*i+a[14]*r,this.w=a[3]*t+a[7]*n+a[11]*i+a[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r,c=e.elements,l=c[0],h=c[4],u=c[8],d=c[1],f=c[5],g=c[9],_=c[2],m=c[6],p=c[10];if(Math.abs(h-d)<.01&&Math.abs(u-_)<.01&&Math.abs(g-m)<.01){if(Math.abs(h+d)<.1&&Math.abs(u+_)<.1&&Math.abs(g+m)<.1&&Math.abs(l+f+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let S=(l+1)/2,M=(f+1)/2,E=(p+1)/2,T=(h+d)/4,C=(u+_)/4,x=(g+m)/4;return S>M&&S>E?S<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(S),i=T/n,r=C/n):M>E?M<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(M),n=T/i,r=x/i):E<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(E),n=C/r,i=x/r),this.set(n,i,r,t),this}let v=Math.sqrt((m-g)*(m-g)+(u-_)*(u-_)+(d-h)*(d-h));return Math.abs(v)<.001&&(v=1),this.x=(m-g)/v,this.y=(u-_)/v,this.z=(d-h)/v,this.w=Math.acos((l+f+p-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Ve(this.x,e.x,t.x),this.y=Ve(this.y,e.y,t.y),this.z=Ve(this.z,e.z,t.z),this.w=Ve(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ve(this.x,e,t),this.y=Ve(this.y,e,t),this.z=Ve(this.z,e,t),this.w=Ve(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ve(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};Al.prototype.isVector4=!0;var nt=Al,Da=class extends mn{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:_t,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new nt(0,0,e,t),this.scissorTest=!1,this.viewport=new nt(0,0,e,t),this.textures=[];let i={width:e,height:t,depth:n.depth},r=new Ct(i),a=n.count;for(let o=0;o<a;o++)this.textures[o]=r.clone(),this.textures[o].isRenderTargetTexture=!0,this.textures[o].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:_t,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=e,this.textures[i].image.height=t,this.textures[i].image.depth=n,this.textures[i].isData3DTexture!==!0&&(this.textures[i].isArrayTexture=this.textures[i].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let i=Object.assign({},e.textures[t].image);this.textures[t].source=new ps(i)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this}dispose(){this.dispatchEvent({type:"dispose"})}},Yt=class extends Da{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Qs=class extends Ct{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=xt,this.minFilter=xt,this.wrapR=nn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var Fa=class extends Ct{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=xt,this.minFilter=xt,this.wrapR=nn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Za=class Za{constructor(e,t,n,i,r,a,o,c,l,h,u,d,f,g,_,m){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,a,o,c,l,h,u,d,f,g,_,m)}set(e,t,n,i,r,a,o,c,l,h,u,d,f,g,_,m){let p=this.elements;return p[0]=e,p[4]=t,p[8]=n,p[12]=i,p[1]=r,p[5]=a,p[9]=o,p[13]=c,p[2]=l,p[6]=h,p[10]=u,p[14]=d,p[3]=f,p[7]=g,p[11]=_,p[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Za().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,i=1/Yi.setFromMatrixColumn(e,0).length(),r=1/Yi.setFromMatrixColumn(e,1).length(),a=1/Yi.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,i=e.y,r=e.z,a=Math.cos(n),o=Math.sin(n),c=Math.cos(i),l=Math.sin(i),h=Math.cos(r),u=Math.sin(r);if(e.order==="XYZ"){let d=a*h,f=a*u,g=o*h,_=o*u;t[0]=c*h,t[4]=-c*u,t[8]=l,t[1]=f+g*l,t[5]=d-_*l,t[9]=-o*c,t[2]=_-d*l,t[6]=g+f*l,t[10]=a*c}else if(e.order==="YXZ"){let d=c*h,f=c*u,g=l*h,_=l*u;t[0]=d+_*o,t[4]=g*o-f,t[8]=a*l,t[1]=a*u,t[5]=a*h,t[9]=-o,t[2]=f*o-g,t[6]=_+d*o,t[10]=a*c}else if(e.order==="ZXY"){let d=c*h,f=c*u,g=l*h,_=l*u;t[0]=d-_*o,t[4]=-a*u,t[8]=g+f*o,t[1]=f+g*o,t[5]=a*h,t[9]=_-d*o,t[2]=-a*l,t[6]=o,t[10]=a*c}else if(e.order==="ZYX"){let d=a*h,f=a*u,g=o*h,_=o*u;t[0]=c*h,t[4]=g*l-f,t[8]=d*l+_,t[1]=c*u,t[5]=_*l+d,t[9]=f*l-g,t[2]=-l,t[6]=o*c,t[10]=a*c}else if(e.order==="YZX"){let d=a*c,f=a*l,g=o*c,_=o*l;t[0]=c*h,t[4]=_-d*u,t[8]=g*u+f,t[1]=u,t[5]=a*h,t[9]=-o*h,t[2]=-l*h,t[6]=f*u+g,t[10]=d-_*u}else if(e.order==="XZY"){let d=a*c,f=a*l,g=o*c,_=o*l;t[0]=c*h,t[4]=-u,t[8]=l*h,t[1]=d*u+_,t[5]=a*h,t[9]=f*u-g,t[2]=g*u-f,t[6]=o*h,t[10]=_*u+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Uf,e,Of)}lookAt(e,t,n){let i=this.elements;return Kt.subVectors(e,t),Kt.lengthSq()===0&&(Kt.z=1),Kt.normalize(),ti.crossVectors(n,Kt),ti.lengthSq()===0&&(Math.abs(n.z)===1?Kt.x+=1e-4:Kt.z+=1e-4,Kt.normalize(),ti.crossVectors(n,Kt)),ti.normalize(),Kr.crossVectors(Kt,ti),i[0]=ti.x,i[4]=Kr.x,i[8]=Kt.x,i[1]=ti.y,i[5]=Kr.y,i[9]=Kt.y,i[2]=ti.z,i[6]=Kr.z,i[10]=Kt.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,r=this.elements,a=n[0],o=n[4],c=n[8],l=n[12],h=n[1],u=n[5],d=n[9],f=n[13],g=n[2],_=n[6],m=n[10],p=n[14],v=n[3],S=n[7],M=n[11],E=n[15],T=i[0],C=i[4],x=i[8],w=i[12],L=i[1],R=i[5],O=i[9],H=i[13],q=i[2],N=i[6],z=i[10],V=i[14],$=i[3],Q=i[7],le=i[11],xe=i[15];return r[0]=a*T+o*L+c*q+l*$,r[4]=a*C+o*R+c*N+l*Q,r[8]=a*x+o*O+c*z+l*le,r[12]=a*w+o*H+c*V+l*xe,r[1]=h*T+u*L+d*q+f*$,r[5]=h*C+u*R+d*N+f*Q,r[9]=h*x+u*O+d*z+f*le,r[13]=h*w+u*H+d*V+f*xe,r[2]=g*T+_*L+m*q+p*$,r[6]=g*C+_*R+m*N+p*Q,r[10]=g*x+_*O+m*z+p*le,r[14]=g*w+_*H+m*V+p*xe,r[3]=v*T+S*L+M*q+E*$,r[7]=v*C+S*R+M*N+E*Q,r[11]=v*x+S*O+M*z+E*le,r[15]=v*w+S*H+M*V+E*xe,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],a=e[1],o=e[5],c=e[9],l=e[13],h=e[2],u=e[6],d=e[10],f=e[14],g=e[3],_=e[7],m=e[11],p=e[15],v=c*f-l*d,S=o*f-l*u,M=o*d-c*u,E=a*f-l*h,T=a*d-c*h,C=a*u-o*h;return t*(_*v-m*S+p*M)-n*(g*v-m*E+p*T)+i*(g*S-_*E+p*C)-r*(g*M-_*T+m*C)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],c=e[6],l=e[7],h=e[8],u=e[9],d=e[10],f=e[11],g=e[12],_=e[13],m=e[14],p=e[15],v=t*o-n*a,S=t*c-i*a,M=t*l-r*a,E=n*c-i*o,T=n*l-r*o,C=i*l-r*c,x=h*_-u*g,w=h*m-d*g,L=h*p-f*g,R=u*m-d*_,O=u*p-f*_,H=d*p-f*m,q=v*H-S*O+M*R+E*L-T*w+C*x;if(q===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let N=1/q;return e[0]=(o*H-c*O+l*R)*N,e[1]=(i*O-n*H-r*R)*N,e[2]=(_*C-m*T+p*E)*N,e[3]=(d*T-u*C-f*E)*N,e[4]=(c*L-a*H-l*w)*N,e[5]=(t*H-i*L+r*w)*N,e[6]=(m*M-g*C-p*S)*N,e[7]=(h*C-d*M+f*S)*N,e[8]=(a*O-o*L+l*x)*N,e[9]=(n*L-t*O-r*x)*N,e[10]=(g*T-_*M+p*v)*N,e[11]=(u*M-h*T-f*v)*N,e[12]=(o*w-a*R-c*x)*N,e[13]=(t*R-n*w+i*x)*N,e[14]=(_*S-g*E-m*v)*N,e[15]=(h*E-u*S+d*v)*N,this}scale(e){let t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),i=Math.sin(t),r=1-n,a=e.x,o=e.y,c=e.z,l=r*a,h=r*o;return this.set(l*a+n,l*o-i*c,l*c+i*o,0,l*o+i*c,h*o+n,h*c-i*a,0,l*c-i*o,h*c+i*a,r*c*c+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,a){return this.set(1,n,r,0,e,1,a,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){let i=this.elements,r=t._x,a=t._y,o=t._z,c=t._w,l=r+r,h=a+a,u=o+o,d=r*l,f=r*h,g=r*u,_=a*h,m=a*u,p=o*u,v=c*l,S=c*h,M=c*u,E=n.x,T=n.y,C=n.z;return i[0]=(1-(_+p))*E,i[1]=(f+M)*E,i[2]=(g-S)*E,i[3]=0,i[4]=(f-M)*T,i[5]=(1-(d+p))*T,i[6]=(m+v)*T,i[7]=0,i[8]=(g+S)*C,i[9]=(m-v)*C,i[10]=(1-(d+_))*C,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){let i=this.elements;e.x=i[12],e.y=i[13],e.z=i[14];let r=this.determinant();if(r===0)return n.set(1,1,1),t.identity(),this;let a=Yi.set(i[0],i[1],i[2]).length(),o=Yi.set(i[4],i[5],i[6]).length(),c=Yi.set(i[8],i[9],i[10]).length();r<0&&(a=-a),on.copy(this);let l=1/a,h=1/o,u=1/c;return on.elements[0]*=l,on.elements[1]*=l,on.elements[2]*=l,on.elements[4]*=h,on.elements[5]*=h,on.elements[6]*=h,on.elements[8]*=u,on.elements[9]*=u,on.elements[10]*=u,t.setFromRotationMatrix(on),n.x=a,n.y=o,n.z=c,this}makePerspective(e,t,n,i,r,a,o=un,c=!1){let l=this.elements,h=2*r/(t-e),u=2*r/(n-i),d=(t+e)/(t-e),f=(n+i)/(n-i),g,_;if(c)g=r/(a-r),_=a*r/(a-r);else if(o===un)g=-(a+r)/(a-r),_=-2*a*r/(a-r);else if(o===us)g=-a/(a-r),_=-a*r/(a-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return l[0]=h,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=u,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=g,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,i,r,a,o=un,c=!1){let l=this.elements,h=2/(t-e),u=2/(n-i),d=-(t+e)/(t-e),f=-(n+i)/(n-i),g,_;if(c)g=1/(a-r),_=a/(a-r);else if(o===un)g=-2/(a-r),_=-(a+r)/(a-r);else if(o===us)g=-1/(a-r),_=-r/(a-r);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return l[0]=h,l[4]=0,l[8]=0,l[12]=d,l[1]=0,l[5]=u,l[9]=0,l[13]=f,l[2]=0,l[6]=0,l[10]=g,l[14]=_,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};Za.prototype.isMatrix4=!0;var Ue=Za,Yi=new F,on=new Ue,Uf=new F(0,0,0),Of=new F(1,1,1),ti=new F,Kr=new F,Kt=new F,kh=new Ue,Bh=new Ft,wn=class s{constructor(e=0,t=0,n=0,i=s.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let i=e.elements,r=i[0],a=i[4],o=i[8],c=i[1],l=i[5],h=i[9],u=i[2],d=i[6],f=i[10];switch(t){case"XYZ":this._y=Math.asin(Ve(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,f),this._z=Math.atan2(-a,r)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Ve(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-u,r),this._z=0);break;case"ZXY":this._x=Math.asin(Ve(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-Ve(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(Ve(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-u,r)):(this._x=0,this._y=Math.atan2(o,f));break;case"XZY":this._z=Math.asin(-Ve(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-h,f),this._y=0);break;default:_e("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return kh.makeRotationFromQuaternion(e),this.setFromRotationMatrix(kh,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Bh.setFromEuler(this),this.setFromQuaternion(Bh,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};wn.DEFAULT_ORDER="XYZ";var er=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},kf=0,zh=new F,Zi=new Ft,zn=new Ue,Jr=new F,zs=new F,Bf=new F,zf=new Ft,Gh=new F(1,0,0),Vh=new F(0,1,0),Hh=new F(0,0,1),Wh={type:"added"},Gf={type:"removed"},$i={type:"childadded",child:null},_c={type:"childremoved",child:null},ct=class s extends mn{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:kf++}),this.uuid=fn(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=s.DEFAULT_UP.clone();let e=new F,t=new wn,n=new Ft,i=new F(1,1,1);function r(){n.setFromEuler(t,!1)}function a(){t.setFromQuaternion(n,void 0,!1)}t._onChange(r),n._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Ue},normalMatrix:{value:new Pe}}),this.matrix=new Ue,this.matrixWorld=new Ue,this.matrixAutoUpdate=s.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=s.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new er,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Zi.setFromAxisAngle(e,t),this.quaternion.multiply(Zi),this}rotateOnWorldAxis(e,t){return Zi.setFromAxisAngle(e,t),this.quaternion.premultiply(Zi),this}rotateX(e){return this.rotateOnAxis(Gh,e)}rotateY(e){return this.rotateOnAxis(Vh,e)}rotateZ(e){return this.rotateOnAxis(Hh,e)}translateOnAxis(e,t){return zh.copy(e).applyQuaternion(this.quaternion),this.position.add(zh.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Gh,e)}translateY(e){return this.translateOnAxis(Vh,e)}translateZ(e){return this.translateOnAxis(Hh,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(zn.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Jr.copy(e):Jr.set(e,t,n);let i=this.parent;this.updateWorldMatrix(!0,!1),zs.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?zn.lookAt(zs,Jr,this.up):zn.lookAt(Jr,zs,this.up),this.quaternion.setFromRotationMatrix(zn),i&&(zn.extractRotation(i.matrixWorld),Zi.setFromRotationMatrix(zn),this.quaternion.premultiply(Zi.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(we("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(Wh),$i.child=e,this.dispatchEvent($i),$i.child=null):we("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}let t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Gf),_c.child=e,this.dispatchEvent(_c),_c.child=null),this}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),zn.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),zn.multiply(e.parent.matrixWorld)),e.applyMatrix4(zn),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Wh),$i.child=e,this.dispatchEvent($i),$i.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){let a=this.children[n].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);let i=this.children;for(let r=0,a=i.length;r<a;r++)i[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,e,Bf),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,zf,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){let t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);let e=this.pivot;if(e!==null){let t=e.x,n=e.y,i=e.z,r=this.matrix.elements;r[12]+=t-r[0]*t-r[4]*n-r[8]*i,r[13]+=n-r[1]*t-r[5]*n-r[9]*i,r[14]+=i-r[2]*t-r[6]*n-r[10]*i}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){let n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){let i=this.children;for(let r=0,a=i.length;r<a;r++)i[r].updateWorldMatrix(!1,!0)}}toJSON(e){let t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),this.static!==!1&&(i.static=this.static),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.pivot!==null&&(i.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(i.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(i.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(o=>({...o})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function r(o,c){return o[c.uuid]===void 0&&(o[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);let o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){let c=o.shapes;if(Array.isArray(c))for(let l=0,h=c.length;l<h;l++){let u=c[l];r(e.shapes,u)}else r(e.shapes,c)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let o=[];for(let c=0,l=this.material.length;c<l;c++)o.push(r(e.materials,this.material[c]));i.material=o}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let o=0;o<this.children.length;o++)i.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let o=0;o<this.animations.length;o++){let c=this.animations[o];i.animations.push(r(e.animations,c))}}if(t){let o=a(e.geometries),c=a(e.materials),l=a(e.textures),h=a(e.images),u=a(e.shapes),d=a(e.skeletons),f=a(e.animations),g=a(e.nodes);o.length>0&&(n.geometries=o),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),h.length>0&&(n.images=h),u.length>0&&(n.shapes=u),d.length>0&&(n.skeletons=d),f.length>0&&(n.animations=f),g.length>0&&(n.nodes=g)}return n.object=i,n;function a(o){let c=[];for(let l in o){let h=o[l];delete h.metadata,c.push(h)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=e.pivot!==null?e.pivot.clone():null,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){let i=e.children[n];this.add(i.clone())}return this}};ct.DEFAULT_UP=new F(0,1,0);ct.DEFAULT_MATRIX_AUTO_UPDATE=!0;ct.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var dn=class extends ct{constructor(){super(),this.isGroup=!0,this.type="Group"}},Vf={type:"move"},ms=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new dn,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new dn,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new F,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new F),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new dn,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new F,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new F,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,a=null,o=this._targetRay,c=this._grip,l=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(l&&e.hand){a=!0;for(let _ of e.hand.values()){let m=t.getJointPose(_,n),p=this._getHandJoint(l,_);m!==null&&(p.matrix.fromArray(m.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.matrixWorldNeedsUpdate=!0,p.jointRadius=m.radius),p.visible=m!==null}let h=l.joints["index-finger-tip"],u=l.joints["thumb-tip"],d=h.position.distanceTo(u.position),f=.02,g=.005;l.inputState.pinching&&d>f+g?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&d<=f-g&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1,c.eventsEnabled&&c.dispatchEvent({type:"gripUpdated",data:e,target:this})));o!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&r!==null&&(i=r),i!==null&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(Vf)))}return o!==null&&(o.visible=i!==null),c!==null&&(c.visible=r!==null),l!==null&&(l.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new dn;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},ed={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ni={h:0,s:0,l:0},Yr={h:0,s:0,l:0};function vc(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}var Te=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=bt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Be.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Be.workingColorSpace){return this.r=e,this.g=t,this.b=n,Be.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Be.workingColorSpace){if(e=gl(e,1),t=Ve(t,0,1),n=Ve(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,a=2*n-r;this.r=vc(a,r,e+1/3),this.g=vc(a,r,e),this.b=vc(a,r,e-1/3)}return Be.colorSpaceToWorking(this,i),this}setStyle(e,t=bt){function n(r){r!==void 0&&parseFloat(r)<1&&_e("Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r,a=i[1],o=i[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:_e("Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){let r=i[1],a=r.length;if(a===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(r,16),t);_e("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=bt){let n=ed[e.toLowerCase()];return n!==void 0?this.setHex(n,t):_e("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Xn(e.r),this.g=Xn(e.g),this.b=Xn(e.b),this}copyLinearToSRGB(e){return this.r=ls(e.r),this.g=ls(e.g),this.b=ls(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=bt){return Be.workingToColorSpace(Dt.copy(this),e),Math.round(Ve(Dt.r*255,0,255))*65536+Math.round(Ve(Dt.g*255,0,255))*256+Math.round(Ve(Dt.b*255,0,255))}getHexString(e=bt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Be.workingColorSpace){Be.workingToColorSpace(Dt.copy(this),t);let n=Dt.r,i=Dt.g,r=Dt.b,a=Math.max(n,i,r),o=Math.min(n,i,r),c,l,h=(o+a)/2;if(o===a)c=0,l=0;else{let u=a-o;switch(l=h<=.5?u/(a+o):u/(2-a-o),a){case n:c=(i-r)/u+(i<r?6:0);break;case i:c=(r-n)/u+2;break;case r:c=(n-i)/u+4;break}c/=6}return e.h=c,e.s=l,e.l=h,e}getRGB(e,t=Be.workingColorSpace){return Be.workingToColorSpace(Dt.copy(this),t),e.r=Dt.r,e.g=Dt.g,e.b=Dt.b,e}getStyle(e=bt){Be.workingToColorSpace(Dt.copy(this),e);let t=Dt.r,n=Dt.g,i=Dt.b;return e!==bt?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,t,n){return this.getHSL(ni),this.setHSL(ni.h+e,ni.s+t,ni.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(ni),e.getHSL(Yr);let n=Js(ni.h,Yr.h,t),i=Js(ni.s,Yr.s,t),r=Js(ni.l,Yr.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Dt=new Te;Te.NAMES=ed;var Di=class extends ct{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new wn,this.environmentIntensity=1,this.environmentRotation=new wn,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}},cn=new F,Gn=new F,yc=new F,Vn=new F,Qi=new F,es=new F,qh=new F,Mc=new F,Sc=new F,Ac=new F,Tc=new nt,wc=new nt,Ec=new nt,oi=class s{constructor(e=new F,t=new F,n=new F){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),cn.subVectors(e,t),i.cross(cn);let r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){cn.subVectors(i,t),Gn.subVectors(n,t),yc.subVectors(e,t);let a=cn.dot(cn),o=cn.dot(Gn),c=cn.dot(yc),l=Gn.dot(Gn),h=Gn.dot(yc),u=a*l-o*o;if(u===0)return r.set(0,0,0),null;let d=1/u,f=(l*c-o*h)*d,g=(a*h-o*c)*d;return r.set(1-f-g,g,f)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Vn)===null?!1:Vn.x>=0&&Vn.y>=0&&Vn.x+Vn.y<=1}static getInterpolation(e,t,n,i,r,a,o,c){return this.getBarycoord(e,t,n,i,Vn)===null?(c.x=0,c.y=0,"z"in c&&(c.z=0),"w"in c&&(c.w=0),null):(c.setScalar(0),c.addScaledVector(r,Vn.x),c.addScaledVector(a,Vn.y),c.addScaledVector(o,Vn.z),c)}static getInterpolatedAttribute(e,t,n,i,r,a){return Tc.setScalar(0),wc.setScalar(0),Ec.setScalar(0),Tc.fromBufferAttribute(e,t),wc.fromBufferAttribute(e,n),Ec.fromBufferAttribute(e,i),a.setScalar(0),a.addScaledVector(Tc,r.x),a.addScaledVector(wc,r.y),a.addScaledVector(Ec,r.z),a}static isFrontFacing(e,t,n,i){return cn.subVectors(n,t),Gn.subVectors(e,t),cn.cross(Gn).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return cn.subVectors(this.c,this.b),Gn.subVectors(this.a,this.b),cn.cross(Gn).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return s.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return s.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return s.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return s.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return s.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,i=this.b,r=this.c,a,o;Qi.subVectors(i,n),es.subVectors(r,n),Mc.subVectors(e,n);let c=Qi.dot(Mc),l=es.dot(Mc);if(c<=0&&l<=0)return t.copy(n);Sc.subVectors(e,i);let h=Qi.dot(Sc),u=es.dot(Sc);if(h>=0&&u<=h)return t.copy(i);let d=c*u-h*l;if(d<=0&&c>=0&&h<=0)return a=c/(c-h),t.copy(n).addScaledVector(Qi,a);Ac.subVectors(e,r);let f=Qi.dot(Ac),g=es.dot(Ac);if(g>=0&&f<=g)return t.copy(r);let _=f*l-c*g;if(_<=0&&l>=0&&g<=0)return o=l/(l-g),t.copy(n).addScaledVector(es,o);let m=h*g-f*u;if(m<=0&&u-h>=0&&f-g>=0)return qh.subVectors(r,i),o=(u-h)/(u-h+(f-g)),t.copy(i).addScaledVector(qh,o);let p=1/(m+_+d);return a=_*p,o=d*p,t.copy(n).addScaledVector(Qi,a).addScaledVector(es,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},Bt=class{constructor(e=new F(1/0,1/0,1/0),t=new F(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(ln.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ln.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=ln.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let r=n.getAttribute("position");if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let a=0,o=r.count;a<o;a++)e.isMesh===!0?e.getVertexPosition(a,ln):ln.fromBufferAttribute(r,a),ln.applyMatrix4(e.matrixWorld),this.expandByPoint(ln);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Zr.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Zr.copy(n.boundingBox)),Zr.applyMatrix4(e.matrixWorld),this.union(Zr)}let i=e.children;for(let r=0,a=i.length;r<a;r++)this.expandByObject(i[r],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,ln),ln.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Gs),$r.subVectors(this.max,Gs),ts.subVectors(e.a,Gs),ns.subVectors(e.b,Gs),is.subVectors(e.c,Gs),ii.subVectors(ns,ts),si.subVectors(is,ns),yi.subVectors(ts,is);let t=[0,-ii.z,ii.y,0,-si.z,si.y,0,-yi.z,yi.y,ii.z,0,-ii.x,si.z,0,-si.x,yi.z,0,-yi.x,-ii.y,ii.x,0,-si.y,si.x,0,-yi.y,yi.x,0];return!Rc(t,ts,ns,is,$r)||(t=[1,0,0,0,1,0,0,0,1],!Rc(t,ts,ns,is,$r))?!1:(Qr.crossVectors(ii,si),t=[Qr.x,Qr.y,Qr.z],Rc(t,ts,ns,is,$r))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ln).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ln).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Hn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Hn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Hn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Hn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Hn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Hn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Hn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Hn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Hn),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},Hn=[new F,new F,new F,new F,new F,new F,new F,new F],ln=new F,Zr=new Bt,ts=new F,ns=new F,is=new F,ii=new F,si=new F,yi=new F,Gs=new F,$r=new F,Qr=new F,Mi=new F;function Rc(s,e,t,n,i){for(let r=0,a=s.length-3;r<=a;r+=3){Mi.fromArray(s,r);let o=i.x*Math.abs(Mi.x)+i.y*Math.abs(Mi.y)+i.z*Math.abs(Mi.z),c=e.dot(Mi),l=t.dot(Mi),h=n.dot(Mi);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>o)return!1}return!0}var yt=new F,ea=new He,Hf=0,St=class extends mn{constructor(e,t,n=!1){if(super(),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:Hf++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=Pa,this.updateRanges=[],this.gpuType=$t,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)ea.fromBufferAttribute(this,t),ea.applyMatrix3(e),this.setXY(t,ea.x,ea.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)yt.fromBufferAttribute(this,t),yt.applyMatrix3(e),this.setXYZ(t,yt.x,yt.y,yt.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)yt.fromBufferAttribute(this,t),yt.applyMatrix4(e),this.setXYZ(t,yt.x,yt.y,yt.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)yt.fromBufferAttribute(this,t),yt.applyNormalMatrix(e),this.setXYZ(t,yt.x,yt.y,yt.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)yt.fromBufferAttribute(this,t),yt.transformDirection(e),this.setXYZ(t,yt.x,yt.y,yt.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=hn(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Ye(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=hn(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ye(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=hn(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ye(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=hn(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ye(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=hn(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ye(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Ye(t,this.array),n=Ye(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=Ye(t,this.array),n=Ye(n,this.array),i=Ye(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=Ye(t,this.array),n=Ye(n,this.array),i=Ye(i,this.array),r=Ye(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Pa&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}};var tr=class extends St{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var nr=class extends St{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Ot=class extends St{constructor(e,t,n){super(new Float32Array(e),t,n)}},Wf=new Bt,Vs=new F,Cc=new F,Vt=class{constructor(e=new F,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):Wf.setFromPoints(e).getCenter(n);let i=0;for(let r=0,a=e.length;r<a;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Vs.subVectors(e,this.center);let t=Vs.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(Vs,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Cc.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Vs.copy(e.center).add(Cc)),this.expandByPoint(Vs.copy(e.center).sub(Cc))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},qf=0,tn=new Ue,Pc=new ct,ss=new F,Jt=new Bt,Hs=new Bt,Rt=new F,zt=class s extends mn{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:qf++}),this.uuid=fn(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(mf(e)?nr:tr)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let r=new Pe().getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return tn.makeRotationFromQuaternion(e),this.applyMatrix4(tn),this}rotateX(e){return tn.makeRotationX(e),this.applyMatrix4(tn),this}rotateY(e){return tn.makeRotationY(e),this.applyMatrix4(tn),this}rotateZ(e){return tn.makeRotationZ(e),this.applyMatrix4(tn),this}translate(e,t,n){return tn.makeTranslation(e,t,n),this.applyMatrix4(tn),this}scale(e,t,n){return tn.makeScale(e,t,n),this.applyMatrix4(tn),this}lookAt(e){return Pc.lookAt(e),Pc.updateMatrix(),this.applyMatrix4(Pc.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ss).negate(),this.translate(ss.x,ss.y,ss.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let i=0,r=e.length;i<r;i++){let a=e[i];n.push(a.x,a.y,a.z||0)}this.setAttribute("position",new Ot(n,3))}else{let n=Math.min(e.length,t.count);for(let i=0;i<n;i++){let r=e[i];t.setXYZ(i,r.x,r.y,r.z||0)}e.length>t.count&&_e("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Bt);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){we("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new F(-1/0,-1/0,-1/0),new F(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){let r=t[n];Jt.setFromBufferAttribute(r),this.morphTargetsRelative?(Rt.addVectors(this.boundingBox.min,Jt.min),this.boundingBox.expandByPoint(Rt),Rt.addVectors(this.boundingBox.max,Jt.max),this.boundingBox.expandByPoint(Rt)):(this.boundingBox.expandByPoint(Jt.min),this.boundingBox.expandByPoint(Jt.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&we('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Vt);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){we("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new F,1/0);return}if(e){let n=this.boundingSphere.center;if(Jt.setFromBufferAttribute(e),t)for(let r=0,a=t.length;r<a;r++){let o=t[r];Hs.setFromBufferAttribute(o),this.morphTargetsRelative?(Rt.addVectors(Jt.min,Hs.min),Jt.expandByPoint(Rt),Rt.addVectors(Jt.max,Hs.max),Jt.expandByPoint(Rt)):(Jt.expandByPoint(Hs.min),Jt.expandByPoint(Hs.max))}Jt.getCenter(n);let i=0;for(let r=0,a=e.count;r<a;r++)Rt.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(Rt));if(t)for(let r=0,a=t.length;r<a;r++){let o=t[r],c=this.morphTargetsRelative;for(let l=0,h=o.count;l<h;l++)Rt.fromBufferAttribute(o,l),c&&(ss.fromBufferAttribute(e,l),Rt.add(ss)),i=Math.max(i,n.distanceToSquared(Rt))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&we('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){we("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,i=t.normal,r=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new St(new Float32Array(4*n.count),4));let a=this.getAttribute("tangent"),o=[],c=[];for(let x=0;x<n.count;x++)o[x]=new F,c[x]=new F;let l=new F,h=new F,u=new F,d=new He,f=new He,g=new He,_=new F,m=new F;function p(x,w,L){l.fromBufferAttribute(n,x),h.fromBufferAttribute(n,w),u.fromBufferAttribute(n,L),d.fromBufferAttribute(r,x),f.fromBufferAttribute(r,w),g.fromBufferAttribute(r,L),h.sub(l),u.sub(l),f.sub(d),g.sub(d);let R=1/(f.x*g.y-g.x*f.y);isFinite(R)&&(_.copy(h).multiplyScalar(g.y).addScaledVector(u,-f.y).multiplyScalar(R),m.copy(u).multiplyScalar(f.x).addScaledVector(h,-g.x).multiplyScalar(R),o[x].add(_),o[w].add(_),o[L].add(_),c[x].add(m),c[w].add(m),c[L].add(m))}let v=this.groups;v.length===0&&(v=[{start:0,count:e.count}]);for(let x=0,w=v.length;x<w;++x){let L=v[x],R=L.start,O=L.count;for(let H=R,q=R+O;H<q;H+=3)p(e.getX(H+0),e.getX(H+1),e.getX(H+2))}let S=new F,M=new F,E=new F,T=new F;function C(x){E.fromBufferAttribute(i,x),T.copy(E);let w=o[x];S.copy(w),S.sub(E.multiplyScalar(E.dot(w))).normalize(),M.crossVectors(T,w);let R=M.dot(c[x])<0?-1:1;a.setXYZW(x,S.x,S.y,S.z,R)}for(let x=0,w=v.length;x<w;++x){let L=v[x],R=L.start,O=L.count;for(let H=R,q=R+O;H<q;H+=3)C(e.getX(H+0)),C(e.getX(H+1)),C(e.getX(H+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new St(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let d=0,f=n.count;d<f;d++)n.setXYZ(d,0,0,0);let i=new F,r=new F,a=new F,o=new F,c=new F,l=new F,h=new F,u=new F;if(e)for(let d=0,f=e.count;d<f;d+=3){let g=e.getX(d+0),_=e.getX(d+1),m=e.getX(d+2);i.fromBufferAttribute(t,g),r.fromBufferAttribute(t,_),a.fromBufferAttribute(t,m),h.subVectors(a,r),u.subVectors(i,r),h.cross(u),o.fromBufferAttribute(n,g),c.fromBufferAttribute(n,_),l.fromBufferAttribute(n,m),o.add(h),c.add(h),l.add(h),n.setXYZ(g,o.x,o.y,o.z),n.setXYZ(_,c.x,c.y,c.z),n.setXYZ(m,l.x,l.y,l.z)}else for(let d=0,f=t.count;d<f;d+=3)i.fromBufferAttribute(t,d+0),r.fromBufferAttribute(t,d+1),a.fromBufferAttribute(t,d+2),h.subVectors(a,r),u.subVectors(i,r),h.cross(u),n.setXYZ(d+0,h.x,h.y,h.z),n.setXYZ(d+1,h.x,h.y,h.z),n.setXYZ(d+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Rt.fromBufferAttribute(e,t),Rt.normalize(),e.setXYZ(t,Rt.x,Rt.y,Rt.z)}toNonIndexed(){function e(o,c){let l=o.array,h=o.itemSize,u=o.normalized,d=new l.constructor(c.length*h),f=0,g=0;for(let _=0,m=c.length;_<m;_++){o.isInterleavedBufferAttribute?f=c[_]*o.data.stride+o.offset:f=c[_]*h;for(let p=0;p<h;p++)d[g++]=l[f++]}return new St(d,h,u)}if(this.index===null)return _e("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new s,n=this.index.array,i=this.attributes;for(let o in i){let c=i[o],l=e(c,n);t.setAttribute(o,l)}let r=this.morphAttributes;for(let o in r){let c=[],l=r[o];for(let h=0,u=l.length;h<u;h++){let d=l[h],f=e(d,n);c.push(f)}t.morphAttributes[o]=c}t.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let o=0,c=a.length;o<c;o++){let l=a[o];t.addGroup(l.start,l.count,l.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(e[l]=c[l]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let c in n){let l=n[c];e.data.attributes[c]=l.toJSON(e.data)}let i={},r=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],h=[];for(let u=0,d=l.length;u<d;u++){let f=l[u];h.push(f.toJSON(e.data))}h.length>0&&(i[c]=h,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let i=e.attributes;for(let l in i){let h=i[l];this.setAttribute(l,h.clone(t))}let r=e.morphAttributes;for(let l in r){let h=[],u=r[l];for(let d=0,f=u.length;d<f;d++)h.push(u[d].clone(t));this.morphAttributes[l]=h}this.morphTargetsRelative=e.morphTargetsRelative;let a=e.groups;for(let l=0,h=a.length;l<h;l++){let u=a[l];this.addGroup(u.start,u.count,u.materialIndex)}let o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());let c=e.boundingSphere;return c!==null&&(this.boundingSphere=c.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},gs=class{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Pa,this.updateRanges=[],this.version=0,this.uuid=fn()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=fn()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=fn()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}},Ut=new F,bs=class s{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)Ut.fromBufferAttribute(this,t),Ut.applyMatrix4(e),this.setXYZ(t,Ut.x,Ut.y,Ut.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Ut.fromBufferAttribute(this,t),Ut.applyNormalMatrix(e),this.setXYZ(t,Ut.x,Ut.y,Ut.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Ut.fromBufferAttribute(this,t),Ut.transformDirection(e),this.setXYZ(t,Ut.x,Ut.y,Ut.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=hn(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Ye(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=Ye(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Ye(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Ye(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Ye(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=hn(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=hn(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=hn(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=hn(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ye(t,this.array),n=Ye(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ye(t,this.array),n=Ye(n,this.array),i=Ye(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ye(t,this.array),n=Ye(n,this.array),i=Ye(i,this.array),r=Ye(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(e===void 0){$s("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");let t=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return new St(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new s(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){$s("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");let t=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}},Xf=0,Gt=class extends mn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Xf++}),this.uuid=fn(),this.name="",this.type="Material",this.blending=Ri,this.side=pn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=ya,this.blendDst=Ma,this.blendEquation=ci,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Te(0,0,0),this.blendAlpha=0,this.depthFunc=Ci,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Hc,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ti,this.stencilZFail=Ti,this.stencilZPass=Ti,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){_e(`Material: parameter '${t}' has value of undefined.`);continue}let i=this[t];if(i===void 0){_e(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Ri&&(n.blending=this.blending),this.side!==pn&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==ya&&(n.blendSrc=this.blendSrc),this.blendDst!==Ma&&(n.blendDst=this.blendDst),this.blendEquation!==ci&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Ci&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Hc&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ti&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Ti&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Ti&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(r){let a=[];for(let o in r){let c=r[o];delete c.metadata,a.push(c)}return a}if(t){let r=i(e.textures),a=i(e.images);r.length>0&&(n.textures=r),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let i=t.length;n=new Array(i);for(let r=0;r!==i;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};var Wn=new F,Ic=new F,ta=new F,ri=new F,Lc=new F,na=new F,Dc=new F,Fi=class{constructor(e=new F,t=new F(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Wn)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=Wn.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Wn.copy(this.origin).addScaledVector(this.direction,t),Wn.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Ic.copy(e).add(t).multiplyScalar(.5),ta.copy(t).sub(e).normalize(),ri.copy(this.origin).sub(Ic);let r=e.distanceTo(t)*.5,a=-this.direction.dot(ta),o=ri.dot(this.direction),c=-ri.dot(ta),l=ri.lengthSq(),h=Math.abs(1-a*a),u,d,f,g;if(h>0)if(u=a*c-o,d=a*o-c,g=r*h,u>=0)if(d>=-g)if(d<=g){let _=1/h;u*=_,d*=_,f=u*(u+a*d+2*o)+d*(a*u+d+2*c)+l}else d=r,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*c)+l;else d=-r,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*c)+l;else d<=-g?(u=Math.max(0,-(-a*r+o)),d=u>0?-r:Math.min(Math.max(-r,-c),r),f=-u*u+d*(d+2*c)+l):d<=g?(u=0,d=Math.min(Math.max(-r,-c),r),f=d*(d+2*c)+l):(u=Math.max(0,-(a*r+o)),d=u>0?r:Math.min(Math.max(-r,-c),r),f=-u*u+d*(d+2*c)+l);else d=a>0?-r:r,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*c)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,u),i&&i.copy(Ic).addScaledVector(ta,d),f}intersectSphere(e,t){Wn.subVectors(e.center,this.origin);let n=Wn.dot(this.direction),i=Wn.dot(Wn)-n*n,r=e.radius*e.radius;if(i>r)return null;let a=Math.sqrt(r-i),o=n-a,c=n+a;return c<0?null:o<0?this.at(c,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,a,o,c,l=1/this.direction.x,h=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,i=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,i=(e.min.x-d.x)*l),h>=0?(r=(e.min.y-d.y)*h,a=(e.max.y-d.y)*h):(r=(e.max.y-d.y)*h,a=(e.min.y-d.y)*h),n>a||r>i||((r>n||isNaN(n))&&(n=r),(a<i||isNaN(i))&&(i=a),u>=0?(o=(e.min.z-d.z)*u,c=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,c=(e.min.z-d.z)*u),n>c||o>i)||((o>n||n!==n)&&(n=o),(c<i||i!==i)&&(i=c),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,Wn)!==null}intersectTriangle(e,t,n,i,r){Lc.subVectors(t,e),na.subVectors(n,e),Dc.crossVectors(Lc,na);let a=this.direction.dot(Dc),o;if(a>0){if(i)return null;o=1}else if(a<0)o=-1,a=-a;else return null;ri.subVectors(this.origin,e);let c=o*this.direction.dot(na.crossVectors(ri,na));if(c<0)return null;let l=o*this.direction.dot(Lc.cross(ri));if(l<0||c+l>a)return null;let h=-o*ri.dot(Dc);return h<0?null:this.at(h/a,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},gn=class extends Gt{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Te(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new wn,this.combine=$a,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},Xh=new Ue,Si=new Fi,ia=new Vt,jh=new F,sa=new F,ra=new F,aa=new F,Fc=new F,oa=new F,Kh=new F,ca=new F,lt=class extends ct{constructor(e=new zt,t=new gn){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=i.length;r<a;r++){let o=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}getVertexPosition(e,t){let n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(i,e);let o=this.morphTargetInfluences;if(r&&o){oa.set(0,0,0);for(let c=0,l=r.length;c<l;c++){let h=o[c],u=r[c];h!==0&&(Fc.fromBufferAttribute(u,e),a?oa.addScaledVector(Fc,h):oa.addScaledVector(Fc.sub(t),h))}t.add(oa)}return t}raycast(e,t){let n=this.geometry,i=this.material,r=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),ia.copy(n.boundingSphere),ia.applyMatrix4(r),Si.copy(e.ray).recast(e.near),!(ia.containsPoint(Si.origin)===!1&&(Si.intersectSphere(ia,jh)===null||Si.origin.distanceToSquared(jh)>(e.far-e.near)**2))&&(Xh.copy(r).invert(),Si.copy(e.ray).applyMatrix4(Xh),!(n.boundingBox!==null&&Si.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Si)))}_computeIntersections(e,t,n){let i,r=this.geometry,a=this.material,o=r.index,c=r.attributes.position,l=r.attributes.uv,h=r.attributes.uv1,u=r.attributes.normal,d=r.groups,f=r.drawRange;if(o!==null)if(Array.isArray(a))for(let g=0,_=d.length;g<_;g++){let m=d[g],p=a[m.materialIndex],v=Math.max(m.start,f.start),S=Math.min(o.count,Math.min(m.start+m.count,f.start+f.count));for(let M=v,E=S;M<E;M+=3){let T=o.getX(M),C=o.getX(M+1),x=o.getX(M+2);i=la(this,p,e,n,l,h,u,T,C,x),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=m.materialIndex,t.push(i))}}else{let g=Math.max(0,f.start),_=Math.min(o.count,f.start+f.count);for(let m=g,p=_;m<p;m+=3){let v=o.getX(m),S=o.getX(m+1),M=o.getX(m+2);i=la(this,a,e,n,l,h,u,v,S,M),i&&(i.faceIndex=Math.floor(m/3),t.push(i))}}else if(c!==void 0)if(Array.isArray(a))for(let g=0,_=d.length;g<_;g++){let m=d[g],p=a[m.materialIndex],v=Math.max(m.start,f.start),S=Math.min(c.count,Math.min(m.start+m.count,f.start+f.count));for(let M=v,E=S;M<E;M+=3){let T=M,C=M+1,x=M+2;i=la(this,p,e,n,l,h,u,T,C,x),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=m.materialIndex,t.push(i))}}else{let g=Math.max(0,f.start),_=Math.min(c.count,f.start+f.count);for(let m=g,p=_;m<p;m+=3){let v=m,S=m+1,M=m+2;i=la(this,a,e,n,l,h,u,v,S,M),i&&(i.faceIndex=Math.floor(m/3),t.push(i))}}}};function jf(s,e,t,n,i,r,a,o){let c;if(e.side===Pt?c=n.intersectTriangle(a,r,i,!0,o):c=n.intersectTriangle(i,r,a,e.side===pn,o),c===null)return null;ca.copy(o),ca.applyMatrix4(s.matrixWorld);let l=t.ray.origin.distanceTo(ca);return l<t.near||l>t.far?null:{distance:l,point:ca.clone(),object:s}}function la(s,e,t,n,i,r,a,o,c,l){s.getVertexPosition(o,sa),s.getVertexPosition(c,ra),s.getVertexPosition(l,aa);let h=jf(s,e,t,n,sa,ra,aa,Kh);if(h){let u=new F;oi.getBarycoord(Kh,sa,ra,aa,u),i&&(h.uv=oi.getInterpolatedAttribute(i,o,c,l,u,new He)),r&&(h.uv1=oi.getInterpolatedAttribute(r,o,c,l,u,new He)),a&&(h.normal=oi.getInterpolatedAttribute(a,o,c,l,u,new F),h.normal.dot(n.direction)>0&&h.normal.multiplyScalar(-1));let d={a:o,b:c,c:l,normal:new F,materialIndex:0};oi.getNormal(sa,ra,aa,d.normal),h.face=d,h.barycoord=u}return h}var Ws=new nt,Jh=new nt,Yh=new nt,Kf=new nt,Zh=new Ue,ha=new F,Nc=new Vt,$h=new Ue,Uc=new Fi,ir=class extends lt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Gc,this.bindMatrix=new Ue,this.bindMatrixInverse=new Ue,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){let e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Bt),this.boundingBox.makeEmpty();let t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,ha),this.boundingBox.expandByPoint(ha)}computeBoundingSphere(){let e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Vt),this.boundingSphere.makeEmpty();let t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,ha),this.boundingSphere.expandByPoint(ha)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){let n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Nc.copy(this.boundingSphere),Nc.applyMatrix4(i),e.ray.intersectsSphere(Nc)!==!1&&($h.copy(i).invert(),Uc.copy(e.ray).applyMatrix4($h),!(this.boundingBox!==null&&Uc.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,Uc)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){let e=new nt,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);let r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===Gc?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===ku?this.bindMatrixInverse.copy(this.bindMatrix).invert():_e("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){let n=this.skeleton,i=this.geometry;Jh.fromBufferAttribute(i.attributes.skinIndex,e),Yh.fromBufferAttribute(i.attributes.skinWeight,e),t.isVector4?(Ws.copy(t),t.set(0,0,0,0)):(Ws.set(...t,1),t.set(0,0,0)),Ws.applyMatrix4(this.bindMatrix);for(let r=0;r<4;r++){let a=Yh.getComponent(r);if(a!==0){let o=Jh.getComponent(r);Zh.multiplyMatrices(n.bones[o].matrixWorld,n.boneInverses[o]),t.addScaledVector(Kf.copy(Ws).applyMatrix4(Zh),a)}}return t.isVector4&&(t.w=Ws.w),t.applyMatrix4(this.bindMatrixInverse)}},xs=class extends ct{constructor(){super(),this.isBone=!0,this.type="Bone"}},_s=class extends Ct{constructor(e=null,t=1,n=1,i,r,a,o,c,l=xt,h=xt,u,d){super(null,a,o,c,l,h,i,r,u,d),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},Qh=new Ue,Jf=new Ue,sr=class s{constructor(e=[],t=[]){this.uuid=fn(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){let e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){_e("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Ue)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){let n=new Ue;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){let n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){let n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){let e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let r=0,a=e.length;r<a;r++){let o=e[r]?e[r].matrixWorld:Jf;Qh.multiplyMatrices(o,t[r]),Qh.toArray(n,r*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new s(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);let t=new Float32Array(e*e*4);t.set(this.boneMatrices);let n=new _s(t,e,e,Qt,$t);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){let i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){let r=e.bones[n],a=t[r];a===void 0&&(_e("Skeleton: No bone found with UUID:",r),a=new xs),this.bones.push(a),this.boneInverses.push(new Ue().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){let e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;let t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i<r;i++){let a=t[i];e.bones.push(a.uuid);let o=n[i];e.boneInverses.push(o.toArray())}return e}},hi=class extends St{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){let e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}},rs=new Ue,eu=new Ue,ua=[],tu=new Bt,Yf=new Ue,qs=new lt,Xs=new Vt,Ni=class extends lt{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new hi(new Float32Array(n*16),16),this.previousInstanceMatrix=null,this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<n;i++)this.setMatrixAt(i,Yf)}computeBoundingBox(){let e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new Bt),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,rs),tu.copy(e.boundingBox).applyMatrix4(rs),this.boundingBox.union(tu)}computeBoundingSphere(){let e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Vt),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,rs),Xs.copy(e.boundingSphere).applyMatrix4(rs),this.boundingSphere.union(Xs)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.previousInstanceMatrix!==null&&(this.previousInstanceMatrix=e.previousInstanceMatrix.clone()),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){return this.instanceColor===null?t.setRGB(1,1,1):t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){return t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){let n=t.morphTargetInfluences,i=this.morphTexture.source.data.data,r=n.length+1,a=e*r+1;for(let o=0;o<n.length;o++)n[o]=i[a+o]}raycast(e,t){let n=this.matrixWorld,i=this.count;if(qs.geometry=this.geometry,qs.material=this.material,qs.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Xs.copy(this.boundingSphere),Xs.applyMatrix4(n),e.ray.intersectsSphere(Xs)!==!1))for(let r=0;r<i;r++){this.getMatrixAt(r,rs),eu.multiplyMatrices(n,rs),qs.matrixWorld=eu,qs.raycast(e,ua);for(let a=0,o=ua.length;a<o;a++){let c=ua[a];c.instanceId=r,c.object=this,t.push(c)}ua.length=0}}setColorAt(e,t){return this.instanceColor===null&&(this.instanceColor=new hi(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3),this}setMatrixAt(e,t){return t.toArray(this.instanceMatrix.array,e*16),this}setMorphAt(e,t){let n=t.morphTargetInfluences,i=n.length+1;this.morphTexture===null&&(this.morphTexture=new _s(new Float32Array(i*this.count),i,this.count,ro,$t));let r=this.morphTexture.source.data.data,a=0;for(let l=0;l<n.length;l++)a+=n[l];let o=this.geometry.morphTargetsRelative?1:1-a,c=i*e;return r[c]=o,r.set(n,c+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}},Oc=new F,Zf=new F,$f=new Pe,Sn=class{constructor(e=new F(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){let i=Oc.subVectors(n,t).cross(Zf.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t,n=!0){let i=e.delta(Oc),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let a=-(e.start.dot(this.normal)+this.constant)/r;return n===!0&&(a<0||a>1)?null:t.copy(e.start).addScaledVector(i,a)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||$f.getNormalMatrix(e),i=this.coplanarPoint(Oc).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}},Ai=new Vt,Qf=new He(.5,.5),da=new F,vs=class{constructor(e=new Sn,t=new Sn,n=new Sn,i=new Sn,r=new Sn,a=new Sn){this.planes=[e,t,n,i,r,a]}set(e,t,n,i,r,a){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(i),o[4].copy(r),o[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=un,n=!1){let i=this.planes,r=e.elements,a=r[0],o=r[1],c=r[2],l=r[3],h=r[4],u=r[5],d=r[6],f=r[7],g=r[8],_=r[9],m=r[10],p=r[11],v=r[12],S=r[13],M=r[14],E=r[15];if(i[0].setComponents(l-a,f-h,p-g,E-v).normalize(),i[1].setComponents(l+a,f+h,p+g,E+v).normalize(),i[2].setComponents(l+o,f+u,p+_,E+S).normalize(),i[3].setComponents(l-o,f-u,p-_,E-S).normalize(),n)i[4].setComponents(c,d,m,M).normalize(),i[5].setComponents(l-c,f-d,p-m,E-M).normalize();else if(i[4].setComponents(l-c,f-d,p-m,E-M).normalize(),t===un)i[5].setComponents(l+c,f+d,p+m,E+M).normalize();else if(t===us)i[5].setComponents(c,d,m,M).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ai.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ai.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ai)}intersectsSprite(e){Ai.center.set(0,0,0);let t=Qf.distanceTo(e.center);return Ai.radius=.7071067811865476+t,Ai.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ai)}intersectsSphere(e){let t=this.planes,n=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){let t=this.planes;for(let n=0;n<6;n++){let i=t[n];if(da.x=i.normal.x>0?e.max.x:e.min.x,da.y=i.normal.y>0?e.max.y:e.min.y,da.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(da)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};var ys=class extends Gt{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Te(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}},Na=new F,Ua=new F,nu=new Ue,js=new Fi,fa=new Vt,kc=new F,iu=new F,Ui=class extends ct{constructor(e=new zt,t=new ys){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[0];for(let i=1,r=t.count;i<r;i++)Na.fromBufferAttribute(t,i-1),Ua.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=Na.distanceTo(Ua);e.setAttribute("lineDistance",new Ot(n,1))}else _e("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){let n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),fa.copy(n.boundingSphere),fa.applyMatrix4(i),fa.radius+=r,e.ray.intersectsSphere(fa)===!1)return;nu.copy(i).invert(),js.copy(e.ray).applyMatrix4(nu);let o=r/((this.scale.x+this.scale.y+this.scale.z)/3),c=o*o,l=this.isLineSegments?2:1,h=n.index,d=n.attributes.position;if(h!==null){let f=Math.max(0,a.start),g=Math.min(h.count,a.start+a.count);for(let _=f,m=g-1;_<m;_+=l){let p=h.getX(_),v=h.getX(_+1),S=pa(this,e,js,c,p,v,_);S&&t.push(S)}if(this.isLineLoop){let _=h.getX(g-1),m=h.getX(f),p=pa(this,e,js,c,_,m,g-1);p&&t.push(p)}}else{let f=Math.max(0,a.start),g=Math.min(d.count,a.start+a.count);for(let _=f,m=g-1;_<m;_+=l){let p=pa(this,e,js,c,_,_+1,_);p&&t.push(p)}if(this.isLineLoop){let _=pa(this,e,js,c,g-1,f,g-1);_&&t.push(_)}}}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=i.length;r<a;r++){let o=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}};function pa(s,e,t,n,i,r,a){let o=s.geometry.attributes.position;if(Na.fromBufferAttribute(o,i),Ua.fromBufferAttribute(o,r),t.distanceSqToSegment(Na,Ua,kc,iu)>n)return;kc.applyMatrix4(s.matrixWorld);let l=e.ray.origin.distanceTo(kc);if(!(l<e.near||l>e.far))return{distance:l,point:iu.clone().applyMatrix4(s.matrixWorld),index:a,face:null,faceIndex:null,barycoord:null,object:s}}var su=new F,ru=new F,rr=class extends Ui{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[];for(let i=0,r=t.count;i<r;i+=2)su.fromBufferAttribute(t,i),ru.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+su.distanceTo(ru);e.setAttribute("lineDistance",new Ot(n,1))}else _e("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}},ar=class extends Ui{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}},Ms=class extends Gt{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Te(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},au=new Ue,Wc=new Fi,ma=new Vt,ga=new F,or=class extends ct{constructor(e=new zt,t=new Ms){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){let n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),ma.copy(n.boundingSphere),ma.applyMatrix4(i),ma.radius+=r,e.ray.intersectsSphere(ma)===!1)return;au.copy(i).invert(),Wc.copy(e.ray).applyMatrix4(au);let o=r/((this.scale.x+this.scale.y+this.scale.z)/3),c=o*o,l=n.index,u=n.attributes.position;if(l!==null){let d=Math.max(0,a.start),f=Math.min(l.count,a.start+a.count);for(let g=d,_=f;g<_;g++){let m=l.getX(g);ga.fromBufferAttribute(u,m),ou(ga,m,c,i,e,t,this)}}else{let d=Math.max(0,a.start),f=Math.min(u.count,a.start+a.count);for(let g=d,_=f;g<_;g++)ga.fromBufferAttribute(u,g),ou(ga,g,c,i,e,t,this)}}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=i.length;r<a;r++){let o=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}};function ou(s,e,t,n,i,r,a){let o=Wc.distanceSqToPoint(s);if(o<t){let c=new F;Wc.closestPointToPoint(s,c),c.applyMatrix4(n);let l=i.ray.origin.distanceTo(c);if(l<i.near||l>i.far)return;r.push({distance:l,distanceToRay:Math.sqrt(o),point:c,index:e,face:null,faceIndex:null,barycoord:null,object:a})}}var cr=class extends Ct{constructor(e=[],t=pi,n,i,r,a,o,c,l,h){super(e,t,n,i,r,a,o,c,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}};var jn=class extends Ct{constructor(e,t,n=_n,i,r,a,o=xt,c=xt,l,h=Tn,u=1){if(h!==Tn&&h!==mi)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");let d={width:e,height:t,depth:u};super(d,i,r,a,o,c,h,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new ps(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}},Oa=class extends jn{constructor(e,t=_n,n=pi,i,r,a=xt,o=xt,c,l=Tn){let h={width:e,height:e,depth:1},u=[h,h,h,h,h,h];super(e,e,t,n,i,r,a,o,c,l),this.image=u,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}},lr=class extends Ct{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}},ui=class s extends zt{constructor(e=1,t=1,n=1,i=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:a};let o=this;i=Math.floor(i),r=Math.floor(r),a=Math.floor(a);let c=[],l=[],h=[],u=[],d=0,f=0;g("z","y","x",-1,-1,n,t,e,a,r,0),g("z","y","x",1,-1,n,t,-e,a,r,1),g("x","z","y",1,1,e,n,t,i,a,2),g("x","z","y",1,-1,e,n,-t,i,a,3),g("x","y","z",1,-1,e,t,n,i,r,4),g("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(c),this.setAttribute("position",new Ot(l,3)),this.setAttribute("normal",new Ot(h,3)),this.setAttribute("uv",new Ot(u,2));function g(_,m,p,v,S,M,E,T,C,x,w){let L=M/C,R=E/x,O=M/2,H=E/2,q=T/2,N=C+1,z=x+1,V=0,$=0,Q=new F;for(let le=0;le<z;le++){let xe=le*R-H;for(let Se=0;Se<N;Se++){let Xe=Se*L-O;Q[_]=Xe*v,Q[m]=xe*S,Q[p]=q,l.push(Q.x,Q.y,Q.z),Q[_]=0,Q[m]=0,Q[p]=T>0?1:-1,h.push(Q.x,Q.y,Q.z),u.push(Se/C),u.push(1-le/x),V+=1}}for(let le=0;le<x;le++)for(let xe=0;xe<C;xe++){let Se=d+xe+N*le,Xe=d+xe+N*(le+1),Ze=d+(xe+1)+N*(le+1),Fe=d+(xe+1)+N*le;c.push(Se,Xe,Fe),c.push(Xe,Ze,Fe),$+=6}o.addGroup(f,$,w),f+=$,d+=V}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new s(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};var hr=class s extends zt{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};let r=e/2,a=t/2,o=Math.floor(n),c=Math.floor(i),l=o+1,h=c+1,u=e/o,d=t/c,f=[],g=[],_=[],m=[];for(let p=0;p<h;p++){let v=p*d-a;for(let S=0;S<l;S++){let M=S*u-r;g.push(M,-v,0),_.push(0,0,1),m.push(S/o),m.push(1-p/c)}}for(let p=0;p<c;p++)for(let v=0;v<o;v++){let S=v+l*p,M=v+l*(p+1),E=v+1+l*(p+1),T=v+1+l*p;f.push(S,M,T),f.push(M,E,T)}this.setIndex(f),this.setAttribute("position",new Ot(g,3)),this.setAttribute("normal",new Ot(_,3)),this.setAttribute("uv",new Ot(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new s(e.width,e.height,e.widthSegments,e.heightSegments)}};function Vi(s){let e={};for(let t in s){e[t]={};for(let n in s[t]){let i=s[t][n];if(cu(i))i.isRenderTargetTexture?(_e("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=i.clone();else if(Array.isArray(i))if(cu(i[0])){let r=[];for(let a=0,o=i.length;a<o;a++)r[a]=i[a].clone();e[t][n]=r}else e[t][n]=i.slice();else e[t][n]=i}}return e}function Nt(s){let e={};for(let t=0;t<s.length;t++){let n=Vi(s[t]);for(let i in n)e[i]=n[i]}return e}function cu(s){return s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)}function ep(s){let e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function bl(s){let e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Be.workingColorSpace}var td={clone:Vi,merge:Nt},tp=`void main() {
+var Cf=Object.defineProperty;var Pf=(s,e,t)=>()=>{if(t)throw t[0];try{return s&&(e=s(s=0)),e}catch(n){throw t=[n],n}};var qh=(s,e)=>{for(var t in e)Cf(s,t,{get:e[t],enumerable:!0})};var nf={};qh(nf,{MeshoptDecoder:()=>Nx});var Nx,sf=Pf(()=>{Nx=(function(){var s="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuixkbeeeddddillviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WboY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbrl79IV9Rbwq:VZkdbk:XYi5ud9:du8Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxcj;abad9Uc;WFbGcjdadca0EhmaialfgPar9Rgoadfhsavaoadz:jjjjbgzceVhHcbhOdndninaeaO9nmeaPax9RaD6mdamaeaO9RaOamfgoae6EgAcsfglc9WGhCabaOad2fhXaAcethQaxaDfhiaOaeaoaeao6E9RhLalcl4cifcd4hKazcj;cbfaAfhYcbh8AazcjdfhEaHh3incbh5dnawTmbaxa8Acd4fRbbh5kcbh8Eazcj;cbfhqinaih8Fdndndndna5a8Ecet4ciGgoc9:fPdebdkaPa8F9RaA6mrazcj;cbfa8EaA2fa8FaAz:jjjjb8Aa8FaAfhixdkazcj;cbfa8EaA2fcbaAz:kjjjb8Aa8FhixekaPa8F9RaK6mva8FaKfhidnaCTmbaPai9RcK6mbaocdtc:q:G:cjbfcj:G:cjbawEhaczhrcbhlinargoc9Wfghaqfhrdndndndndndnaaa8Fahco4fRbbalcoG4ciGcdtfydbPDbedvivvvlvkar9cb83bwar9cb83bbxlkarcbaiRbdai8Xbb9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbaqaofgrcGfcbaicdfa8J9c8N1:NfghRbbag9cjjjjjw:dg8J9qE86bbarcVfcbaha8J9c8M1:NfghRbbag9cjjjjjl:dg8J9qE86bbarc7fcbaha8J9c8L1:NfghRbbag9cjjjjjd:dg8J9qE86bbarctfcbaha8J9c8K1:NfghRbbag9cjjjjje:dg8J9qE86bbarc91fcbaha8J9c8J1:NfghRbbag9cjjjj;ab:dg8J9qE86bbarc4fcbaha8J9cg1:NfghRbbag9cjjjja:dg8J9qE86bbarc93fcbaha8J9ch1:NfghRbbag9cjjjjz:dgg9qE86bbarc94fcbahag9ca1:NfghRbbai8Xbe9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbarc95fcbaha8J9c8N1:NfgiRbbag9cjjjjjw:dg8J9qE86bbarc96fcbaia8J9c8M1:NfgiRbbag9cjjjjjl:dg8J9qE86bbarc97fcbaia8J9c8L1:NfgiRbbag9cjjjjjd:dg8J9qE86bbarc98fcbaia8J9c8K1:NfgiRbbag9cjjjjje:dg8J9qE86bbarc99fcbaia8J9c8J1:NfgiRbbag9cjjjj;ab:dg8J9qE86bbarc9:fcbaia8J9cg1:NfgiRbbag9cjjjja:dg8J9qE86bbarcufcbaia8J9ch1:NfgiRbbag9cjjjjz:dgg9qE86bbaiag9ca1:NfhixikaraiRblaiRbbghco4g8Ka8KciSg8KE86bbaqaofgrcGfaiclfa8Kfg8KRbbahcl4ciGg8La8LciSg8LE86bbarcVfa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc7fa8Ka8Lfg8KRbbahciGghahciSghE86bbarctfa8Kahfg8KRbbaiRbeghco4g8La8LciSg8LE86bbarc91fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc4fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc93fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc94fa8Kahfg8KRbbaiRbdghco4g8La8LciSg8LE86bbarc95fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc96fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc97fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc98fa8KahfghRbbaiRbigico4g8Ka8KciSg8KE86bbarc99faha8KfghRbbaicl4ciGg8Ka8KciSg8KE86bbarc9:faha8KfghRbbaicd4ciGg8Ka8KciSg8KE86bbarcufaha8KfgrRbbaiciGgiaiciSgiE86bbaraifhixdkaraiRbwaiRbbghcl4g8Ka8KcsSg8KE86bbaqaofgrcGfaicwfa8Kfg8KRbbahcsGghahcsSghE86bbarcVfa8KahfghRbbaiRbeg8Kcl4g8La8LcsSg8LE86bbarc7faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarctfaha8KfghRbbaiRbdg8Kcl4g8La8LcsSg8LE86bbarc91faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc4faha8KfghRbbaiRbig8Kcl4g8La8LcsSg8LE86bbarc93faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc94faha8KfghRbbaiRblg8Kcl4g8La8LcsSg8LE86bbarc95faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc96faha8KfghRbbaiRbvg8Kcl4g8La8LcsSg8LE86bbarc97faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc98faha8KfghRbbaiRbog8Kcl4g8La8LcsSg8LE86bbarc99faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc9:faha8KfghRbbaiRbrgicl4g8Ka8KcsSg8KE86bbarcufaha8KfgrRbbaicsGgiaicsSgiE86bbaraifhixekarai8Pbw83bwarai8Pbb83bbaiczfhikdnaoaC9pmbalcdfhlaoczfhraPai9RcL0mekkaoaC6moaimexokaCmva8FTmvkaqaAfhqa8Ecefg8Ecl9hmbkdndndndnawTmbasa8Acd4fRbbgociGPlbedrbkaATmdaza8Afh8Fazcj;cbfhhcbh8EaEhaina8FRbbhraahocbhlinaoahalfRbbgqce4cbaqceG9R7arfgr86bbaoadfhoaAalcefgl9hmbkaacefhaa8Fcefh8FahaAfhha8Ecefg8Ecl9hmbxikkaATmeaza8Afhaazcj;cbfhhcbhoceh8EaYh8FinaEaofhlaa8Vbbhrcbhoinala8FaofRbbcwtahaofRbbgqVc;:FiGce4cbaqceG9R7arfgr87bbaladfhlaLaocefgofmbka8FaQfh8FcdhoaacdfhaahaQfhha8EceGhlcbh8EalmbxdkkaATmbaocl4h8Eaza8AfRbbhqcwhoa3hlinalRbbaotaqVhqalcefhlaocwfgoca9hmbkcbhhaEh8FaYhainazcj;cbfahfRbbhrcwhoaahlinalRbbaotarVhralaAfhlaocwfgoca9hmbkara8E94aq7hqcbhoa8Fhlinalaqao486bbalcefhlaocwfgoca9hmbka8Fadfh8FaacefhaahcefghaA9hmbkkaEclfhEa3clfh3a8Aclfg8Aad6mbkaXazcjdfaAad2z:jjjjb8AazazcjdfaAcufad2fadz:jjjjb8AaAaOfhOaihxaimbkc9:hoxdkcbc99aPax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaok:ysezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:kjjjb8Aav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk:4ioiue99dud99dud99dnaeTmbcbhiabhlindndnal8Uebgv:YgoJ:ji:1Salcof8UebgrciVgw:Y:vgDNJbbbZJbbb:;avcu9kEMgq:lJbbb9p9DTmbaq:Ohkxekcjjjj94hkkalclf8Uebhvalcdf8UebhxalarcefciGcetfak87ebdndnax:YgqaDNJbbbZJbbb:;axcu9kEMgm:lJbbb9p9DTmbam:Ohxxekcjjjj94hxkabaiarciGgkfcd7cetfax87ebdndnav:YgmaDNJbbbZJbbb:;avcu9kEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkalarcufciGcetfav87ebdndnawaw2:ZgPaPMaoaoN:taqaqN:tamamN:tgoJbbbbaoJbbbb9GE:raDNJbbbZMgD:lJbbb9p9DTmbaD:Ohrxekcjjjj94hrkalakcetfar87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk:Tvirud99eudndnadcl9hmbaeTmeindndnabRbbgiabcefgl8Sbbgvabcdfgo8Sbbgrf9R:YJbbuJabcifgwRbbgdce4adVgDcd4aDVgDcl4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax86bbdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao86bbdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai86bbdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad86bbabclfhbaecufgembxdkkaeTmbindndnab8Vebgiabcdfgl8Uebgvabclfgo8Uebgrf9R:YJbFu9habcofgw8Vebgdce4adVgDcd4aDVgDcl4aDVgDcw4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax87ebdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao87ebdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai87ebdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad87ebabcwfhbaecufgembkkk9teiucbcbyd:K:G:cjbgeabcifc98GfgbBd:K:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkk83dbcj:Gdk8Kbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbc:K:Gdkl8W:qbb",e="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuixkbbebeeddddilve9Weeeviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WbwY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbDl79IV9Rbqq:W9Dklbzik94evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaeai86b:q:W:cjbaecitab8Piw83i:q:G:cjbaecefgecjd9hmbkk:JBl8Aud97dur978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaialfgxar9RhodnadTgmmbavaoad;8qbbkaicefhPcj;abad9Uc;WFbGcjdadca0EhsdndndnadTmbaoadfhzcbhHinaeaH9nmdaxaP9RaD6miabaHad2fhOaPaDfhAasaeaH9RaHasfae6EgCcsfgocl4cifcd4hXavcj;cbfaoc9WGgQcetfhLavcj;cbfaQci2fhKavcj;cbfaQfhYcbh8Aaoc;ab6hEincbh3dnawTmbaPa8Acd4fRbbh3kcbh5avcj;cbfh8Eindndndndna3a5cet4ciGgoc9:fPdebdkaxaA9RaQ6mwdnaQTmbavcj;cbfa5aQ2faAaQ;8qbbkaAaCfhAxdkaQTmeavcj;cbfa5aQ2fcbaQ;8kbxekaxaA9RaX6moaoclVcbawEhraAaXfhocbhidnaEmbaxao9Rc;Gb6mbcbhlina8EalfhidndndndndndnaAalco4fRbbgqciGarfPDbedibledibkaipxbbbbbbbbbbbbbbbbpklbxlkaiaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiaopbbbpklbaoczfhoxekaiaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcd4ciGarfPDbedibledibkaiczfpxbbbbbbbbbbbbbbbbpklbxlkaiczfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiczfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiczfaopbbbpklbaoczfhoxekaiczfaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcl4ciGarfPDbedibledibkaicafpxbbbbbbbbbbbbbbbbpklbxlkaicafaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaicafaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaicafaopbbbpklbaoczfhoxekaicafaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqco4arfPDbedibledibkaic8Wfpxbbbbbbbbbbbbbbbbpklbxlkaic8Wfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaoclffaqRb:q:W:cjbfhoxikaic8Wfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaocwffaqRb:q:W:cjbfhoxdkaic8Wfaopbbbpklbaoczfhoxekaic8WfaopbbdaoRbbgicitpbi:q:G:cjbaiRb:q:W:cjbgipsaoRbegqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbaiaocdffaqRb:q:W:cjbfhokalc;abfhialcjefaQ0meaihlaxao9Rc;Fb0mbkkdnaiaQ9pmbaici4hlinaxao9RcK6mwa8EaifhqdndndndndndnaAaico4fRbbalcoG4ciGarfPDbedibledibkaqpxbbbbbbbbbbbbbbbbpkbbxlkaqaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaoclffagRb:q:W:cjbfhoxikaqaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaocwffagRb:q:W:cjbfhoxdkaqaopbbbpkbbaoczfhoxekaqaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpkbbahaocdffagRb:q:W:cjbfhokalcdfhlaiczfgiaQ6mbkkaohAaoTmoka8EaQfh8Ea5cefg5cl9hmbkdndndndnawTmbaza8Acd4fRbbglciGPlbedwbkaQTmdavcjdfa8Afhlava8Afpbdbh8Jcbhoinalavcj;cbfaofpblbg8KaYaofpblbg8LpmbzeHdOiAlCvXoQrLg8MaLaofpblbg8NaKaofpblbgypmbzeHdOiAlCvXoQrLg8PpmbezHdiOAlvCXorQLg8Fcep9Ta8Fpxeeeeeeeeeeeeeeeegap9op9Hp9rg8Fa8Jp9Ug8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9Abbbaladfgla8Ja8Ma8PpmwDKYqk8AExm35Ps8E8Fg8Fcep9Ta8Faap9op9Hp9rg8Fp9Ug8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9Abbbaladfgla8Ja8Ka8LpmwKDYq8AkEx3m5P8Es8Fg8Ka8NaypmwKDYq8AkEx3m5P8Es8Fg8LpmbezHdiOAlvCXorQLg8Fcep9Ta8Faap9op9Hp9rg8Fp9Ug8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp9Ug8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9Abbbaladfgla8Ja8Ka8LpmwDKYqk8AExm35Ps8E8Fg8Fcep9Ta8Faap9op9Hp9rg8Fp9Ugap9Abbbaladfglaaa8Fa8Fpmlvorlvorlvorlvorp9Ugap9Abbbaladfglaaa8Fa8FpmwDqkwDqkwDqkwDqkp9Ugap9Abbbaladfglaaa8Fa8FpmxmPsxmPsxmPsxmPsp9Ug8Jp9AbbbaladfhlaoczfgoaQ6mbxikkaQTmeavcjdfa8Afhlava8Afpbdbh8Jcbhoinalavcj;cbfaofpblbg8KaYaofpblbg8LpmbzeHdOiAlCvXoQrLg8MaLaofpblbg8NaKaofpblbgypmbzeHdOiAlCvXoQrLg8PpmbezHdiOAlvCXorQLg8Fcep:nea8Fpxebebebebebebebebgap9op:bep9rg8Fa8Jp:oeg8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9Abbbaladfgla8Ja8Ma8PpmwDKYqk8AExm35Ps8E8Fg8Fcep:nea8Faap9op:bep9rg8Fp:oeg8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9Abbbaladfgla8Ja8Ka8LpmwKDYq8AkEx3m5P8Es8Fg8Ka8NaypmwKDYq8AkEx3m5P8Es8Fg8LpmbezHdiOAlvCXorQLg8Fcep:nea8Faap9op:bep9rg8Fp:oeg8Jp9Abbbaladfgla8Ja8Fa8Fpmlvorlvorlvorlvorp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmwDqkwDqkwDqkwDqkp:oeg8Jp9Abbbaladfgla8Ja8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9Abbbaladfgla8Ja8Ka8LpmwDKYqk8AExm35Ps8E8Fg8Fcep:nea8Faap9op:bep9rg8Fp:oegap9Abbbaladfglaaa8Fa8Fpmlvorlvorlvorlvorp:oegap9Abbbaladfglaaa8Fa8FpmwDqkwDqkwDqkwDqkp:oegap9Abbbaladfglaaa8Fa8FpmxmPsxmPsxmPsxmPsp:oeg8Jp9AbbbaladfhlaoczfgoaQ6mbxdkkaQTmbcbhocbalcl4gl9Rc8FGhiavcjdfa8Afhrava8Afpbdbhainaravcj;cbfaofpblbg8JaYaofpblbg8KpmbzeHdOiAlCvXoQrLg8LaLaofpblbg8MaKaofpblbg8NpmbzeHdOiAlCvXoQrLgypmbezHdiOAlvCXorQLg8Faip:Rea8Falp:Tep9qg8Faap9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8LaypmwDKYqk8AExm35Ps8E8Fg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8Ja8KpmwKDYq8AkEx3m5P8Es8Fg8Ja8Ma8NpmwKDYq8AkEx3m5P8Es8Fg8KpmbezHdiOAlvCXorQLg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8Ja8KpmwDKYqk8AExm35Ps8E8Fg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9AbbbaradfhraoczfgoaQ6mbkka8Aclfg8Aad6mbkdnaCad2goTmbaOavcjdfao;8qbbkdnammbavavcjdfaCcufad2fad;8qbbkaCaHfhHc9:hoaAhPaAmbxlkkaeTmbaDalfhrcbhocuhlinaralaD9RglfaD6mdasaeao9Raoasfae6Eaofgoae6mbkaial9RhPkcbc99axaP9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaokwbz:bjjjbkNsezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk;Toio97eue97aec98Ghedndnadcl9hmbaeTmecbhdinababpbbbgicKp:RecKp:Sep;6eglaicwp:RecKp:Sep;6ealp;Geaiczp:RecKp:Sep;6egvp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgwp9op9rp;Keglpxbb;:9cbb;:9cbb;:9cbb;:9calalp;Meaoaop;Meavaravawp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFbbbFbbbFbbbFbbbp9oaipxbbbFbbbFbbbFbbbFp9op9qalavp;Mearp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaoavp;Mearp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgDaDpbbbgipxbbbbbbFFbbbbbbFFgwp9oabpbbbgoaipmbediwDqkzHOAKY8AEgvczp:Reczp:Sep;6eglaoaipmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eavczp:Sep;6egvp;Gealp;Gep;Kep;Legipxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgqp9op9rp;Keglpxb;:FSb;:FSb;:FSb;:FSalalp;Meaiaip;Meavaravaqp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbp9oaiavp;Mearp;Keczp:Rep9qgialavp;Mearp;KepxFFbbFFbbFFbbFFbbp9oglpmwDKYqk8AExm35Ps8E8Fp9qpkbbabaoawp9oaialpmbezHdiOAlvCXorQLp9qpkbbabcafhbadclfgdae6mbkkk;2ileue97euo97dnaec98GgiTmbcbheinabcKfpx:ji:1S:ji:1S:ji:1S:ji:1SabpbbbglabczfgvpbbbgopmlvorxmPsCXQL358E8Fgrczp:Segwpxibbbibbbibbbibbbp9qp;6egDp;NegqaDaDp;MegDaDp;KealaopmbediwDqkzHOAKY8AEgDczp:Reczp:Sep;6eglalp;MeaDczp:Sep;6egoaop;Mearczp:Reczp:Sep;6egrarp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gDp;KepxFFbbFFbbFFbbFFbbgkp9oaqaop;MeaDp;Keczp:Rep9qgoaqalp;MeaDp;Keakp9oaqarp;MeaDp;Keczp:Rep9qgDpmwDKYqk8AExm35Ps8E8Fglp5eawclp:RegqpEi:T:j83ibavalp5baqpEd:T:j83ibabcwfaoaDpmbezHdiOAlvCXorQLgDp5eaqpEe:T:j83ibabaDp5baqpEb:T:j83ibabcafhbaeclfgeai6mbkkkuee97dnadcd4ae2c98GgeTmbcbhdinababpbbbgicwp:Recwp:Sep;6eaicep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbabczfhbadclfgdae6mbkkk:Sodw97euaec98Ghedndnadcl9hmbaeTmecbhdinabpxbbuJbbuJbbuJbbuJabpbbbgicKp:TeglaicYp:Tep9qgvcdp:Teavp9qgvclp:Teavp9qgop;6ep;Negvaicwp:RecKp:SegraipxFbbbFbbbFbbbFbbbgwp9ogDp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oavaDarp:Xeaiczp:RecKp:Segip:Uep;6ep;Meaqp;Keawp9op9qavaDaraip:Uep:Xep;6ep;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qavaoalcep:Rep9oalpxebbbebbbebbbebbbp9op9qp;6ep;Meaqp;KecKp:Rep9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgkpxbFu9hbFu9hbFu9hbFu9habpbbbglakpbbbgrpmlvorxmPsCXQL358E8Fgvczp:TegqavcHp:Tep9qgicdp:Teaip9qgiclp:Teaip9qgicwp:Teaip9qgop;6ep;NegialarpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbglp9ograDczp:Segwp:Ueavczp:Reczp:SegDp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gvp;Kealp9oaiarawaDp:Uep:Xep;6ep;Meavp;Keczp:Rep9qgwaiaoaqcep:Rep9oaqpxebbbebbbebbbebbbp9op9qp;6ep;Meavp;Keczp:ReaiaDarp:Uep;6ep;Meavp;Kealp9op9qgipmwDKYqk8AExm35Ps8E8FpkbbabawaipmbezHdiOAlvCXorQLpkbbabcafhbadclfgdae6mbkkk9teiucbcbydj:G:cjbgeabcifc98GfgbBdj:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkxebcj:Gdklz:zbb",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var i=WebAssembly.validate(t)?o(e):o(s),r,a=WebAssembly.instantiate(i,{}).then(function(p){r=p.instance,r.exports.__wasm_call_ctors()});function o(p){for(var v=new Uint8Array(p.length),S=0;S<p.length;++S){var M=p.charCodeAt(S);v[S]=M>96?M-97:M>64?M-39:M+4}for(var E=0,S=0;S<p.length;++S)v[E++]=v[S]<60?n[v[S]]:(v[S]-60)*64+v[++S];return v.buffer.slice(0,E)}function c(p,v,S,M,E,T,C){var x=p.exports.sbrk,w=M+3&-4,L=x(w*E),R=x(T.length),O=new Uint8Array(p.exports.memory.buffer);O.set(T,R);var H=v(L,M,E,R,T.length);if(H==0&&C&&C(L,w,E),S.set(O.subarray(L,L+M*E)),x(L-x(0)),H!=0)throw new Error("Malformed buffer data: "+H)}var l={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp",COLOR:"meshopt_decodeFilterColor"},h={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},u=[],d=0;function f(p){var v={object:new Worker(p),pending:0,requests:{}};return v.object.onmessage=function(S){var M=S.data;v.pending-=M.count,v.requests[M.id][M.action](M.value),delete v.requests[M.id]},v}function g(p){for(var v="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(i)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+m.name+";"+c.toString()+m.toString(),S=new Blob([v],{type:"text/javascript"}),M=URL.createObjectURL(S),E=u.length;E<p;++E)u[E]=f(M);for(var E=p;E<u.length;++E)u[E].object.postMessage({});u.length=p,URL.revokeObjectURL(M)}function _(p,v,S,M,E){for(var T=u[0],C=1;C<u.length;++C)u[C].pending<T.pending&&(T=u[C]);return new Promise(function(x,w){var L=new Uint8Array(S),R=++d;T.pending+=p,T.requests[R]={resolve:x,reject:w},T.object.postMessage({id:R,count:p,size:v,source:L,mode:M,filter:E},[L.buffer])})}function m(p){var v=p.data;self.ready.then(function(S){if(!v.id)return self.close();try{var M=new Uint8Array(v.count*v.size);c(S,S.exports[v.mode],M,v.count,v.size,v.source,S.exports[v.filter]),self.postMessage({id:v.id,count:v.count,action:"resolve",value:M},[M.buffer])}catch(E){self.postMessage({id:v.id,count:v.count,action:"reject",value:E})}})}return{ready:a,supported:!0,useWorkers:function(p){g(p)},decodeVertexBuffer:function(p,v,S,M,E){c(r,r.exports.meshopt_decodeVertexBuffer,p,v,S,M,r.exports[l[E]])},decodeIndexBuffer:function(p,v,S,M){c(r,r.exports.meshopt_decodeIndexBuffer,p,v,S,M)},decodeIndexSequence:function(p,v,S,M){c(r,r.exports.meshopt_decodeIndexSequence,p,v,S,M)},decodeGltfBuffer:function(p,v,S,M,E,T){c(r,r.exports[h[E]],p,v,S,M,r.exports[l[T]])},decodeGltfBufferAsync:function(p,v,S,M,E){return u.length>0?_(p,v,S,h[M],l[E]):a.then(function(){var T=new Uint8Array(p*v);return c(r,r.exports[h[M]],T,p,v,S,r.exports[l[E]]),T})}}})()});var Uh={};qh(Uh,{AVATARS:()=>ji,AvatarStage:()=>ks,CSS:()=>Ph,Concierge:()=>on,DEFAULT_ASSET_BASE:()=>Hr,DEFAULT_AVATAR_ID:()=>Gs,DEFAULT_ENDPOINT:()=>Xr,MAX_CONTENT_CHARS:()=>cf,MAX_HISTORY_TURNS:()=>lc,MAX_KNOWLEDGE_CHARS:()=>lf,MAX_RECOMMENDATIONS:()=>pc,SpeechNarrator:()=>zs,ThreeConciergeElement:()=>Jr,VERSION:()=>Jx,askConcierge:()=>hc,avatarUrl:()=>qr,buildMorphMap:()=>rc,buildShoppingPayload:()=>_c,buildSitePayload:()=>cc,catalogSummary:()=>Fh,createLipsync:()=>ac,createMic:()=>dc,createSseBuffer:()=>Rh,customAvatarEntry:()=>oc,default:()=>Zx,detectShop:()=>mc,drainSentences:()=>Nh,ensureStyles:()=>fc,escapeHtml:()=>en,estimateDurationMs:()=>Vr,fetchCatalog:()=>gc,fetchPolicies:()=>bc,getAvatar:()=>Wr,harvestSiteContext:()=>wh,micSupported:()=>uc,money:()=>yn,mount:()=>$x,normalizeProduct:()=>Lh,normalizeShopDomain:()=>Ki,parseIntent:()=>Dh,parseSseEvent:()=>Eh,registerElement:()=>yc,renderMarkdown:()=>Vs,searchProducts:()=>xc,shopOrigin:()=>Yi,stripMarkdown:()=>jr});var Ru=0,al=1,Cu=2;var Tr=1,Pu=2,Es=3,mn=0,Pt=1,rn=2,Nn=0,Pi=1,ol=2,cl=3,ll=4,Iu=5;var hi=100,Lu=101,Du=102,Fu=103,Nu=104,Uu=200,Ou=201,ku=202,Bu=203,wa=204,Ea=205,zu=206,Gu=207,Vu=208,Hu=209,Wu=210,qu=211,Xu=212,ju=213,Ku=214,Ra=0,Ca=1,Pa=2,Ii=3,Ia=4,La=5,Da=6,Fa=7,io=0,Yu=1,Ju=2,xn=0,hl=1,ul=2,dl=3,wr=4,fl=5,pl=6,ml=7,Jc="attached",$u="detached",gl=300,gi=301,Vi=302,so=303,ro=304,Er=306,ui=1e3,sn=1001,fs=1002,xt=1003,ao=1004;var Hi=1005;var _t=1006,Rs=1007;var _n=1008;var qt=1009,bl=1010,xl=1011,Cs=1012,oo=1013,vn=1014,Zt=1015,Un=1016,co=1017,lo=1018,Ps=1020,_l=35902,vl=35899,yl=1021,Ml=1022,Qt=1023,En=1026,bi=1027,ho=1028,uo=1029,xi=1030,fo=1031;var po=1033,Rr=33776,Cr=33777,Pr=33778,Ir=33779,mo=35840,go=35841,bo=35842,xo=35843,_o=36196,vo=37492,yo=37496,Mo=37488,So=37489,Lr=37490,Ao=37491,To=37808,wo=37809,Eo=37810,Ro=37811,Co=37812,Po=37813,Io=37814,Lo=37815,Do=37816,Fo=37817,No=37818,Uo=37819,Oo=37820,ko=37821,Bo=36492,zo=36494,Go=36495,Vo=36283,Ho=36284,Dr=36285,Wo=36286,Zu=2200,Fr=2201,Qu=2202,Li=2300,Di=2301,Ta=2302,$c=2303,Ri=2400,Ci=2401,Qs=2402,qo=2500,ed=2501,Sl=0,Nr=1,Is=2,td=3200;var Ur=0,nd=1,Qn="",bt="srgb",kt="srgb-linear",er="linear",Ye="srgb";var Ei=7680;var Zc=519,id=512,sd=513,rd=514,Xo=515,ad=516,od=517,jo=518,cd=519,Na=35044;var Al="300 es",dn=2e3,ps=2001;function If(s){for(let e=s.length-1;e>=0;--e)if(s[e]>=65535)return!0;return!1}function Lf(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function ms(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function ld(){let s=ms("canvas");return s.style.display="block",s}var Xh={},gs=null;function tr(...s){let e="THREE."+s.shift();gs?gs("log",e,...s):console.log(e,...s)}function hd(s){let e=s[0];if(typeof e=="string"&&e.startsWith("TSL:")){let t=s[1];t&&t.isStackTrace?s[0]+=" "+t.getLocation():s[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return s}function _e(...s){s=hd(s);let e="THREE."+s.shift();if(gs)gs("warn",e,...s);else{let t=s[0];t&&t.isStackTrace?console.warn(t.getError(e)):console.warn(e,...s)}}function we(...s){s=hd(s);let e="THREE."+s.shift();if(gs)gs("error",e,...s);else{let t=s[0];t&&t.isStackTrace?console.error(t.getError(e)):console.error(e,...s)}}function Ua(...s){let e=s.join(" ");e in Xh||(Xh[e]=!0,_e(...s))}function ud(s,e,t){return new Promise(function(n,i){function r(){switch(s.clientWaitSync(e,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:i();break;case s.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:n()}}setTimeout(r,t)})}var dd={[Ra]:Ca,[Pa]:Da,[Ia]:Fa,[Ii]:La,[Ca]:Ra,[Da]:Pa,[Fa]:Ia,[La]:Ii},gn=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let i=n[e];if(i!==void 0){let r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let i=n.slice(0);for(let r=0,a=i.length;r<a;r++)i[r].call(this,e);e.target=null}}},Lt=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],jh=1234567,$s=Math.PI/180,Fi=180/Math.PI;function pn(){let s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Lt[s&255]+Lt[s>>8&255]+Lt[s>>16&255]+Lt[s>>24&255]+"-"+Lt[e&255]+Lt[e>>8&255]+"-"+Lt[e>>16&15|64]+Lt[e>>24&255]+"-"+Lt[t&63|128]+Lt[t>>8&255]+"-"+Lt[t>>16&255]+Lt[t>>24&255]+Lt[n&255]+Lt[n>>8&255]+Lt[n>>16&255]+Lt[n>>24&255]).toLowerCase()}function Ve(s,e,t){return Math.max(e,Math.min(t,s))}function Tl(s,e){return(s%e+e)%e}function Df(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function Ff(s,e,t){return s!==e?(t-s)/(e-s):0}function Zs(s,e,t){return(1-t)*s+t*e}function Nf(s,e,t,n){return Zs(s,e,1-Math.exp(-t*n))}function Uf(s,e=1){return e-Math.abs(Tl(s,e*2)-e)}function Of(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function kf(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function Bf(s,e){return s+Math.floor(Math.random()*(e-s+1))}function zf(s,e){return s+Math.random()*(e-s)}function Gf(s){return s*(.5-Math.random())}function Vf(s){s!==void 0&&(jh=s);let e=jh+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Hf(s){return s*$s}function Wf(s){return s*Fi}function qf(s){return(s&s-1)===0&&s!==0}function Xf(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function jf(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function Kf(s,e,t,n,i){let r=Math.cos,a=Math.sin,o=r(t/2),c=a(t/2),l=r((e+n)/2),h=a((e+n)/2),u=r((e-n)/2),d=a((e-n)/2),f=r((n-e)/2),g=a((n-e)/2);switch(i){case"XYX":s.set(o*h,c*u,c*d,o*l);break;case"YZY":s.set(c*d,o*h,c*u,o*l);break;case"ZXZ":s.set(c*u,c*d,o*h,o*l);break;case"XZX":s.set(o*h,c*g,c*f,o*l);break;case"YXY":s.set(c*f,o*h,c*g,o*l);break;case"ZYZ":s.set(c*g,c*f,o*h,o*l);break;default:_e("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function un(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function Je(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}var Or={DEG2RAD:$s,RAD2DEG:Fi,generateUUID:pn,clamp:Ve,euclideanModulo:Tl,mapLinear:Df,inverseLerp:Ff,lerp:Zs,damp:Nf,pingpong:Uf,smoothstep:Of,smootherstep:kf,randInt:Bf,randFloat:zf,randFloatSpread:Gf,seededRandom:Vf,degToRad:Hf,radToDeg:Wf,isPowerOfTwo:qf,ceilPowerOfTwo:Xf,floorPowerOfTwo:jf,setQuaternionFromProperEuler:Kf,normalize:Je,denormalize:un},Pl=class Pl{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Ve(this.x,e.x,t.x),this.y=Ve(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ve(this.x,e,t),this.y=Ve(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ve(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ve(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*n-a*i+e.x,this.y=r*i+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};Pl.prototype.isVector2=!0;var He=Pl,Ft=class{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,a,o){let c=n[i+0],l=n[i+1],h=n[i+2],u=n[i+3],d=r[a+0],f=r[a+1],g=r[a+2],_=r[a+3];if(u!==_||c!==d||l!==f||h!==g){let m=c*d+l*f+h*g+u*_;m<0&&(d=-d,f=-f,g=-g,_=-_,m=-m);let p=1-o;if(m<.9995){let v=Math.acos(m),S=Math.sin(v);p=Math.sin(p*v)/S,o=Math.sin(o*v)/S,c=c*p+d*o,l=l*p+f*o,h=h*p+g*o,u=u*p+_*o}else{c=c*p+d*o,l=l*p+f*o,h=h*p+g*o,u=u*p+_*o;let v=1/Math.sqrt(c*c+l*l+h*h+u*u);c*=v,l*=v,h*=v,u*=v}}e[t]=c,e[t+1]=l,e[t+2]=h,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,i,r,a){let o=n[i],c=n[i+1],l=n[i+2],h=n[i+3],u=r[a],d=r[a+1],f=r[a+2],g=r[a+3];return e[t]=o*g+h*u+c*f-l*d,e[t+1]=c*g+h*d+l*u-o*f,e[t+2]=l*g+h*f+o*d-c*u,e[t+3]=h*g-o*u-c*d-l*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,i=e._y,r=e._z,a=e._order,o=Math.cos,c=Math.sin,l=o(n/2),h=o(i/2),u=o(r/2),d=c(n/2),f=c(i/2),g=c(r/2);switch(a){case"XYZ":this._x=d*h*u+l*f*g,this._y=l*f*u-d*h*g,this._z=l*h*g+d*f*u,this._w=l*h*u-d*f*g;break;case"YXZ":this._x=d*h*u+l*f*g,this._y=l*f*u-d*h*g,this._z=l*h*g-d*f*u,this._w=l*h*u+d*f*g;break;case"ZXY":this._x=d*h*u-l*f*g,this._y=l*f*u+d*h*g,this._z=l*h*g+d*f*u,this._w=l*h*u-d*f*g;break;case"ZYX":this._x=d*h*u-l*f*g,this._y=l*f*u+d*h*g,this._z=l*h*g-d*f*u,this._w=l*h*u+d*f*g;break;case"YZX":this._x=d*h*u+l*f*g,this._y=l*f*u+d*h*g,this._z=l*h*g-d*f*u,this._w=l*h*u-d*f*g;break;case"XZY":this._x=d*h*u-l*f*g,this._y=l*f*u-d*h*g,this._z=l*h*g+d*f*u,this._w=l*h*u+d*f*g;break;default:_e("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],i=t[4],r=t[8],a=t[1],o=t[5],c=t[9],l=t[2],h=t[6],u=t[10],d=n+o+u;if(d>0){let f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(h-c)*f,this._y=(r-l)*f,this._z=(a-i)*f}else if(n>o&&n>u){let f=2*Math.sqrt(1+n-o-u);this._w=(h-c)/f,this._x=.25*f,this._y=(i+a)/f,this._z=(r+l)/f}else if(o>u){let f=2*Math.sqrt(1+o-n-u);this._w=(r-l)/f,this._x=(i+a)/f,this._y=.25*f,this._z=(c+h)/f}else{let f=2*Math.sqrt(1+u-n-o);this._w=(a-i)/f,this._x=(r+l)/f,this._y=(c+h)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ve(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,i=e._y,r=e._z,a=e._w,o=t._x,c=t._y,l=t._z,h=t._w;return this._x=n*h+a*o+i*l-r*c,this._y=i*h+a*c+r*o-n*l,this._z=r*h+a*l+n*c-i*o,this._w=a*h-n*o-i*c-r*l,this._onChangeCallback(),this}slerp(e,t){let n=e._x,i=e._y,r=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,i=-i,r=-r,a=-a,o=-o);let c=1-t;if(o<.9995){let l=Math.acos(o),h=Math.sin(l);c=Math.sin(c*l)/h,t=Math.sin(t*l)/h,this._x=this._x*c+n*t,this._y=this._y*c+i*t,this._z=this._z*c+r*t,this._w=this._w*c+a*t,this._onChangeCallback()}else this._x=this._x*c+n*t,this._y=this._y*c+i*t,this._z=this._z*c+r*t,this._w=this._w*c+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Il=class Il{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Kh.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Kh.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,r=e.elements,a=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*a,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,i=this.z,r=e.x,a=e.y,o=e.z,c=e.w,l=2*(a*i-o*n),h=2*(o*t-r*i),u=2*(r*n-a*t);return this.x=t+c*l+a*u-o*h,this.y=n+c*h+o*l-r*u,this.z=i+c*u+r*h-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Ve(this.x,e.x,t.x),this.y=Ve(this.y,e.y,t.y),this.z=Ve(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ve(this.x,e,t),this.y=Ve(this.y,e,t),this.z=Ve(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ve(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,i=e.y,r=e.z,a=t.x,o=t.y,c=t.z;return this.x=i*c-r*o,this.y=r*a-n*c,this.z=n*o-i*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Ac.copy(this).projectOnVector(e),this.sub(Ac)}reflect(e){return this.sub(Ac.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ve(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};Il.prototype.isVector3=!0;var F=Il,Ac=new F,Kh=new Ft,Ll=class Ll{constructor(e,t,n,i,r,a,o,c,l){this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,a,o,c,l)}set(e,t,n,i,r,a,o,c,l){let h=this.elements;return h[0]=e,h[1]=i,h[2]=o,h[3]=t,h[4]=r,h[5]=c,h[6]=n,h[7]=a,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,r=this.elements,a=n[0],o=n[3],c=n[6],l=n[1],h=n[4],u=n[7],d=n[2],f=n[5],g=n[8],_=i[0],m=i[3],p=i[6],v=i[1],S=i[4],M=i[7],E=i[2],T=i[5],C=i[8];return r[0]=a*_+o*v+c*E,r[3]=a*m+o*S+c*T,r[6]=a*p+o*M+c*C,r[1]=l*_+h*v+u*E,r[4]=l*m+h*S+u*T,r[7]=l*p+h*M+u*C,r[2]=d*_+f*v+g*E,r[5]=d*m+f*S+g*T,r[8]=d*p+f*M+g*C,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],c=e[6],l=e[7],h=e[8];return t*a*h-t*o*l-n*r*h+n*o*c+i*r*l-i*a*c}invert(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],c=e[6],l=e[7],h=e[8],u=h*a-o*l,d=o*c-h*r,f=l*r-a*c,g=t*u+n*d+i*f;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);let _=1/g;return e[0]=u*_,e[1]=(i*l-h*n)*_,e[2]=(o*n-i*a)*_,e[3]=d*_,e[4]=(h*t-i*c)*_,e[5]=(i*r-o*t)*_,e[6]=f*_,e[7]=(n*c-l*t)*_,e[8]=(a*t-n*r)*_,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,a,o){let c=Math.cos(r),l=Math.sin(r);return this.set(n*c,n*l,-n*(c*a+l*o)+a+e,-i*l,i*c,-i*(-l*a+c*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Tc.makeScale(e,t)),this}rotate(e){return this.premultiply(Tc.makeRotation(-e)),this}translate(e,t){return this.premultiply(Tc.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}};Ll.prototype.isMatrix3=!0;var Pe=Ll,Tc=new Pe,Yh=new Pe().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Jh=new Pe().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Yf(){let s={enabled:!0,workingColorSpace:kt,spaces:{},convert:function(i,r,a){return this.enabled===!1||r===a||!r||!a||(this.spaces[r].transfer===Ye&&(i.r=Kn(i.r),i.g=Kn(i.g),i.b=Kn(i.b)),this.spaces[r].primaries!==this.spaces[a].primaries&&(i.applyMatrix3(this.spaces[r].toXYZ),i.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===Ye&&(i.r=ds(i.r),i.g=ds(i.g),i.b=ds(i.b))),i},workingToColorSpace:function(i,r){return this.convert(i,this.workingColorSpace,r)},colorSpaceToWorking:function(i,r){return this.convert(i,r,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Qn?er:this.spaces[i].transfer},getToneMappingMode:function(i){return this.spaces[i].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(i,r=this.workingColorSpace){return i.fromArray(this.spaces[r].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,r,a){return i.copy(this.spaces[r].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,r){return Ua("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),s.workingToColorSpace(i,r)},toWorkingColorSpace:function(i,r){return Ua("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),s.colorSpaceToWorking(i,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return s.define({[kt]:{primaries:e,whitePoint:n,transfer:er,toXYZ:Yh,fromXYZ:Jh,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:bt},outputColorSpaceConfig:{drawingBufferColorSpace:bt}},[bt]:{primaries:e,whitePoint:n,transfer:Ye,toXYZ:Yh,fromXYZ:Jh,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:bt}}}),s}var Be=Yf();function Kn(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function ds(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}var Zi,Oa=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Zi===void 0&&(Zi=ms("canvas")),Zi.width=e.width,Zi.height=e.height;let i=Zi.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=Zi}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=ms("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let a=0;a<r.length;a++)r[a]=Kn(r[a]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Kn(t[n]/255)*255):t[n]=Kn(t[n]);return{data:t,width:e.width,height:e.height}}else return _e("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},Jf=0,bs=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Jf++}),this.uuid=pn(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let a=0,o=i.length;a<o;a++)i[a].isDataTexture?r.push(wc(i[a].image)):r.push(wc(i[a]))}else r=wc(i);n.url=r}return t||(e.images[this.uuid]=n),n}};function wc(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap?Oa.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(_e("Texture: Unable to serialize Texture."),{})}var $f=0,Ec=new F,Ct=class s extends gn{constructor(e=s.DEFAULT_IMAGE,t=s.DEFAULT_MAPPING,n=sn,i=sn,r=_t,a=_n,o=Qt,c=qt,l=s.DEFAULT_ANISOTROPY,h=Qn){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:$f++}),this.uuid=pn(),this.name="",this.source=new bs(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=a,this.anisotropy=l,this.format=o,this.internalFormat=null,this.type=c,this.offset=new He(0,0),this.repeat=new He(1,1),this.center=new He(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Pe,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(Ec).x}get height(){return this.source.getSize(Ec).y}get depth(){return this.source.getSize(Ec).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(n===void 0){_e(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let i=this[t];if(i===void 0){_e(`Texture.setValues(): property '${t}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==gl)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ui:e.x=e.x-Math.floor(e.x);break;case sn:e.x=e.x<0?0:1;break;case fs:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case ui:e.y=e.y-Math.floor(e.y);break;case sn:e.y=e.y<0?0:1;break;case fs:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};Ct.DEFAULT_IMAGE=null;Ct.DEFAULT_MAPPING=gl;Ct.DEFAULT_ANISOTROPY=1;var Dl=class Dl{constructor(e=0,t=0,n=0,i=1){this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i+a[12]*r,this.y=a[1]*t+a[5]*n+a[9]*i+a[13]*r,this.z=a[2]*t+a[6]*n+a[10]*i+a[14]*r,this.w=a[3]*t+a[7]*n+a[11]*i+a[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r,c=e.elements,l=c[0],h=c[4],u=c[8],d=c[1],f=c[5],g=c[9],_=c[2],m=c[6],p=c[10];if(Math.abs(h-d)<.01&&Math.abs(u-_)<.01&&Math.abs(g-m)<.01){if(Math.abs(h+d)<.1&&Math.abs(u+_)<.1&&Math.abs(g+m)<.1&&Math.abs(l+f+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let S=(l+1)/2,M=(f+1)/2,E=(p+1)/2,T=(h+d)/4,C=(u+_)/4,x=(g+m)/4;return S>M&&S>E?S<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(S),i=T/n,r=C/n):M>E?M<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(M),n=T/i,r=x/i):E<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(E),n=C/r,i=x/r),this.set(n,i,r,t),this}let v=Math.sqrt((m-g)*(m-g)+(u-_)*(u-_)+(d-h)*(d-h));return Math.abs(v)<.001&&(v=1),this.x=(m-g)/v,this.y=(u-_)/v,this.z=(d-h)/v,this.w=Math.acos((l+f+p-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Ve(this.x,e.x,t.x),this.y=Ve(this.y,e.y,t.y),this.z=Ve(this.z,e.z,t.z),this.w=Ve(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ve(this.x,e,t),this.y=Ve(this.y,e,t),this.z=Ve(this.z,e,t),this.w=Ve(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ve(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};Dl.prototype.isVector4=!0;var nt=Dl,ka=class extends gn{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:_t,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new nt(0,0,e,t),this.scissorTest=!1,this.viewport=new nt(0,0,e,t),this.textures=[];let i={width:e,height:t,depth:n.depth},r=new Ct(i),a=n.count;for(let o=0;o<a;o++)this.textures[o]=r.clone(),this.textures[o].isRenderTargetTexture=!0,this.textures[o].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:_t,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=e,this.textures[i].image.height=t,this.textures[i].image.depth=n,this.textures[i].isData3DTexture!==!0&&(this.textures[i].isArrayTexture=this.textures[i].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let i=Object.assign({},e.textures[t].image);this.textures[t].source=new bs(i)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this}dispose(){this.dispatchEvent({type:"dispose"})}},Jt=class extends ka{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},nr=class extends Ct{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=xt,this.minFilter=xt,this.wrapR=sn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var Ba=class extends Ct{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=xt,this.minFilter=xt,this.wrapR=sn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var no=class no{constructor(e,t,n,i,r,a,o,c,l,h,u,d,f,g,_,m){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,a,o,c,l,h,u,d,f,g,_,m)}set(e,t,n,i,r,a,o,c,l,h,u,d,f,g,_,m){let p=this.elements;return p[0]=e,p[4]=t,p[8]=n,p[12]=i,p[1]=r,p[5]=a,p[9]=o,p[13]=c,p[2]=l,p[6]=h,p[10]=u,p[14]=d,p[3]=f,p[7]=g,p[11]=_,p[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new no().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,i=1/Qi.setFromMatrixColumn(e,0).length(),r=1/Qi.setFromMatrixColumn(e,1).length(),a=1/Qi.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,i=e.y,r=e.z,a=Math.cos(n),o=Math.sin(n),c=Math.cos(i),l=Math.sin(i),h=Math.cos(r),u=Math.sin(r);if(e.order==="XYZ"){let d=a*h,f=a*u,g=o*h,_=o*u;t[0]=c*h,t[4]=-c*u,t[8]=l,t[1]=f+g*l,t[5]=d-_*l,t[9]=-o*c,t[2]=_-d*l,t[6]=g+f*l,t[10]=a*c}else if(e.order==="YXZ"){let d=c*h,f=c*u,g=l*h,_=l*u;t[0]=d+_*o,t[4]=g*o-f,t[8]=a*l,t[1]=a*u,t[5]=a*h,t[9]=-o,t[2]=f*o-g,t[6]=_+d*o,t[10]=a*c}else if(e.order==="ZXY"){let d=c*h,f=c*u,g=l*h,_=l*u;t[0]=d-_*o,t[4]=-a*u,t[8]=g+f*o,t[1]=f+g*o,t[5]=a*h,t[9]=_-d*o,t[2]=-a*l,t[6]=o,t[10]=a*c}else if(e.order==="ZYX"){let d=a*h,f=a*u,g=o*h,_=o*u;t[0]=c*h,t[4]=g*l-f,t[8]=d*l+_,t[1]=c*u,t[5]=_*l+d,t[9]=f*l-g,t[2]=-l,t[6]=o*c,t[10]=a*c}else if(e.order==="YZX"){let d=a*c,f=a*l,g=o*c,_=o*l;t[0]=c*h,t[4]=_-d*u,t[8]=g*u+f,t[1]=u,t[5]=a*h,t[9]=-o*h,t[2]=-l*h,t[6]=f*u+g,t[10]=d-_*u}else if(e.order==="XZY"){let d=a*c,f=a*l,g=o*c,_=o*l;t[0]=c*h,t[4]=-u,t[8]=l*h,t[1]=d*u+_,t[5]=a*h,t[9]=f*u-g,t[2]=g*u-f,t[6]=o*h,t[10]=_*u+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Zf,e,Qf)}lookAt(e,t,n){let i=this.elements;return Kt.subVectors(e,t),Kt.lengthSq()===0&&(Kt.z=1),Kt.normalize(),ii.crossVectors(n,Kt),ii.lengthSq()===0&&(Math.abs(n.z)===1?Kt.x+=1e-4:Kt.z+=1e-4,Kt.normalize(),ii.crossVectors(n,Kt)),ii.normalize(),Qr.crossVectors(Kt,ii),i[0]=ii.x,i[4]=Qr.x,i[8]=Kt.x,i[1]=ii.y,i[5]=Qr.y,i[9]=Kt.y,i[2]=ii.z,i[6]=Qr.z,i[10]=Kt.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,r=this.elements,a=n[0],o=n[4],c=n[8],l=n[12],h=n[1],u=n[5],d=n[9],f=n[13],g=n[2],_=n[6],m=n[10],p=n[14],v=n[3],S=n[7],M=n[11],E=n[15],T=i[0],C=i[4],x=i[8],w=i[12],L=i[1],R=i[5],O=i[9],H=i[13],q=i[2],N=i[6],z=i[10],V=i[14],Z=i[3],Q=i[7],le=i[11],xe=i[15];return r[0]=a*T+o*L+c*q+l*Z,r[4]=a*C+o*R+c*N+l*Q,r[8]=a*x+o*O+c*z+l*le,r[12]=a*w+o*H+c*V+l*xe,r[1]=h*T+u*L+d*q+f*Z,r[5]=h*C+u*R+d*N+f*Q,r[9]=h*x+u*O+d*z+f*le,r[13]=h*w+u*H+d*V+f*xe,r[2]=g*T+_*L+m*q+p*Z,r[6]=g*C+_*R+m*N+p*Q,r[10]=g*x+_*O+m*z+p*le,r[14]=g*w+_*H+m*V+p*xe,r[3]=v*T+S*L+M*q+E*Z,r[7]=v*C+S*R+M*N+E*Q,r[11]=v*x+S*O+M*z+E*le,r[15]=v*w+S*H+M*V+E*xe,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],a=e[1],o=e[5],c=e[9],l=e[13],h=e[2],u=e[6],d=e[10],f=e[14],g=e[3],_=e[7],m=e[11],p=e[15],v=c*f-l*d,S=o*f-l*u,M=o*d-c*u,E=a*f-l*h,T=a*d-c*h,C=a*u-o*h;return t*(_*v-m*S+p*M)-n*(g*v-m*E+p*T)+i*(g*S-_*E+p*C)-r*(g*M-_*T+m*C)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],c=e[6],l=e[7],h=e[8],u=e[9],d=e[10],f=e[11],g=e[12],_=e[13],m=e[14],p=e[15],v=t*o-n*a,S=t*c-i*a,M=t*l-r*a,E=n*c-i*o,T=n*l-r*o,C=i*l-r*c,x=h*_-u*g,w=h*m-d*g,L=h*p-f*g,R=u*m-d*_,O=u*p-f*_,H=d*p-f*m,q=v*H-S*O+M*R+E*L-T*w+C*x;if(q===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let N=1/q;return e[0]=(o*H-c*O+l*R)*N,e[1]=(i*O-n*H-r*R)*N,e[2]=(_*C-m*T+p*E)*N,e[3]=(d*T-u*C-f*E)*N,e[4]=(c*L-a*H-l*w)*N,e[5]=(t*H-i*L+r*w)*N,e[6]=(m*M-g*C-p*S)*N,e[7]=(h*C-d*M+f*S)*N,e[8]=(a*O-o*L+l*x)*N,e[9]=(n*L-t*O-r*x)*N,e[10]=(g*T-_*M+p*v)*N,e[11]=(u*M-h*T-f*v)*N,e[12]=(o*w-a*R-c*x)*N,e[13]=(t*R-n*w+i*x)*N,e[14]=(_*S-g*E-m*v)*N,e[15]=(h*E-u*S+d*v)*N,this}scale(e){let t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),i=Math.sin(t),r=1-n,a=e.x,o=e.y,c=e.z,l=r*a,h=r*o;return this.set(l*a+n,l*o-i*c,l*c+i*o,0,l*o+i*c,h*o+n,h*c-i*a,0,l*c-i*o,h*c+i*a,r*c*c+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,a){return this.set(1,n,r,0,e,1,a,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){let i=this.elements,r=t._x,a=t._y,o=t._z,c=t._w,l=r+r,h=a+a,u=o+o,d=r*l,f=r*h,g=r*u,_=a*h,m=a*u,p=o*u,v=c*l,S=c*h,M=c*u,E=n.x,T=n.y,C=n.z;return i[0]=(1-(_+p))*E,i[1]=(f+M)*E,i[2]=(g-S)*E,i[3]=0,i[4]=(f-M)*T,i[5]=(1-(d+p))*T,i[6]=(m+v)*T,i[7]=0,i[8]=(g+S)*C,i[9]=(m-v)*C,i[10]=(1-(d+_))*C,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){let i=this.elements;e.x=i[12],e.y=i[13],e.z=i[14];let r=this.determinant();if(r===0)return n.set(1,1,1),t.identity(),this;let a=Qi.set(i[0],i[1],i[2]).length(),o=Qi.set(i[4],i[5],i[6]).length(),c=Qi.set(i[8],i[9],i[10]).length();r<0&&(a=-a),cn.copy(this);let l=1/a,h=1/o,u=1/c;return cn.elements[0]*=l,cn.elements[1]*=l,cn.elements[2]*=l,cn.elements[4]*=h,cn.elements[5]*=h,cn.elements[6]*=h,cn.elements[8]*=u,cn.elements[9]*=u,cn.elements[10]*=u,t.setFromRotationMatrix(cn),n.x=a,n.y=o,n.z=c,this}makePerspective(e,t,n,i,r,a,o=dn,c=!1){let l=this.elements,h=2*r/(t-e),u=2*r/(n-i),d=(t+e)/(t-e),f=(n+i)/(n-i),g,_;if(c)g=r/(a-r),_=a*r/(a-r);else if(o===dn)g=-(a+r)/(a-r),_=-2*a*r/(a-r);else if(o===ps)g=-a/(a-r),_=-a*r/(a-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return l[0]=h,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=u,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=g,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,i,r,a,o=dn,c=!1){let l=this.elements,h=2/(t-e),u=2/(n-i),d=-(t+e)/(t-e),f=-(n+i)/(n-i),g,_;if(c)g=1/(a-r),_=a/(a-r);else if(o===dn)g=-2/(a-r),_=-(a+r)/(a-r);else if(o===ps)g=-1/(a-r),_=-r/(a-r);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return l[0]=h,l[4]=0,l[8]=0,l[12]=d,l[1]=0,l[5]=u,l[9]=0,l[13]=f,l[2]=0,l[6]=0,l[10]=g,l[14]=_,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};no.prototype.isMatrix4=!0;var Ue=no,Qi=new F,cn=new Ue,Zf=new F(0,0,0),Qf=new F(1,1,1),ii=new F,Qr=new F,Kt=new F,$h=new Ue,Zh=new Ft,Rn=class s{constructor(e=0,t=0,n=0,i=s.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let i=e.elements,r=i[0],a=i[4],o=i[8],c=i[1],l=i[5],h=i[9],u=i[2],d=i[6],f=i[10];switch(t){case"XYZ":this._y=Math.asin(Ve(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,f),this._z=Math.atan2(-a,r)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Ve(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-u,r),this._z=0);break;case"ZXY":this._x=Math.asin(Ve(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-Ve(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(Ve(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-u,r)):(this._x=0,this._y=Math.atan2(o,f));break;case"XZY":this._z=Math.asin(-Ve(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-h,f),this._y=0);break;default:_e("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return $h.makeRotationFromQuaternion(e),this.setFromRotationMatrix($h,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Zh.setFromEuler(this),this.setFromQuaternion(Zh,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};Rn.DEFAULT_ORDER="XYZ";var ir=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},ep=0,Qh=new F,es=new Ft,Vn=new Ue,ea=new F,Hs=new F,tp=new F,np=new Ft,eu=new F(1,0,0),tu=new F(0,1,0),nu=new F(0,0,1),iu={type:"added"},ip={type:"removed"},ts={type:"childadded",child:null},Rc={type:"childremoved",child:null},ct=class s extends gn{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:ep++}),this.uuid=pn(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=s.DEFAULT_UP.clone();let e=new F,t=new Rn,n=new Ft,i=new F(1,1,1);function r(){n.setFromEuler(t,!1)}function a(){t.setFromQuaternion(n,void 0,!1)}t._onChange(r),n._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Ue},normalMatrix:{value:new Pe}}),this.matrix=new Ue,this.matrixWorld=new Ue,this.matrixAutoUpdate=s.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=s.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new ir,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return es.setFromAxisAngle(e,t),this.quaternion.multiply(es),this}rotateOnWorldAxis(e,t){return es.setFromAxisAngle(e,t),this.quaternion.premultiply(es),this}rotateX(e){return this.rotateOnAxis(eu,e)}rotateY(e){return this.rotateOnAxis(tu,e)}rotateZ(e){return this.rotateOnAxis(nu,e)}translateOnAxis(e,t){return Qh.copy(e).applyQuaternion(this.quaternion),this.position.add(Qh.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(eu,e)}translateY(e){return this.translateOnAxis(tu,e)}translateZ(e){return this.translateOnAxis(nu,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Vn.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?ea.copy(e):ea.set(e,t,n);let i=this.parent;this.updateWorldMatrix(!0,!1),Hs.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Vn.lookAt(Hs,ea,this.up):Vn.lookAt(ea,Hs,this.up),this.quaternion.setFromRotationMatrix(Vn),i&&(Vn.extractRotation(i.matrixWorld),es.setFromRotationMatrix(Vn),this.quaternion.premultiply(es.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(we("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(iu),ts.child=e,this.dispatchEvent(ts),ts.child=null):we("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}let t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(ip),Rc.child=e,this.dispatchEvent(Rc),Rc.child=null),this}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Vn.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Vn.multiply(e.parent.matrixWorld)),e.applyMatrix4(Vn),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(iu),ts.child=e,this.dispatchEvent(ts),ts.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){let a=this.children[n].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);let i=this.children;for(let r=0,a=i.length;r<a;r++)i[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Hs,e,tp),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Hs,np,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){let t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);let e=this.pivot;if(e!==null){let t=e.x,n=e.y,i=e.z,r=this.matrix.elements;r[12]+=t-r[0]*t-r[4]*n-r[8]*i,r[13]+=n-r[1]*t-r[5]*n-r[9]*i,r[14]+=i-r[2]*t-r[6]*n-r[10]*i}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){let n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){let i=this.children;for(let r=0,a=i.length;r<a;r++)i[r].updateWorldMatrix(!1,!0)}}toJSON(e){let t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),this.static!==!1&&(i.static=this.static),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.pivot!==null&&(i.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(i.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(i.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(o=>({...o})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function r(o,c){return o[c.uuid]===void 0&&(o[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);let o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){let c=o.shapes;if(Array.isArray(c))for(let l=0,h=c.length;l<h;l++){let u=c[l];r(e.shapes,u)}else r(e.shapes,c)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let o=[];for(let c=0,l=this.material.length;c<l;c++)o.push(r(e.materials,this.material[c]));i.material=o}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let o=0;o<this.children.length;o++)i.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let o=0;o<this.animations.length;o++){let c=this.animations[o];i.animations.push(r(e.animations,c))}}if(t){let o=a(e.geometries),c=a(e.materials),l=a(e.textures),h=a(e.images),u=a(e.shapes),d=a(e.skeletons),f=a(e.animations),g=a(e.nodes);o.length>0&&(n.geometries=o),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),h.length>0&&(n.images=h),u.length>0&&(n.shapes=u),d.length>0&&(n.skeletons=d),f.length>0&&(n.animations=f),g.length>0&&(n.nodes=g)}return n.object=i,n;function a(o){let c=[];for(let l in o){let h=o[l];delete h.metadata,c.push(h)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=e.pivot!==null?e.pivot.clone():null,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){let i=e.children[n];this.add(i.clone())}return this}};ct.DEFAULT_UP=new F(0,1,0);ct.DEFAULT_MATRIX_AUTO_UPDATE=!0;ct.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var fn=class extends ct{constructor(){super(),this.isGroup=!0,this.type="Group"}},sp={type:"move"},xs=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new fn,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new fn,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new F,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new F),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new fn,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new F,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new F,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,a=null,o=this._targetRay,c=this._grip,l=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(l&&e.hand){a=!0;for(let _ of e.hand.values()){let m=t.getJointPose(_,n),p=this._getHandJoint(l,_);m!==null&&(p.matrix.fromArray(m.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.matrixWorldNeedsUpdate=!0,p.jointRadius=m.radius),p.visible=m!==null}let h=l.joints["index-finger-tip"],u=l.joints["thumb-tip"],d=h.position.distanceTo(u.position),f=.02,g=.005;l.inputState.pinching&&d>f+g?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&d<=f-g&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1,c.eventsEnabled&&c.dispatchEvent({type:"gripUpdated",data:e,target:this})));o!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&r!==null&&(i=r),i!==null&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(sp)))}return o!==null&&(o.visible=i!==null),c!==null&&(c.visible=r!==null),l!==null&&(l.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new fn;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},fd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},si={h:0,s:0,l:0},ta={h:0,s:0,l:0};function Cc(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}var Te=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=bt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Be.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Be.workingColorSpace){return this.r=e,this.g=t,this.b=n,Be.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Be.workingColorSpace){if(e=Tl(e,1),t=Ve(t,0,1),n=Ve(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,a=2*n-r;this.r=Cc(a,r,e+1/3),this.g=Cc(a,r,e),this.b=Cc(a,r,e-1/3)}return Be.colorSpaceToWorking(this,i),this}setStyle(e,t=bt){function n(r){r!==void 0&&parseFloat(r)<1&&_e("Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r,a=i[1],o=i[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:_e("Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){let r=i[1],a=r.length;if(a===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(r,16),t);_e("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=bt){let n=fd[e.toLowerCase()];return n!==void 0?this.setHex(n,t):_e("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Kn(e.r),this.g=Kn(e.g),this.b=Kn(e.b),this}copyLinearToSRGB(e){return this.r=ds(e.r),this.g=ds(e.g),this.b=ds(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=bt){return Be.workingToColorSpace(Dt.copy(this),e),Math.round(Ve(Dt.r*255,0,255))*65536+Math.round(Ve(Dt.g*255,0,255))*256+Math.round(Ve(Dt.b*255,0,255))}getHexString(e=bt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Be.workingColorSpace){Be.workingToColorSpace(Dt.copy(this),t);let n=Dt.r,i=Dt.g,r=Dt.b,a=Math.max(n,i,r),o=Math.min(n,i,r),c,l,h=(o+a)/2;if(o===a)c=0,l=0;else{let u=a-o;switch(l=h<=.5?u/(a+o):u/(2-a-o),a){case n:c=(i-r)/u+(i<r?6:0);break;case i:c=(r-n)/u+2;break;case r:c=(n-i)/u+4;break}c/=6}return e.h=c,e.s=l,e.l=h,e}getRGB(e,t=Be.workingColorSpace){return Be.workingToColorSpace(Dt.copy(this),t),e.r=Dt.r,e.g=Dt.g,e.b=Dt.b,e}getStyle(e=bt){Be.workingToColorSpace(Dt.copy(this),e);let t=Dt.r,n=Dt.g,i=Dt.b;return e!==bt?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,t,n){return this.getHSL(si),this.setHSL(si.h+e,si.s+t,si.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(si),e.getHSL(ta);let n=Zs(si.h,ta.h,t),i=Zs(si.s,ta.s,t),r=Zs(si.l,ta.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Dt=new Te;Te.NAMES=fd;var Ni=class extends ct{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Rn,this.environmentIntensity=1,this.environmentRotation=new Rn,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}},ln=new F,Hn=new F,Pc=new F,Wn=new F,ns=new F,is=new F,su=new F,Ic=new F,Lc=new F,Dc=new F,Fc=new nt,Nc=new nt,Uc=new nt,li=class s{constructor(e=new F,t=new F,n=new F){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),ln.subVectors(e,t),i.cross(ln);let r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){ln.subVectors(i,t),Hn.subVectors(n,t),Pc.subVectors(e,t);let a=ln.dot(ln),o=ln.dot(Hn),c=ln.dot(Pc),l=Hn.dot(Hn),h=Hn.dot(Pc),u=a*l-o*o;if(u===0)return r.set(0,0,0),null;let d=1/u,f=(l*c-o*h)*d,g=(a*h-o*c)*d;return r.set(1-f-g,g,f)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Wn)===null?!1:Wn.x>=0&&Wn.y>=0&&Wn.x+Wn.y<=1}static getInterpolation(e,t,n,i,r,a,o,c){return this.getBarycoord(e,t,n,i,Wn)===null?(c.x=0,c.y=0,"z"in c&&(c.z=0),"w"in c&&(c.w=0),null):(c.setScalar(0),c.addScaledVector(r,Wn.x),c.addScaledVector(a,Wn.y),c.addScaledVector(o,Wn.z),c)}static getInterpolatedAttribute(e,t,n,i,r,a){return Fc.setScalar(0),Nc.setScalar(0),Uc.setScalar(0),Fc.fromBufferAttribute(e,t),Nc.fromBufferAttribute(e,n),Uc.fromBufferAttribute(e,i),a.setScalar(0),a.addScaledVector(Fc,r.x),a.addScaledVector(Nc,r.y),a.addScaledVector(Uc,r.z),a}static isFrontFacing(e,t,n,i){return ln.subVectors(n,t),Hn.subVectors(e,t),ln.cross(Hn).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ln.subVectors(this.c,this.b),Hn.subVectors(this.a,this.b),ln.cross(Hn).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return s.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return s.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return s.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return s.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return s.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,i=this.b,r=this.c,a,o;ns.subVectors(i,n),is.subVectors(r,n),Ic.subVectors(e,n);let c=ns.dot(Ic),l=is.dot(Ic);if(c<=0&&l<=0)return t.copy(n);Lc.subVectors(e,i);let h=ns.dot(Lc),u=is.dot(Lc);if(h>=0&&u<=h)return t.copy(i);let d=c*u-h*l;if(d<=0&&c>=0&&h<=0)return a=c/(c-h),t.copy(n).addScaledVector(ns,a);Dc.subVectors(e,r);let f=ns.dot(Dc),g=is.dot(Dc);if(g>=0&&f<=g)return t.copy(r);let _=f*l-c*g;if(_<=0&&l>=0&&g<=0)return o=l/(l-g),t.copy(n).addScaledVector(is,o);let m=h*g-f*u;if(m<=0&&u-h>=0&&f-g>=0)return su.subVectors(r,i),o=(u-h)/(u-h+(f-g)),t.copy(i).addScaledVector(su,o);let p=1/(m+_+d);return a=_*p,o=d*p,t.copy(n).addScaledVector(ns,a).addScaledVector(is,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},Bt=class{constructor(e=new F(1/0,1/0,1/0),t=new F(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(hn.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(hn.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=hn.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let r=n.getAttribute("position");if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let a=0,o=r.count;a<o;a++)e.isMesh===!0?e.getVertexPosition(a,hn):hn.fromBufferAttribute(r,a),hn.applyMatrix4(e.matrixWorld),this.expandByPoint(hn);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),na.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),na.copy(n.boundingBox)),na.applyMatrix4(e.matrixWorld),this.union(na)}let i=e.children;for(let r=0,a=i.length;r<a;r++)this.expandByObject(i[r],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,hn),hn.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ws),ia.subVectors(this.max,Ws),ss.subVectors(e.a,Ws),rs.subVectors(e.b,Ws),as.subVectors(e.c,Ws),ri.subVectors(rs,ss),ai.subVectors(as,rs),Si.subVectors(ss,as);let t=[0,-ri.z,ri.y,0,-ai.z,ai.y,0,-Si.z,Si.y,ri.z,0,-ri.x,ai.z,0,-ai.x,Si.z,0,-Si.x,-ri.y,ri.x,0,-ai.y,ai.x,0,-Si.y,Si.x,0];return!Oc(t,ss,rs,as,ia)||(t=[1,0,0,0,1,0,0,0,1],!Oc(t,ss,rs,as,ia))?!1:(sa.crossVectors(ri,ai),t=[sa.x,sa.y,sa.z],Oc(t,ss,rs,as,ia))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,hn).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(hn).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(qn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),qn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),qn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),qn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),qn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),qn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),qn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),qn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(qn),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},qn=[new F,new F,new F,new F,new F,new F,new F,new F],hn=new F,na=new Bt,ss=new F,rs=new F,as=new F,ri=new F,ai=new F,Si=new F,Ws=new F,ia=new F,sa=new F,Ai=new F;function Oc(s,e,t,n,i){for(let r=0,a=s.length-3;r<=a;r+=3){Ai.fromArray(s,r);let o=i.x*Math.abs(Ai.x)+i.y*Math.abs(Ai.y)+i.z*Math.abs(Ai.z),c=e.dot(Ai),l=t.dot(Ai),h=n.dot(Ai);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>o)return!1}return!0}var yt=new F,ra=new He,rp=0,St=class extends gn{constructor(e,t,n=!1){if(super(),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:rp++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=Na,this.updateRanges=[],this.gpuType=Zt,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)ra.fromBufferAttribute(this,t),ra.applyMatrix3(e),this.setXY(t,ra.x,ra.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)yt.fromBufferAttribute(this,t),yt.applyMatrix3(e),this.setXYZ(t,yt.x,yt.y,yt.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)yt.fromBufferAttribute(this,t),yt.applyMatrix4(e),this.setXYZ(t,yt.x,yt.y,yt.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)yt.fromBufferAttribute(this,t),yt.applyNormalMatrix(e),this.setXYZ(t,yt.x,yt.y,yt.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)yt.fromBufferAttribute(this,t),yt.transformDirection(e),this.setXYZ(t,yt.x,yt.y,yt.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=un(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Je(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=un(t,this.array)),t}setX(e,t){return this.normalized&&(t=Je(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=un(t,this.array)),t}setY(e,t){return this.normalized&&(t=Je(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=un(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Je(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=un(t,this.array)),t}setW(e,t){return this.normalized&&(t=Je(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Je(t,this.array),n=Je(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=Je(t,this.array),n=Je(n,this.array),i=Je(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=Je(t,this.array),n=Je(n,this.array),i=Je(i,this.array),r=Je(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Na&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}};var sr=class extends St{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var rr=class extends St{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Ot=class extends St{constructor(e,t,n){super(new Float32Array(e),t,n)}},ap=new Bt,qs=new F,kc=new F,Vt=class{constructor(e=new F,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):ap.setFromPoints(e).getCenter(n);let i=0;for(let r=0,a=e.length;r<a;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;qs.subVectors(e,this.center);let t=qs.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(qs,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(kc.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(qs.copy(e.center).add(kc)),this.expandByPoint(qs.copy(e.center).sub(kc))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},op=0,nn=new Ue,Bc=new ct,os=new F,Yt=new Bt,Xs=new Bt,Rt=new F,zt=class s extends gn{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:op++}),this.uuid=pn(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(If(e)?rr:sr)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let r=new Pe().getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return nn.makeRotationFromQuaternion(e),this.applyMatrix4(nn),this}rotateX(e){return nn.makeRotationX(e),this.applyMatrix4(nn),this}rotateY(e){return nn.makeRotationY(e),this.applyMatrix4(nn),this}rotateZ(e){return nn.makeRotationZ(e),this.applyMatrix4(nn),this}translate(e,t,n){return nn.makeTranslation(e,t,n),this.applyMatrix4(nn),this}scale(e,t,n){return nn.makeScale(e,t,n),this.applyMatrix4(nn),this}lookAt(e){return Bc.lookAt(e),Bc.updateMatrix(),this.applyMatrix4(Bc.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(os).negate(),this.translate(os.x,os.y,os.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let i=0,r=e.length;i<r;i++){let a=e[i];n.push(a.x,a.y,a.z||0)}this.setAttribute("position",new Ot(n,3))}else{let n=Math.min(e.length,t.count);for(let i=0;i<n;i++){let r=e[i];t.setXYZ(i,r.x,r.y,r.z||0)}e.length>t.count&&_e("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Bt);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){we("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new F(-1/0,-1/0,-1/0),new F(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){let r=t[n];Yt.setFromBufferAttribute(r),this.morphTargetsRelative?(Rt.addVectors(this.boundingBox.min,Yt.min),this.boundingBox.expandByPoint(Rt),Rt.addVectors(this.boundingBox.max,Yt.max),this.boundingBox.expandByPoint(Rt)):(this.boundingBox.expandByPoint(Yt.min),this.boundingBox.expandByPoint(Yt.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&we('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Vt);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){we("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new F,1/0);return}if(e){let n=this.boundingSphere.center;if(Yt.setFromBufferAttribute(e),t)for(let r=0,a=t.length;r<a;r++){let o=t[r];Xs.setFromBufferAttribute(o),this.morphTargetsRelative?(Rt.addVectors(Yt.min,Xs.min),Yt.expandByPoint(Rt),Rt.addVectors(Yt.max,Xs.max),Yt.expandByPoint(Rt)):(Yt.expandByPoint(Xs.min),Yt.expandByPoint(Xs.max))}Yt.getCenter(n);let i=0;for(let r=0,a=e.count;r<a;r++)Rt.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(Rt));if(t)for(let r=0,a=t.length;r<a;r++){let o=t[r],c=this.morphTargetsRelative;for(let l=0,h=o.count;l<h;l++)Rt.fromBufferAttribute(o,l),c&&(os.fromBufferAttribute(e,l),Rt.add(os)),i=Math.max(i,n.distanceToSquared(Rt))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&we('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){we("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,i=t.normal,r=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new St(new Float32Array(4*n.count),4));let a=this.getAttribute("tangent"),o=[],c=[];for(let x=0;x<n.count;x++)o[x]=new F,c[x]=new F;let l=new F,h=new F,u=new F,d=new He,f=new He,g=new He,_=new F,m=new F;function p(x,w,L){l.fromBufferAttribute(n,x),h.fromBufferAttribute(n,w),u.fromBufferAttribute(n,L),d.fromBufferAttribute(r,x),f.fromBufferAttribute(r,w),g.fromBufferAttribute(r,L),h.sub(l),u.sub(l),f.sub(d),g.sub(d);let R=1/(f.x*g.y-g.x*f.y);isFinite(R)&&(_.copy(h).multiplyScalar(g.y).addScaledVector(u,-f.y).multiplyScalar(R),m.copy(u).multiplyScalar(f.x).addScaledVector(h,-g.x).multiplyScalar(R),o[x].add(_),o[w].add(_),o[L].add(_),c[x].add(m),c[w].add(m),c[L].add(m))}let v=this.groups;v.length===0&&(v=[{start:0,count:e.count}]);for(let x=0,w=v.length;x<w;++x){let L=v[x],R=L.start,O=L.count;for(let H=R,q=R+O;H<q;H+=3)p(e.getX(H+0),e.getX(H+1),e.getX(H+2))}let S=new F,M=new F,E=new F,T=new F;function C(x){E.fromBufferAttribute(i,x),T.copy(E);let w=o[x];S.copy(w),S.sub(E.multiplyScalar(E.dot(w))).normalize(),M.crossVectors(T,w);let R=M.dot(c[x])<0?-1:1;a.setXYZW(x,S.x,S.y,S.z,R)}for(let x=0,w=v.length;x<w;++x){let L=v[x],R=L.start,O=L.count;for(let H=R,q=R+O;H<q;H+=3)C(e.getX(H+0)),C(e.getX(H+1)),C(e.getX(H+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new St(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let d=0,f=n.count;d<f;d++)n.setXYZ(d,0,0,0);let i=new F,r=new F,a=new F,o=new F,c=new F,l=new F,h=new F,u=new F;if(e)for(let d=0,f=e.count;d<f;d+=3){let g=e.getX(d+0),_=e.getX(d+1),m=e.getX(d+2);i.fromBufferAttribute(t,g),r.fromBufferAttribute(t,_),a.fromBufferAttribute(t,m),h.subVectors(a,r),u.subVectors(i,r),h.cross(u),o.fromBufferAttribute(n,g),c.fromBufferAttribute(n,_),l.fromBufferAttribute(n,m),o.add(h),c.add(h),l.add(h),n.setXYZ(g,o.x,o.y,o.z),n.setXYZ(_,c.x,c.y,c.z),n.setXYZ(m,l.x,l.y,l.z)}else for(let d=0,f=t.count;d<f;d+=3)i.fromBufferAttribute(t,d+0),r.fromBufferAttribute(t,d+1),a.fromBufferAttribute(t,d+2),h.subVectors(a,r),u.subVectors(i,r),h.cross(u),n.setXYZ(d+0,h.x,h.y,h.z),n.setXYZ(d+1,h.x,h.y,h.z),n.setXYZ(d+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Rt.fromBufferAttribute(e,t),Rt.normalize(),e.setXYZ(t,Rt.x,Rt.y,Rt.z)}toNonIndexed(){function e(o,c){let l=o.array,h=o.itemSize,u=o.normalized,d=new l.constructor(c.length*h),f=0,g=0;for(let _=0,m=c.length;_<m;_++){o.isInterleavedBufferAttribute?f=c[_]*o.data.stride+o.offset:f=c[_]*h;for(let p=0;p<h;p++)d[g++]=l[f++]}return new St(d,h,u)}if(this.index===null)return _e("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new s,n=this.index.array,i=this.attributes;for(let o in i){let c=i[o],l=e(c,n);t.setAttribute(o,l)}let r=this.morphAttributes;for(let o in r){let c=[],l=r[o];for(let h=0,u=l.length;h<u;h++){let d=l[h],f=e(d,n);c.push(f)}t.morphAttributes[o]=c}t.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let o=0,c=a.length;o<c;o++){let l=a[o];t.addGroup(l.start,l.count,l.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(e[l]=c[l]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let c in n){let l=n[c];e.data.attributes[c]=l.toJSON(e.data)}let i={},r=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],h=[];for(let u=0,d=l.length;u<d;u++){let f=l[u];h.push(f.toJSON(e.data))}h.length>0&&(i[c]=h,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let i=e.attributes;for(let l in i){let h=i[l];this.setAttribute(l,h.clone(t))}let r=e.morphAttributes;for(let l in r){let h=[],u=r[l];for(let d=0,f=u.length;d<f;d++)h.push(u[d].clone(t));this.morphAttributes[l]=h}this.morphTargetsRelative=e.morphTargetsRelative;let a=e.groups;for(let l=0,h=a.length;l<h;l++){let u=a[l];this.addGroup(u.start,u.count,u.materialIndex)}let o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());let c=e.boundingSphere;return c!==null&&(this.boundingSphere=c.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},_s=class{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Na,this.updateRanges=[],this.version=0,this.uuid=pn()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=pn()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=pn()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}},Ut=new F,vs=class s{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)Ut.fromBufferAttribute(this,t),Ut.applyMatrix4(e),this.setXYZ(t,Ut.x,Ut.y,Ut.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Ut.fromBufferAttribute(this,t),Ut.applyNormalMatrix(e),this.setXYZ(t,Ut.x,Ut.y,Ut.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Ut.fromBufferAttribute(this,t),Ut.transformDirection(e),this.setXYZ(t,Ut.x,Ut.y,Ut.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=un(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Je(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=Je(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Je(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Je(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Je(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=un(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=un(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=un(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=un(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Je(t,this.array),n=Je(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Je(t,this.array),n=Je(n,this.array),i=Je(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Je(t,this.array),n=Je(n,this.array),i=Je(i,this.array),r=Je(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(e===void 0){tr("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");let t=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return new St(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new s(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){tr("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");let t=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}},cp=0,Gt=class extends gn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:cp++}),this.uuid=pn(),this.name="",this.type="Material",this.blending=Pi,this.side=mn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=wa,this.blendDst=Ea,this.blendEquation=hi,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Te(0,0,0),this.blendAlpha=0,this.depthFunc=Ii,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Zc,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ei,this.stencilZFail=Ei,this.stencilZPass=Ei,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){_e(`Material: parameter '${t}' has value of undefined.`);continue}let i=this[t];if(i===void 0){_e(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Pi&&(n.blending=this.blending),this.side!==mn&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==wa&&(n.blendSrc=this.blendSrc),this.blendDst!==Ea&&(n.blendDst=this.blendDst),this.blendEquation!==hi&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Ii&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Zc&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ei&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Ei&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Ei&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(r){let a=[];for(let o in r){let c=r[o];delete c.metadata,a.push(c)}return a}if(t){let r=i(e.textures),a=i(e.images);r.length>0&&(n.textures=r),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let i=t.length;n=new Array(i);for(let r=0;r!==i;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};var Xn=new F,zc=new F,aa=new F,oi=new F,Gc=new F,oa=new F,Vc=new F,Ui=class{constructor(e=new F,t=new F(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Xn)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=Xn.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Xn.copy(this.origin).addScaledVector(this.direction,t),Xn.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){zc.copy(e).add(t).multiplyScalar(.5),aa.copy(t).sub(e).normalize(),oi.copy(this.origin).sub(zc);let r=e.distanceTo(t)*.5,a=-this.direction.dot(aa),o=oi.dot(this.direction),c=-oi.dot(aa),l=oi.lengthSq(),h=Math.abs(1-a*a),u,d,f,g;if(h>0)if(u=a*c-o,d=a*o-c,g=r*h,u>=0)if(d>=-g)if(d<=g){let _=1/h;u*=_,d*=_,f=u*(u+a*d+2*o)+d*(a*u+d+2*c)+l}else d=r,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*c)+l;else d=-r,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*c)+l;else d<=-g?(u=Math.max(0,-(-a*r+o)),d=u>0?-r:Math.min(Math.max(-r,-c),r),f=-u*u+d*(d+2*c)+l):d<=g?(u=0,d=Math.min(Math.max(-r,-c),r),f=d*(d+2*c)+l):(u=Math.max(0,-(a*r+o)),d=u>0?r:Math.min(Math.max(-r,-c),r),f=-u*u+d*(d+2*c)+l);else d=a>0?-r:r,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*c)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,u),i&&i.copy(zc).addScaledVector(aa,d),f}intersectSphere(e,t){Xn.subVectors(e.center,this.origin);let n=Xn.dot(this.direction),i=Xn.dot(Xn)-n*n,r=e.radius*e.radius;if(i>r)return null;let a=Math.sqrt(r-i),o=n-a,c=n+a;return c<0?null:o<0?this.at(c,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,a,o,c,l=1/this.direction.x,h=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,i=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,i=(e.min.x-d.x)*l),h>=0?(r=(e.min.y-d.y)*h,a=(e.max.y-d.y)*h):(r=(e.max.y-d.y)*h,a=(e.min.y-d.y)*h),n>a||r>i||((r>n||isNaN(n))&&(n=r),(a<i||isNaN(i))&&(i=a),u>=0?(o=(e.min.z-d.z)*u,c=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,c=(e.min.z-d.z)*u),n>c||o>i)||((o>n||n!==n)&&(n=o),(c<i||i!==i)&&(i=c),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,Xn)!==null}intersectTriangle(e,t,n,i,r){Gc.subVectors(t,e),oa.subVectors(n,e),Vc.crossVectors(Gc,oa);let a=this.direction.dot(Vc),o;if(a>0){if(i)return null;o=1}else if(a<0)o=-1,a=-a;else return null;oi.subVectors(this.origin,e);let c=o*this.direction.dot(oa.crossVectors(oi,oa));if(c<0)return null;let l=o*this.direction.dot(Gc.cross(oi));if(l<0||c+l>a)return null;let h=-o*oi.dot(Vc);return h<0?null:this.at(h/a,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},bn=class extends Gt{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Te(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Rn,this.combine=io,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},ru=new Ue,Ti=new Ui,ca=new Vt,au=new F,la=new F,ha=new F,ua=new F,Hc=new F,da=new F,ou=new F,fa=new F,lt=class extends ct{constructor(e=new zt,t=new bn){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=i.length;r<a;r++){let o=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}getVertexPosition(e,t){let n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(i,e);let o=this.morphTargetInfluences;if(r&&o){da.set(0,0,0);for(let c=0,l=r.length;c<l;c++){let h=o[c],u=r[c];h!==0&&(Hc.fromBufferAttribute(u,e),a?da.addScaledVector(Hc,h):da.addScaledVector(Hc.sub(t),h))}t.add(da)}return t}raycast(e,t){let n=this.geometry,i=this.material,r=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),ca.copy(n.boundingSphere),ca.applyMatrix4(r),Ti.copy(e.ray).recast(e.near),!(ca.containsPoint(Ti.origin)===!1&&(Ti.intersectSphere(ca,au)===null||Ti.origin.distanceToSquared(au)>(e.far-e.near)**2))&&(ru.copy(r).invert(),Ti.copy(e.ray).applyMatrix4(ru),!(n.boundingBox!==null&&Ti.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Ti)))}_computeIntersections(e,t,n){let i,r=this.geometry,a=this.material,o=r.index,c=r.attributes.position,l=r.attributes.uv,h=r.attributes.uv1,u=r.attributes.normal,d=r.groups,f=r.drawRange;if(o!==null)if(Array.isArray(a))for(let g=0,_=d.length;g<_;g++){let m=d[g],p=a[m.materialIndex],v=Math.max(m.start,f.start),S=Math.min(o.count,Math.min(m.start+m.count,f.start+f.count));for(let M=v,E=S;M<E;M+=3){let T=o.getX(M),C=o.getX(M+1),x=o.getX(M+2);i=pa(this,p,e,n,l,h,u,T,C,x),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=m.materialIndex,t.push(i))}}else{let g=Math.max(0,f.start),_=Math.min(o.count,f.start+f.count);for(let m=g,p=_;m<p;m+=3){let v=o.getX(m),S=o.getX(m+1),M=o.getX(m+2);i=pa(this,a,e,n,l,h,u,v,S,M),i&&(i.faceIndex=Math.floor(m/3),t.push(i))}}else if(c!==void 0)if(Array.isArray(a))for(let g=0,_=d.length;g<_;g++){let m=d[g],p=a[m.materialIndex],v=Math.max(m.start,f.start),S=Math.min(c.count,Math.min(m.start+m.count,f.start+f.count));for(let M=v,E=S;M<E;M+=3){let T=M,C=M+1,x=M+2;i=pa(this,p,e,n,l,h,u,T,C,x),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=m.materialIndex,t.push(i))}}else{let g=Math.max(0,f.start),_=Math.min(c.count,f.start+f.count);for(let m=g,p=_;m<p;m+=3){let v=m,S=m+1,M=m+2;i=pa(this,a,e,n,l,h,u,v,S,M),i&&(i.faceIndex=Math.floor(m/3),t.push(i))}}}};function lp(s,e,t,n,i,r,a,o){let c;if(e.side===Pt?c=n.intersectTriangle(a,r,i,!0,o):c=n.intersectTriangle(i,r,a,e.side===mn,o),c===null)return null;fa.copy(o),fa.applyMatrix4(s.matrixWorld);let l=t.ray.origin.distanceTo(fa);return l<t.near||l>t.far?null:{distance:l,point:fa.clone(),object:s}}function pa(s,e,t,n,i,r,a,o,c,l){s.getVertexPosition(o,la),s.getVertexPosition(c,ha),s.getVertexPosition(l,ua);let h=lp(s,e,t,n,la,ha,ua,ou);if(h){let u=new F;li.getBarycoord(ou,la,ha,ua,u),i&&(h.uv=li.getInterpolatedAttribute(i,o,c,l,u,new He)),r&&(h.uv1=li.getInterpolatedAttribute(r,o,c,l,u,new He)),a&&(h.normal=li.getInterpolatedAttribute(a,o,c,l,u,new F),h.normal.dot(n.direction)>0&&h.normal.multiplyScalar(-1));let d={a:o,b:c,c:l,normal:new F,materialIndex:0};li.getNormal(la,ha,ua,d.normal),h.face=d,h.barycoord=u}return h}var js=new nt,cu=new nt,lu=new nt,hp=new nt,hu=new Ue,ma=new F,Wc=new Vt,uu=new Ue,qc=new Ui,ar=class extends lt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Jc,this.bindMatrix=new Ue,this.bindMatrixInverse=new Ue,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){let e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Bt),this.boundingBox.makeEmpty();let t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,ma),this.boundingBox.expandByPoint(ma)}computeBoundingSphere(){let e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Vt),this.boundingSphere.makeEmpty();let t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,ma),this.boundingSphere.expandByPoint(ma)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){let n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Wc.copy(this.boundingSphere),Wc.applyMatrix4(i),e.ray.intersectsSphere(Wc)!==!1&&(uu.copy(i).invert(),qc.copy(e.ray).applyMatrix4(uu),!(this.boundingBox!==null&&qc.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,qc)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){let e=new nt,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);let r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===Jc?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===$u?this.bindMatrixInverse.copy(this.bindMatrix).invert():_e("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){let n=this.skeleton,i=this.geometry;cu.fromBufferAttribute(i.attributes.skinIndex,e),lu.fromBufferAttribute(i.attributes.skinWeight,e),t.isVector4?(js.copy(t),t.set(0,0,0,0)):(js.set(...t,1),t.set(0,0,0)),js.applyMatrix4(this.bindMatrix);for(let r=0;r<4;r++){let a=lu.getComponent(r);if(a!==0){let o=cu.getComponent(r);hu.multiplyMatrices(n.bones[o].matrixWorld,n.boneInverses[o]),t.addScaledVector(hp.copy(js).applyMatrix4(hu),a)}}return t.isVector4&&(t.w=js.w),t.applyMatrix4(this.bindMatrixInverse)}},ys=class extends ct{constructor(){super(),this.isBone=!0,this.type="Bone"}},Ms=class extends Ct{constructor(e=null,t=1,n=1,i,r,a,o,c,l=xt,h=xt,u,d){super(null,a,o,c,l,h,i,r,u,d),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},du=new Ue,up=new Ue,or=class s{constructor(e=[],t=[]){this.uuid=pn(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){let e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){_e("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Ue)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){let n=new Ue;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){let n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){let n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){let e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let r=0,a=e.length;r<a;r++){let o=e[r]?e[r].matrixWorld:up;du.multiplyMatrices(o,t[r]),du.toArray(n,r*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new s(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);let t=new Float32Array(e*e*4);t.set(this.boneMatrices);let n=new Ms(t,e,e,Qt,Zt);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){let i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){let r=e.bones[n],a=t[r];a===void 0&&(_e("Skeleton: No bone found with UUID:",r),a=new ys),this.bones.push(a),this.boneInverses.push(new Ue().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){let e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;let t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i<r;i++){let a=t[i];e.bones.push(a.uuid);let o=n[i];e.boneInverses.push(o.toArray())}return e}},di=class extends St{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){let e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}},cs=new Ue,fu=new Ue,ga=[],pu=new Bt,dp=new Ue,Ks=new lt,Ys=new Vt,Oi=class extends lt{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new di(new Float32Array(n*16),16),this.previousInstanceMatrix=null,this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<n;i++)this.setMatrixAt(i,dp)}computeBoundingBox(){let e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new Bt),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,cs),pu.copy(e.boundingBox).applyMatrix4(cs),this.boundingBox.union(pu)}computeBoundingSphere(){let e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Vt),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,cs),Ys.copy(e.boundingSphere).applyMatrix4(cs),this.boundingSphere.union(Ys)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.previousInstanceMatrix!==null&&(this.previousInstanceMatrix=e.previousInstanceMatrix.clone()),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){return this.instanceColor===null?t.setRGB(1,1,1):t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){return t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){let n=t.morphTargetInfluences,i=this.morphTexture.source.data.data,r=n.length+1,a=e*r+1;for(let o=0;o<n.length;o++)n[o]=i[a+o]}raycast(e,t){let n=this.matrixWorld,i=this.count;if(Ks.geometry=this.geometry,Ks.material=this.material,Ks.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Ys.copy(this.boundingSphere),Ys.applyMatrix4(n),e.ray.intersectsSphere(Ys)!==!1))for(let r=0;r<i;r++){this.getMatrixAt(r,cs),fu.multiplyMatrices(n,cs),Ks.matrixWorld=fu,Ks.raycast(e,ga);for(let a=0,o=ga.length;a<o;a++){let c=ga[a];c.instanceId=r,c.object=this,t.push(c)}ga.length=0}}setColorAt(e,t){return this.instanceColor===null&&(this.instanceColor=new di(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3),this}setMatrixAt(e,t){return t.toArray(this.instanceMatrix.array,e*16),this}setMorphAt(e,t){let n=t.morphTargetInfluences,i=n.length+1;this.morphTexture===null&&(this.morphTexture=new Ms(new Float32Array(i*this.count),i,this.count,ho,Zt));let r=this.morphTexture.source.data.data,a=0;for(let l=0;l<n.length;l++)a+=n[l];let o=this.geometry.morphTargetsRelative?1:1-a,c=i*e;return r[c]=o,r.set(n,c+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}},Xc=new F,fp=new F,pp=new Pe,Tn=class{constructor(e=new F(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){let i=Xc.subVectors(n,t).cross(fp.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t,n=!0){let i=e.delta(Xc),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let a=-(e.start.dot(this.normal)+this.constant)/r;return n===!0&&(a<0||a>1)?null:t.copy(e.start).addScaledVector(i,a)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||pp.getNormalMatrix(e),i=this.coplanarPoint(Xc).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}},wi=new Vt,mp=new He(.5,.5),ba=new F,Ss=class{constructor(e=new Tn,t=new Tn,n=new Tn,i=new Tn,r=new Tn,a=new Tn){this.planes=[e,t,n,i,r,a]}set(e,t,n,i,r,a){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(i),o[4].copy(r),o[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=dn,n=!1){let i=this.planes,r=e.elements,a=r[0],o=r[1],c=r[2],l=r[3],h=r[4],u=r[5],d=r[6],f=r[7],g=r[8],_=r[9],m=r[10],p=r[11],v=r[12],S=r[13],M=r[14],E=r[15];if(i[0].setComponents(l-a,f-h,p-g,E-v).normalize(),i[1].setComponents(l+a,f+h,p+g,E+v).normalize(),i[2].setComponents(l+o,f+u,p+_,E+S).normalize(),i[3].setComponents(l-o,f-u,p-_,E-S).normalize(),n)i[4].setComponents(c,d,m,M).normalize(),i[5].setComponents(l-c,f-d,p-m,E-M).normalize();else if(i[4].setComponents(l-c,f-d,p-m,E-M).normalize(),t===dn)i[5].setComponents(l+c,f+d,p+m,E+M).normalize();else if(t===ps)i[5].setComponents(c,d,m,M).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),wi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),wi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(wi)}intersectsSprite(e){wi.center.set(0,0,0);let t=mp.distanceTo(e.center);return wi.radius=.7071067811865476+t,wi.applyMatrix4(e.matrixWorld),this.intersectsSphere(wi)}intersectsSphere(e){let t=this.planes,n=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){let t=this.planes;for(let n=0;n<6;n++){let i=t[n];if(ba.x=i.normal.x>0?e.max.x:e.min.x,ba.y=i.normal.y>0?e.max.y:e.min.y,ba.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(ba)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};var As=class extends Gt{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Te(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}},za=new F,Ga=new F,mu=new Ue,Js=new Ui,xa=new Vt,jc=new F,gu=new F,ki=class extends ct{constructor(e=new zt,t=new As){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[0];for(let i=1,r=t.count;i<r;i++)za.fromBufferAttribute(t,i-1),Ga.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=za.distanceTo(Ga);e.setAttribute("lineDistance",new Ot(n,1))}else _e("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){let n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),xa.copy(n.boundingSphere),xa.applyMatrix4(i),xa.radius+=r,e.ray.intersectsSphere(xa)===!1)return;mu.copy(i).invert(),Js.copy(e.ray).applyMatrix4(mu);let o=r/((this.scale.x+this.scale.y+this.scale.z)/3),c=o*o,l=this.isLineSegments?2:1,h=n.index,d=n.attributes.position;if(h!==null){let f=Math.max(0,a.start),g=Math.min(h.count,a.start+a.count);for(let _=f,m=g-1;_<m;_+=l){let p=h.getX(_),v=h.getX(_+1),S=_a(this,e,Js,c,p,v,_);S&&t.push(S)}if(this.isLineLoop){let _=h.getX(g-1),m=h.getX(f),p=_a(this,e,Js,c,_,m,g-1);p&&t.push(p)}}else{let f=Math.max(0,a.start),g=Math.min(d.count,a.start+a.count);for(let _=f,m=g-1;_<m;_+=l){let p=_a(this,e,Js,c,_,_+1,_);p&&t.push(p)}if(this.isLineLoop){let _=_a(this,e,Js,c,g-1,f,g-1);_&&t.push(_)}}}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=i.length;r<a;r++){let o=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}};function _a(s,e,t,n,i,r,a){let o=s.geometry.attributes.position;if(za.fromBufferAttribute(o,i),Ga.fromBufferAttribute(o,r),t.distanceSqToSegment(za,Ga,jc,gu)>n)return;jc.applyMatrix4(s.matrixWorld);let l=e.ray.origin.distanceTo(jc);if(!(l<e.near||l>e.far))return{distance:l,point:gu.clone().applyMatrix4(s.matrixWorld),index:a,face:null,faceIndex:null,barycoord:null,object:s}}var bu=new F,xu=new F,cr=class extends ki{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[];for(let i=0,r=t.count;i<r;i+=2)bu.fromBufferAttribute(t,i),xu.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+bu.distanceTo(xu);e.setAttribute("lineDistance",new Ot(n,1))}else _e("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}},lr=class extends ki{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}},Ts=class extends Gt{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Te(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},_u=new Ue,Qc=new Ui,va=new Vt,ya=new F,hr=class extends ct{constructor(e=new zt,t=new Ts){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){let n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),va.copy(n.boundingSphere),va.applyMatrix4(i),va.radius+=r,e.ray.intersectsSphere(va)===!1)return;_u.copy(i).invert(),Qc.copy(e.ray).applyMatrix4(_u);let o=r/((this.scale.x+this.scale.y+this.scale.z)/3),c=o*o,l=n.index,u=n.attributes.position;if(l!==null){let d=Math.max(0,a.start),f=Math.min(l.count,a.start+a.count);for(let g=d,_=f;g<_;g++){let m=l.getX(g);ya.fromBufferAttribute(u,m),vu(ya,m,c,i,e,t,this)}}else{let d=Math.max(0,a.start),f=Math.min(u.count,a.start+a.count);for(let g=d,_=f;g<_;g++)ya.fromBufferAttribute(u,g),vu(ya,g,c,i,e,t,this)}}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,a=i.length;r<a;r++){let o=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}};function vu(s,e,t,n,i,r,a){let o=Qc.distanceSqToPoint(s);if(o<t){let c=new F;Qc.closestPointToPoint(s,c),c.applyMatrix4(n);let l=i.ray.origin.distanceTo(c);if(l<i.near||l>i.far)return;r.push({distance:l,distanceToRay:Math.sqrt(o),point:c,index:e,face:null,faceIndex:null,barycoord:null,object:a})}}var ur=class extends Ct{constructor(e=[],t=gi,n,i,r,a,o,c,l,h){super(e,t,n,i,r,a,o,c,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}};var Yn=class extends Ct{constructor(e,t,n=vn,i,r,a,o=xt,c=xt,l,h=En,u=1){if(h!==En&&h!==bi)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");let d={width:e,height:t,depth:u};super(d,i,r,a,o,c,h,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new bs(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}},Va=class extends Yn{constructor(e,t=vn,n=gi,i,r,a=xt,o=xt,c,l=En){let h={width:e,height:e,depth:1},u=[h,h,h,h,h,h];super(e,e,t,n,i,r,a,o,c,l),this.image=u,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}},dr=class extends Ct{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}},fi=class s extends zt{constructor(e=1,t=1,n=1,i=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:a};let o=this;i=Math.floor(i),r=Math.floor(r),a=Math.floor(a);let c=[],l=[],h=[],u=[],d=0,f=0;g("z","y","x",-1,-1,n,t,e,a,r,0),g("z","y","x",1,-1,n,t,-e,a,r,1),g("x","z","y",1,1,e,n,t,i,a,2),g("x","z","y",1,-1,e,n,-t,i,a,3),g("x","y","z",1,-1,e,t,n,i,r,4),g("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(c),this.setAttribute("position",new Ot(l,3)),this.setAttribute("normal",new Ot(h,3)),this.setAttribute("uv",new Ot(u,2));function g(_,m,p,v,S,M,E,T,C,x,w){let L=M/C,R=E/x,O=M/2,H=E/2,q=T/2,N=C+1,z=x+1,V=0,Z=0,Q=new F;for(let le=0;le<z;le++){let xe=le*R-H;for(let Se=0;Se<N;Se++){let Xe=Se*L-O;Q[_]=Xe*v,Q[m]=xe*S,Q[p]=q,l.push(Q.x,Q.y,Q.z),Q[_]=0,Q[m]=0,Q[p]=T>0?1:-1,h.push(Q.x,Q.y,Q.z),u.push(Se/C),u.push(1-le/x),V+=1}}for(let le=0;le<x;le++)for(let xe=0;xe<C;xe++){let Se=d+xe+N*le,Xe=d+xe+N*(le+1),$e=d+(xe+1)+N*(le+1),Fe=d+(xe+1)+N*le;c.push(Se,Xe,Fe),c.push(Xe,$e,Fe),Z+=6}o.addGroup(f,Z,w),f+=Z,d+=V}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new s(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};var fr=class s extends zt{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};let r=e/2,a=t/2,o=Math.floor(n),c=Math.floor(i),l=o+1,h=c+1,u=e/o,d=t/c,f=[],g=[],_=[],m=[];for(let p=0;p<h;p++){let v=p*d-a;for(let S=0;S<l;S++){let M=S*u-r;g.push(M,-v,0),_.push(0,0,1),m.push(S/o),m.push(1-p/c)}}for(let p=0;p<c;p++)for(let v=0;v<o;v++){let S=v+l*p,M=v+l*(p+1),E=v+1+l*(p+1),T=v+1+l*p;f.push(S,M,T),f.push(M,E,T)}this.setIndex(f),this.setAttribute("position",new Ot(g,3)),this.setAttribute("normal",new Ot(_,3)),this.setAttribute("uv",new Ot(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new s(e.width,e.height,e.widthSegments,e.heightSegments)}};function Wi(s){let e={};for(let t in s){e[t]={};for(let n in s[t]){let i=s[t][n];if(yu(i))i.isRenderTargetTexture?(_e("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=i.clone();else if(Array.isArray(i))if(yu(i[0])){let r=[];for(let a=0,o=i.length;a<o;a++)r[a]=i[a].clone();e[t][n]=r}else e[t][n]=i.slice();else e[t][n]=i}}return e}function Nt(s){let e={};for(let t=0;t<s.length;t++){let n=Wi(s[t]);for(let i in n)e[i]=n[i]}return e}function yu(s){return s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)}function gp(s){let e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function wl(s){let e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Be.workingColorSpace}var pd={clone:Wi,merge:Nt},bp=`void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
-}`,np=`void main() {
+}`,xp=`void main() {
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
-}`,Zt=class extends Gt{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=tp,this.fragmentShader=np,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Vi(e.uniforms),this.uniformsGroups=ep(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){let t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(let i in this.uniforms){let a=this.uniforms[i].value;a&&a.isTexture?t.uniforms[i]={type:"t",value:a.toJSON(e).uuid}:a&&a.isColor?t.uniforms[i]={type:"c",value:a.getHex()}:a&&a.isVector2?t.uniforms[i]={type:"v2",value:a.toArray()}:a&&a.isVector3?t.uniforms[i]={type:"v3",value:a.toArray()}:a&&a.isVector4?t.uniforms[i]={type:"v4",value:a.toArray()}:a&&a.isMatrix3?t.uniforms[i]={type:"m3",value:a.toArray()}:a&&a.isMatrix4?t.uniforms[i]={type:"m4",value:a.toArray()}:t.uniforms[i]={value:a}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}},ka=class extends Zt{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}},En=class extends Gt{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Te(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dr,this.normalScale=new He(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new wn,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},Ht=class extends En{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new He(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Ve(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Te(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Te(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Te(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}};var ur=class extends Gt{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Te(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dr,this.normalScale=new He(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new wn,this.combine=$a,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},Ba=class extends Gt{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Vu,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},za=class extends Gt{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};function ba(s,e){return!s||s.constructor===e?s:typeof e.BYTES_PER_ELEMENT=="number"?new e(s):Array.prototype.slice.call(s)}function ip(s){function e(i,r){return s[i]-s[r]}let t=s.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function lu(s,e,t){let n=s.length,i=new s.constructor(n);for(let r=0,a=0;a!==n;++r){let o=t[r]*e;for(let c=0;c!==e;++c)i[a++]=s[o+c]}return i}function nd(s,e,t,n){let i=1,r=s[0];for(;r!==void 0&&r[n]===void 0;)r=s[i++];if(r===void 0)return;let a=r[n];if(a!==void 0)if(Array.isArray(a))do a=r[n],a!==void 0&&(e.push(r.time),t.push(...a)),r=s[i++];while(r!==void 0);else if(a.toArray!==void 0)do a=r[n],a!==void 0&&(e.push(r.time),a.toArray(t,t.length)),r=s[i++];while(r!==void 0);else do a=r[n],a!==void 0&&(e.push(r.time),t.push(a)),r=s[i++];while(r!==void 0)}var Rn=class{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,n=this._cachedIndex,i=t[n],r=t[n-1];e:{t:{let a;n:{i:if(!(e<i)){for(let o=n+2;;){if(i===void 0){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===o)break;if(r=i,i=t[++n],e<i)break t}a=t.length;break n}if(!(e>=r)){let o=t[1];e<o&&(n=2,r=o);for(let c=n-2;;){if(r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===c)break;if(i=r,r=t[--n-1],e>=r)break t}a=n,n=0;break n}break e}for(;n<a;){let o=n+a>>>1;e<t[o]?a=o:n=o+1}if(i=t[n],r=t[n-1],r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let a=0;a!==i;++a)t[a]=n[r+a];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}},Ga=class extends Rn{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:wi,endingEnd:wi}}intervalChanged_(e,t,n){let i=this.parameterPositions,r=e-2,a=e+1,o=i[r],c=i[a];if(o===void 0)switch(this.getSettings_().endingStart){case Ei:r=e,o=2*t-n;break;case Ys:r=i.length-2,o=t+i[r]-i[r+1];break;default:r=e,o=n}if(c===void 0)switch(this.getSettings_().endingEnd){case Ei:a=e,c=2*n-t;break;case Ys:a=1,c=n+i[1]-i[0];break;default:a=e-1,c=t}let l=(n-t)*.5,h=this.valueSize;this._weightPrev=l/(t-o),this._weightNext=l/(c-n),this._offsetPrev=r*h,this._offsetNext=a*h}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=e*o,l=c-o,h=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,f=this._weightNext,g=(n-t)/(i-t),_=g*g,m=_*g,p=-d*m+2*d*_-d*g,v=(1+d)*m+(-1.5-2*d)*_+(-.5+d)*g+1,S=(-1-f)*m+(1.5+f)*_+.5*g,M=f*m-f*_;for(let E=0;E!==o;++E)r[E]=p*a[h+E]+v*a[l+E]+S*a[c+E]+M*a[u+E];return r}},dr=class extends Rn{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=e*o,l=c-o,h=(n-t)/(i-t),u=1-h;for(let d=0;d!==o;++d)r[d]=a[l+d]*u+a[c+d]*h;return r}},Va=class extends Rn{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}},Ha=class extends Rn{interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=e*o,l=c-o,h=this.settings||this.DefaultSettings_,u=h.inTangents,d=h.outTangents;if(!u||!d){let _=(n-t)/(i-t),m=1-_;for(let p=0;p!==o;++p)r[p]=a[l+p]*m+a[c+p]*_;return r}let f=o*2,g=e-1;for(let _=0;_!==o;++_){let m=a[l+_],p=a[c+_],v=g*f+_*2,S=d[v],M=d[v+1],E=e*f+_*2,T=u[E],C=u[E+1],x=(n-t)/(i-t),w,L,R,O,H;for(let q=0;q<8;q++){w=x*x,L=w*x,R=1-x,O=R*R,H=O*R;let z=H*t+3*O*x*S+3*R*w*T+L*i-n;if(Math.abs(z)<1e-10)break;let V=3*O*(S-t)+6*R*x*(T-S)+3*w*(i-T);if(Math.abs(V)<1e-10)break;x=x-z/V,x=Math.max(0,Math.min(1,x))}r[_]=H*m+3*O*x*M+3*R*w*C+L*p}return r}},Wt=class{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ba(t,this.TimeBufferType),this.values=ba(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){let t=e.constructor,n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:ba(e.times,Array),values:ba(e.values,Array)};let i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new Va(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new dr(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Ga(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodBezier(e){let t=new Ha(this.times,this.values,this.getValueSize(),e);return this.settings&&(t.settings=this.settings),t}setInterpolation(e){let t;switch(e){case Pi:t=this.InterpolantFactoryMethodDiscrete;break;case Ii:t=this.InterpolantFactoryMethodLinear;break;case va:t=this.InterpolantFactoryMethodSmooth;break;case Vc:t=this.InterpolantFactoryMethodBezier;break}if(t===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return _e("KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Pi;case this.InterpolantFactoryMethodLinear:return Ii;case this.InterpolantFactoryMethodSmooth:return va;case this.InterpolantFactoryMethodBezier:return Vc}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){let t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){let t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){let n=this.times,i=n.length,r=0,a=i-1;for(;r!==i&&n[r]<e;)++r;for(;a!==-1&&n[a]>t;)--a;if(++a,r!==0||a!==i){r>=a&&(a=Math.max(a,1),r=a-1);let o=this.getValueSize();this.times=n.slice(r,a),this.values=this.values.slice(r*o,a*o)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(we("KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,i=this.values,r=n.length;r===0&&(we("KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let o=0;o!==r;o++){let c=n[o];if(typeof c=="number"&&isNaN(c)){we("KeyframeTrack: Time is not a valid number.",this,o,c),e=!1;break}if(a!==null&&a>c){we("KeyframeTrack: Out of order keys.",this,o,c,a),e=!1;break}a=c}if(i!==void 0&&gf(i))for(let o=0,c=i.length;o!==c;++o){let l=i[o];if(isNaN(l)){we("KeyframeTrack: Value is not a valid number.",this,o,l),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===va,r=e.length-1,a=1;for(let o=1;o<r;++o){let c=!1,l=e[o],h=e[o+1];if(l!==h&&(o!==1||l!==e[0]))if(i)c=!0;else{let u=o*n,d=u-n,f=u+n;for(let g=0;g!==n;++g){let _=t[u+g];if(_!==t[d+g]||_!==t[f+g]){c=!0;break}}}if(c){if(o!==a){e[a]=e[o];let u=o*n,d=a*n;for(let f=0;f!==n;++f)t[d+f]=t[u+f]}++a}}if(r>0){e[a]=e[r];for(let o=r*n,c=a*n,l=0;l!==n;++l)t[c+l]=t[o+l];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}};Wt.prototype.ValueTypeName="";Wt.prototype.TimeBufferType=Float32Array;Wt.prototype.ValueBufferType=Float32Array;Wt.prototype.DefaultInterpolation=Ii;var Kn=class extends Wt{constructor(e,t,n){super(e,t,n)}};Kn.prototype.ValueTypeName="bool";Kn.prototype.ValueBufferType=Array;Kn.prototype.DefaultInterpolation=Pi;Kn.prototype.InterpolantFactoryMethodLinear=void 0;Kn.prototype.InterpolantFactoryMethodSmooth=void 0;var fr=class extends Wt{constructor(e,t,n,i){super(e,t,n,i)}};fr.prototype.ValueTypeName="color";var Cn=class extends Wt{constructor(e,t,n,i){super(e,t,n,i)}};Cn.prototype.ValueTypeName="number";var Wa=class extends Rn{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=(n-t)/(i-t),l=e*o;for(let h=l+o;l!==h;l+=4)Ft.slerpFlat(r,0,a,l-o,a,l,c);return r}},Pn=class extends Wt{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new Wa(this.times,this.values,this.getValueSize(),e)}};Pn.prototype.ValueTypeName="quaternion";Pn.prototype.InterpolantFactoryMethodSmooth=void 0;var Jn=class extends Wt{constructor(e,t,n){super(e,t,n)}};Jn.prototype.ValueTypeName="string";Jn.prototype.ValueBufferType=Array;Jn.prototype.DefaultInterpolation=Pi;Jn.prototype.InterpolantFactoryMethodLinear=void 0;Jn.prototype.InterpolantFactoryMethodSmooth=void 0;var In=class extends Wt{constructor(e,t,n,i){super(e,t,n,i)}};In.prototype.ValueTypeName="vector";var Oi=class{constructor(e="",t=-1,n=[],i=zo){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=fn(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,i=1/(e.fps||1);for(let a=0,o=n.length;a!==o;++a)t.push(rp(n[a]).scale(i));let r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r.userData=JSON.parse(e.userData||"{}"),r}static toJSON(e){let t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let r=0,a=n.length;r!==a;++r)t.push(Wt.toJSON(n[r]));return i}static CreateFromMorphTargetSequence(e,t,n,i){let r=t.length,a=[];for(let o=0;o<r;o++){let c=[],l=[];c.push((o+r-1)%r,o,(o+1)%r),l.push(0,1,0);let h=ip(c);c=lu(c,1,h),l=lu(l,1,h),!i&&c[0]===0&&(c.push(r),l.push(l[0])),a.push(new Cn(".morphTargetInfluences["+t[o].name+"]",c,l).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;if(!Array.isArray(e)){let i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){let i={},r=/^([\w-]*?)([\d]+)$/;for(let o=0,c=e.length;o<c;o++){let l=e[o],h=l.name.match(r);if(h&&h.length>1){let u=h[1],d=i[u];d||(i[u]=d=[]),d.push(l)}}let a=[];for(let o in i)a.push(this.CreateFromMorphTargetSequence(o,i[o],t,n));return a}static parseAnimation(e,t){if(_e("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return we("AnimationClip: No animation in JSONLoader data."),null;let n=function(u,d,f,g,_){if(f.length!==0){let m=[],p=[];nd(f,m,p,g),m.length!==0&&_.push(new u(d,m,p))}},i=[],r=e.name||"default",a=e.fps||30,o=e.blendMode,c=e.length||-1,l=e.hierarchy||[];for(let u=0;u<l.length;u++){let d=l[u].keys;if(!(!d||d.length===0))if(d[0].morphTargets){let f={},g;for(g=0;g<d.length;g++)if(d[g].morphTargets)for(let _=0;_<d[g].morphTargets.length;_++)f[d[g].morphTargets[_]]=-1;for(let _ in f){let m=[],p=[];for(let v=0;v!==d[g].morphTargets.length;++v){let S=d[g];m.push(S.time),p.push(S.morphTarget===_?1:0)}i.push(new Cn(".morphTargetInfluence["+_+"]",m,p))}c=f.length*a}else{let f=".bones["+t[u].name+"]";n(In,f+".position",d,"pos",i),n(Pn,f+".quaternion",d,"rot",i),n(In,f+".scale",d,"scl",i)}}return i.length===0?null:new this(r,c,i,o)}resetDuration(){let e=this.tracks,t=0;for(let n=0,i=e.length;n!==i;++n){let r=this.tracks[n];t=Math.max(t,r.times[r.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){let e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());let t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}};function sp(s){switch(s.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Cn;case"vector":case"vector2":case"vector3":case"vector4":return In;case"color":return fr;case"quaternion":return Pn;case"bool":case"boolean":return Kn;case"string":return Jn}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+s)}function rp(s){if(s.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");let e=sp(s.type);if(s.times===void 0){let t=[],n=[];nd(s.keys,t,n,"value"),s.times=t,s.values=n}return e.parse!==void 0?e.parse(s):new e(s.name,s.times,s.values,s.interpolation)}var An={enabled:!1,files:{},add:function(s,e){this.enabled!==!1&&(hu(s)||(this.files[s]=e))},get:function(s){if(this.enabled!==!1&&!hu(s))return this.files[s]},remove:function(s){delete this.files[s]},clear:function(){this.files={}}};function hu(s){try{let e=s.slice(s.indexOf(":")+1);return new URL(e).protocol==="blob:"}catch{return!1}}var qa=class{constructor(e,t,n){let i=this,r=!1,a=0,o=0,c,l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(h){o++,r===!1&&i.onStart!==void 0&&i.onStart(h,a,o),r=!0},this.itemEnd=function(h){a++,i.onProgress!==void 0&&i.onProgress(h,a,o),a===o&&(r=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(h){i.onError!==void 0&&i.onError(h)},this.resolveURL=function(h){return c?c(h):h},this.setURLModifier=function(h){return c=h,this},this.addHandler=function(h,u){return l.push(h,u),this},this.removeHandler=function(h){let u=l.indexOf(h);return u!==-1&&l.splice(u,2),this},this.getHandler=function(h){for(let u=0,d=l.length;u<d;u+=2){let f=l[u],g=l[u+1];if(f.global&&(f.lastIndex=0),f.test(h))return g}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}},id=new qa,Ln=class{constructor(e){this.manager=e!==void 0?e:id,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}load(){}loadAsync(e,t){let n=this;return new Promise(function(i,r){n.load(e,i,t,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}};Ln.DEFAULT_MATERIAL_NAME="__DEFAULT";var qn={},qc=class extends Error{constructor(e,t){super(e),this.response=t}},Ss=class extends Ln{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let r=An.get(`file:${e}`);if(r!==void 0){this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0);return}if(qn[e]!==void 0){qn[e].push({onLoad:t,onProgress:n,onError:i});return}qn[e]=[],qn[e].push({onLoad:t,onProgress:n,onError:i});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),o=this.mimeType,c=this.responseType;fetch(a).then(l=>{if(l.status===200||l.status===0){if(l.status===0&&_e("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||l.body===void 0||l.body.getReader===void 0)return l;let h=qn[e],u=l.body.getReader(),d=l.headers.get("X-File-Size")||l.headers.get("Content-Length"),f=d?parseInt(d):0,g=f!==0,_=0,m=new ReadableStream({start(p){v();function v(){u.read().then(({done:S,value:M})=>{if(S)p.close();else{_+=M.byteLength;let E=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:f});for(let T=0,C=h.length;T<C;T++){let x=h[T];x.onProgress&&x.onProgress(E)}p.enqueue(M),v()}},S=>{p.error(S)})}}});return new Response(m)}else throw new qc(`fetch for "${l.url}" responded with ${l.status}: ${l.statusText}`,l)}).then(l=>{switch(c){case"arraybuffer":return l.arrayBuffer();case"blob":return l.blob();case"document":return l.text().then(h=>new DOMParser().parseFromString(h,o));case"json":return l.json();default:if(o==="")return l.text();{let u=/charset="?([^;"\s]*)"?/i.exec(o),d=u&&u[1]?u[1].toLowerCase():void 0,f=new TextDecoder(d);return l.arrayBuffer().then(g=>f.decode(g))}}}).then(l=>{An.add(`file:${e}`,l);let h=qn[e];delete qn[e];for(let u=0,d=h.length;u<d;u++){let f=h[u];f.onLoad&&f.onLoad(l)}}).catch(l=>{let h=qn[e];if(h===void 0)throw this.manager.itemError(e),l;delete qn[e];for(let u=0,d=h.length;u<d;u++){let f=h[u];f.onError&&f.onError(l)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}};var as=new WeakMap,Xa=class extends Ln{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let r=this,a=An.get(`image:${e}`);if(a!==void 0){if(a.complete===!0)r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0);else{let u=as.get(a);u===void 0&&(u=[],as.set(a,u)),u.push({onLoad:t,onError:i})}return a}let o=ds("img");function c(){h(),t&&t(this);let u=as.get(this)||[];for(let d=0;d<u.length;d++){let f=u[d];f.onLoad&&f.onLoad(this)}as.delete(this),r.manager.itemEnd(e)}function l(u){h(),i&&i(u),An.remove(`image:${e}`);let d=as.get(this)||[];for(let f=0;f<d.length;f++){let g=d[f];g.onError&&g.onError(u)}as.delete(this),r.manager.itemError(e),r.manager.itemEnd(e)}function h(){o.removeEventListener("load",c,!1),o.removeEventListener("error",l,!1)}return o.addEventListener("load",c,!1),o.addEventListener("error",l,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(o.crossOrigin=this.crossOrigin),An.add(`image:${e}`,o),r.manager.itemStart(e),o.src=e,o}};var pr=class extends Ln{constructor(e){super(e)}load(e,t,n,i){let r=new Ct,a=new Xa(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(o){r.image=o,r.needsUpdate=!0,t!==void 0&&t(r)},n,i),r}},ki=class extends ct{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Te(e),this.intensity=t}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,t}};var Bc=new Ue,uu=new F,du=new F,mr=class{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new He(512,512),this.mapType=qt,this.map=null,this.mapPass=null,this.matrix=new Ue,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new vs,this._frameExtents=new He(1,1),this._viewportCount=1,this._viewports=[new nt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,n=this.matrix;uu.setFromMatrixPosition(e.matrixWorld),t.position.copy(uu),du.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(du),t.updateMatrixWorld(),Bc.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Bc,t.coordinateSystem,t.reversedDepth),t.coordinateSystem===us||t.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Bc)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this.biasNode=e.biasNode,this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}},xa=new F,_a=new Ft,Mn=new F,gr=class extends ct{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ue,this.projectionMatrix=new Ue,this.projectionMatrixInverse=new Ue,this.coordinateSystem=un,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(xa,_a,Mn),Mn.x===1&&Mn.y===1&&Mn.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(xa,_a,Mn.set(1,1,1)).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorld.decompose(xa,_a,Mn),Mn.x===1&&Mn.y===1&&Mn.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(xa,_a,Mn.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}},ai=new F,fu=new He,pu=new He,Mt=class extends gr{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=Li*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(Ks*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Li*2*Math.atan(Math.tan(Ks*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){ai.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ai.x,ai.y).multiplyScalar(-e/ai.z),ai.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ai.x,ai.y).multiplyScalar(-e/ai.z)}getViewSize(e,t){return this.getViewBounds(e,fu,pu),t.subVectors(pu,fu)}setViewOffset(e,t,n,i,r,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(Ks*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i,a=this.view;if(this.view!==null&&this.view.enabled){let c=a.fullWidth,l=a.fullHeight;r+=a.offsetX*i/c,t-=a.offsetY*n/l,i*=a.width/c,n*=a.height/l}let o=this.filmOffset;o!==0&&(r+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}},Xc=class extends mr{constructor(){super(new Mt(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){let t=this.camera,n=Li*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,r=e.distance||t.far;(n!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}},br=class extends ki{constructor(e,t,n=0,i=Math.PI/3,r=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ct.DEFAULT_UP),this.updateMatrix(),this.target=new ct,this.distance=n,this.angle=i,this.penumbra=r,this.decay=a,this.map=null,this.shadow=new Xc}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.distance=this.distance,t.object.angle=this.angle,t.object.decay=this.decay,t.object.penumbra=this.penumbra,t.object.target=this.target.uuid,this.map&&this.map.isTexture&&(t.object.map=this.map.toJSON(e).uuid),t.object.shadow=this.shadow.toJSON(),t}},jc=class extends mr{constructor(){super(new Mt(90,1,.5,500)),this.isPointLightShadow=!0}},Bi=class extends ki{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new jc}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.distance=this.distance,t.object.decay=this.decay,t.object.shadow=this.shadow.toJSON(),t}},di=class extends gr{constructor(e=-1,t=1,n=1,i=-1,r=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,r=n-e,a=n+e,o=i+t,c=i-t;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=l*this.view.offsetX,a=r+l*this.view.width,o-=h*this.view.offsetY,c=o-h*this.view.height}this.projectionMatrix.makeOrthographic(r,a,o,c,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}},Kc=class extends mr{constructor(){super(new di(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},fi=class extends ki{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ct.DEFAULT_UP),this.updateMatrix(),this.target=new ct,this.shadow=new Kc}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.shadow=this.shadow.toJSON(),t.object.target=this.target.uuid,t}},xr=class extends ki{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}};var Yn=class{static extractUrlBase(e){let t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}};var zc=new WeakMap,_r=class extends Ln{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&_e("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&_e("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let r=this,a=An.get(`image-bitmap:${e}`);if(a!==void 0){if(r.manager.itemStart(e),a.then){a.then(l=>{zc.has(a)===!0?(i&&i(zc.get(a)),r.manager.itemError(e),r.manager.itemEnd(e)):(t&&t(l),r.manager.itemEnd(e))});return}setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0);return}let o={};o.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",o.headers=this.requestHeader,o.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;let c=fetch(e,o).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(l){An.add(`image-bitmap:${e}`,l),t&&t(l),r.manager.itemEnd(e)}).catch(function(l){i&&i(l),zc.set(c,l),An.remove(`image-bitmap:${e}`),r.manager.itemError(e),r.manager.itemEnd(e)});An.add(`image-bitmap:${e}`,c),r.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}};var os=-90,cs=1,ja=class extends ct{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let i=new Mt(os,cs,e,t);i.layers=this.layers,this.add(i);let r=new Mt(os,cs,e,t);r.layers=this.layers,this.add(r);let a=new Mt(os,cs,e,t);a.layers=this.layers,this.add(a);let o=new Mt(os,cs,e,t);o.layers=this.layers,this.add(o);let c=new Mt(os,cs,e,t);c.layers=this.layers,this.add(c);let l=new Mt(os,cs,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,i,r,a,o,c]=t;for(let l of t)this.remove(l);if(e===un)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===us)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(let l of t)this.add(l),l.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[r,a,o,c,l,h]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;let _=n.texture.generateMipmaps;n.texture.generateMipmaps=!1;let m=!1;e.isWebGLRenderer===!0?m=e.state.buffers.depth.getReversed():m=e.reversedDepthBuffer,e.setRenderTarget(n,0,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,r),e.setRenderTarget(n,1,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,a),e.setRenderTarget(n,2,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,o),e.setRenderTarget(n,3,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,c),e.setRenderTarget(n,4,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,l),n.texture.generateMipmaps=_,e.setRenderTarget(n,5,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,h),e.setRenderTarget(u,d,f),e.xr.enabled=g,n.texture.needsPMREMUpdate=!0}},Ka=class extends Mt{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}};var Ja=class{constructor(e,t,n){this.binding=e,this.valueSize=n;let i,r,a;switch(t){case"quaternion":i=this._slerp,r=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":i=this._select,r=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:i=this._lerp,r=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*5)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=r,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){let n=this.buffer,i=this.valueSize,r=e*i+i,a=this.cumulativeWeight;if(a===0){for(let o=0;o!==i;++o)n[r+o]=n[o];a=t}else{a+=t;let o=t/a;this._mixBufferRegion(n,r,0,o,i)}this.cumulativeWeight=a}accumulateAdditive(e){let t=this.buffer,n=this.valueSize,i=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,i,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){let t=this.valueSize,n=this.buffer,i=e*t+t,r=this.cumulativeWeight,a=this.cumulativeWeightAdditive,o=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){let c=t*this._origIndex;this._mixBufferRegion(n,i,c,1-r,t)}a>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let c=t,l=t+t;c!==l;++c)if(n[c]!==n[c+t]){o.setValue(n,i);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let r=n,a=i;r!==a;++r)t[r]=t[i+r%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,i,r){if(i>=.5)for(let a=0;a!==r;++a)e[t+a]=e[n+a]}_slerp(e,t,n,i){Ft.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,r){let a=this._workIndex*r;Ft.multiplyQuaternionsFlat(e,a,e,t,e,n),Ft.slerpFlat(e,t,e,t,e,a,i)}_lerp(e,t,n,i,r){let a=1-i;for(let o=0;o!==r;++o){let c=t+o;e[c]=e[c]*a+e[n+o]*i}}_lerpAdditive(e,t,n,i,r){for(let a=0;a!==r;++a){let o=t+a;e[o]=e[o]+e[n+a]*i}}},xl="\\[\\]\\.:\\/",ap=new RegExp("["+xl+"]","g"),_l="[^"+xl+"]",op="[^"+xl.replace("\\.","")+"]",cp=/((?:WC+[\/:])*)/.source.replace("WC",_l),lp=/(WCOD+)?/.source.replace("WCOD",op),hp=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",_l),up=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",_l),dp=new RegExp("^"+cp+lp+hp+up+"$"),fp=["material","materials","bones","map"],Jc=class{constructor(e,t,n){let i=n||tt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},tt=class s{constructor(e,t,n){this.path=t,this.parsedPath=n||s.parseTrackName(t),this.node=s.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new s.Composite(e,t,n):new s(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(ap,"")}static parseTrackName(e){let t=dp.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let r=n.nodeName.substring(i+1);fp.indexOf(r)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=r)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(r){for(let a=0;a<r.length;a++){let o=r[a];if(o.name===t||o.uuid===t)return o;let c=n(o.children);if(c)return c}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)e[t++]=n[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node,t=this.parsedPath,n=t.objectName,i=t.propertyName,r=t.propertyIndex;if(e||(e=s.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){_e("PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let l=t.objectIndex;switch(n){case"materials":if(!e.material){we("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){we("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){we("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let h=0;h<e.length;h++)if(e[h].name===l){l=h;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){we("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){we("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){we("PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(l!==void 0){if(e[l]===void 0){we("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[l]}}let a=e[i];if(a===void 0){let l=t.nodeName;we("PropertyBinding: Trying to update property for track: "+l+"."+i+" but it wasn't found.",e);return}let o=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?o=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(o=this.Versioning.MatrixWorldNeedsUpdate);let c=this.BindingType.Direct;if(r!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){we("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){we("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[r]!==void 0&&(r=e.morphTargetDictionary[r])}c=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=r}else a.fromArray!==void 0&&a.toArray!==void 0?(c=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(c=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=i;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};tt.Composite=Jc;tt.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};tt.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};tt.prototype.GetterByBindingType=[tt.prototype._getValue_direct,tt.prototype._getValue_array,tt.prototype._getValue_arrayElement,tt.prototype._getValue_toArray];tt.prototype.SetterByBindingTypeAndVersioning=[[tt.prototype._setValue_direct,tt.prototype._setValue_direct_setNeedsUpdate,tt.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[tt.prototype._setValue_array,tt.prototype._setValue_array_setNeedsUpdate,tt.prototype._setValue_array_setMatrixWorldNeedsUpdate],[tt.prototype._setValue_arrayElement,tt.prototype._setValue_arrayElement_setNeedsUpdate,tt.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[tt.prototype._setValue_fromArray,tt.prototype._setValue_fromArray_setNeedsUpdate,tt.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var Ya=class{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;let r=t.tracks,a=r.length,o=new Array(a),c={endingStart:wi,endingEnd:wi};for(let l=0;l!==a;++l){let h=r[l].createInterpolant(null);o[l]=h,h.settings&&Object.assign(c,h.settings),h.settings=c}this._interpolantSettings=c,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ir,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){let i=this._clip.duration,r=e._clip.duration,a=r/i,o=i/r;e.warp(1,a,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let i=this._mixer,r=i.time,a=this.timeScale,o=this._timeScaleInterpolant;o===null&&(o=i._lendControlInterpolant(),this._timeScaleInterpolant=o);let c=o.parameterPositions,l=o.sampleValues;return c[0]=r,c[1]=r+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){let e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled){this._updateWeight(e);return}let r=this._startTime;if(r!==null){let c=(e-r)*n;c<0||n===0?t=0:(this._startTime=null,t=n*c)}t*=this._updateTimeScale(e);let a=this._updateTime(t),o=this._updateWeight(e);if(o>0){let c=this._interpolants,l=this._propertyBindings;switch(this.blendMode){case Gu:for(let h=0,u=c.length;h!==u;++h)c[h].evaluate(a),l[h].accumulateAdditive(o);break;case zo:default:for(let h=0,u=c.length;h!==u;++h)c[h].evaluate(a),l[h].accumulate(i,o)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(n!==null){let i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;if(n!==null){let i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,i=this.time+e,r=this._loopCount,a=n===zu;if(e===0)return r===-1?i:a&&(r&1)===1?t-i:i;if(n===Bu){r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(r===-1&&(e>=0?(r=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),i>=t||i<0){let o=Math.floor(i/t);i-=t*o,r+=Math.abs(o);let c=this.repetitions-r;if(c<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(c===1){let l=e<0;this._setEndings(l,!l,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this._loopCount=r,this.time=i;if(a&&(r&1)===1)return t-i}return i}_setEndings(e,t,n){let i=this._interpolantSettings;n?(i.endingStart=Ei,i.endingEnd=Ei):(e?i.endingStart=this.zeroSlopeAtStart?Ei:wi:i.endingStart=Ys,t?i.endingEnd=this.zeroSlopeAtEnd?Ei:wi:i.endingEnd=Ys)}_scheduleFading(e,t,n){let i=this._mixer,r=i.time,a=this._weightInterpolant;a===null&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);let o=a.parameterPositions,c=a.sampleValues;return o[0]=r,c[0]=t,o[1]=r+e,c[1]=n,this}},pp=new Float32Array(1),vr=class extends mn{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}_bindAction(e,t){let n=e._localRoot||this._root,i=e._clip.tracks,r=i.length,a=e._propertyBindings,o=e._interpolants,c=n.uuid,l=this._bindingsByRootAndName,h=l[c];h===void 0&&(h={},l[c]=h);for(let u=0;u!==r;++u){let d=i[u],f=d.name,g=h[f];if(g!==void 0)++g.referenceCount,a[u]=g;else{if(g=a[u],g!==void 0){g._cacheIndex===null&&(++g.referenceCount,this._addInactiveBinding(g,c,f));continue}let _=t&&t._propertyBindings[u].binding.parsedPath;g=new Ja(tt.create(n,f,_),d.ValueTypeName,d.getValueSize()),++g.referenceCount,this._addInactiveBinding(g,c,f),a[u]=g}o[u].resultBuffer=g.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){let n=(e._localRoot||this._root).uuid,i=e._clip.uuid,r=this._actionsByClip[i];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,i,n)}let t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){let r=t[n];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){let r=t[n];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return t!==null&&t<this._nActiveActions}_addInactiveAction(e,t,n){let i=this._actions,r=this._actionsByClip,a=r[t];if(a===void 0)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=a;else{let o=a.knownActions;e._byClipCacheIndex=o.length,o.push(e)}e._cacheIndex=i.length,i.push(e),a.actionByRoot[n]=e}_removeInactiveAction(e){let t=this._actions,n=t[t.length-1],i=e._cacheIndex;n._cacheIndex=i,t[i]=n,t.pop(),e._cacheIndex=null;let r=e._clip.uuid,a=this._actionsByClip,o=a[r],c=o.knownActions,l=c[c.length-1],h=e._byClipCacheIndex;l._byClipCacheIndex=h,c[h]=l,c.pop(),e._byClipCacheIndex=null;let u=o.actionByRoot,d=(e._localRoot||this._root).uuid;delete u[d],c.length===0&&delete a[r],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){let t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){let r=t[n];--r.referenceCount===0&&this._removeInactiveBinding(r)}}_lendAction(e){let t=this._actions,n=e._cacheIndex,i=this._nActiveActions++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackAction(e){let t=this._actions,n=e._cacheIndex,i=--this._nActiveActions,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_addInactiveBinding(e,t,n){let i=this._bindingsByRootAndName,r=this._bindings,a=i[t];a===void 0&&(a={},i[t]=a),a[n]=e,e._cacheIndex=r.length,r.push(e)}_removeInactiveBinding(e){let t=this._bindings,n=e.binding,i=n.rootNode.uuid,r=n.path,a=this._bindingsByRootAndName,o=a[i],c=t[t.length-1],l=e._cacheIndex;c._cacheIndex=l,t[l]=c,t.pop(),delete o[r],Object.keys(o).length===0&&delete a[i]}_lendBinding(e){let t=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackBinding(e){let t=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_lendControlInterpolant(){let e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return n===void 0&&(n=new dr(new Float32Array(2),new Float32Array(2),1,pp),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){let t=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,r=t[i];e.__cacheIndex=i,t[i]=e,r.__cacheIndex=n,t[n]=r}clipAction(e,t,n){let i=t||this._root,r=i.uuid,a=typeof e=="string"?Oi.findByName(i,e):e,o=a!==null?a.uuid:e,c=this._actionsByClip[o],l=null;if(n===void 0&&(a!==null?n=a.blendMode:n=zo),c!==void 0){let u=c.actionByRoot[r];if(u!==void 0&&u.blendMode===n)return u;l=c.knownActions[0],a===null&&(a=l._clip)}if(a===null)return null;let h=new Ya(this,a,t,n);return this._bindAction(h,l),this._addInactiveAction(h,o,r),h}existingAction(e,t){let n=t||this._root,i=n.uuid,r=typeof e=="string"?Oi.findByName(n,e):e,a=r?r.uuid:e,o=this._actionsByClip[a];return o!==void 0&&o.actionByRoot[i]||null}stopAllAction(){let e=this._actions,t=this._nActiveActions;for(let n=t-1;n>=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,i=this.time+=e,r=Math.sign(e),a=this._accuIndex^=1;for(let l=0;l!==n;++l)t[l]._update(i,e,r,a);let o=this._bindings,c=this._nActiveBindings;for(let l=0;l!==c;++l)o[l].apply(a);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){let t=this._actions,n=e.uuid,i=this._actionsByClip,r=i[n];if(r!==void 0){let a=r.knownActions;for(let o=0,c=a.length;o!==c;++o){let l=a[o];this._deactivateAction(l);let h=l._cacheIndex,u=t[t.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,u._cacheIndex=h,t[h]=u,t.pop(),this._removeInactiveBindingsForAction(l)}delete i[n]}}uncacheRoot(e){let t=e.uuid,n=this._actionsByClip;for(let a in n){let o=n[a].actionByRoot,c=o[t];c!==void 0&&(this._deactivateAction(c),this._removeInactiveAction(c))}let i=this._bindingsByRootAndName,r=i[t];if(r!==void 0)for(let a in r){let o=r[a];o.restoreOriginalState(),this._removeInactiveBinding(o)}}uncacheAction(e,t){let n=this.existingAction(e,t);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}};var yr=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1,_e("Clock: This module has been deprecated. Please use THREE.Timer instead.")}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}};var Tl=class Tl{constructor(e,t,n,i){this.elements=[1,0,0,1],e!==void 0&&this.set(e,t,n,i)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,i){let r=this.elements;return r[0]=e,r[2]=t,r[1]=n,r[3]=i,this}};Tl.prototype.isMatrix2=!0;var Yc=Tl;function vl(s,e,t,n){let i=mp(n);switch(t){case dl:return s*e;case ro:return s*e/i.components*i.byteLength;case ao:return s*e/i.components*i.byteLength;case gi:return s*e*2/i.components*i.byteLength;case oo:return s*e*2/i.components*i.byteLength;case fl:return s*e*3/i.components*i.byteLength;case Qt:return s*e*4/i.components*i.byteLength;case co:return s*e*4/i.components*i.byteLength;case Tr:case wr:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case Er:case Rr:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case ho:case fo:return Math.max(s,16)*Math.max(e,8)/4;case lo:case uo:return Math.max(s,8)*Math.max(e,8)/2;case po:case mo:case bo:case xo:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case go:case Cr:case _o:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case vo:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case yo:return Math.floor((s+4)/5)*Math.floor((e+3)/4)*16;case Mo:return Math.floor((s+4)/5)*Math.floor((e+4)/5)*16;case So:return Math.floor((s+5)/6)*Math.floor((e+4)/5)*16;case Ao:return Math.floor((s+5)/6)*Math.floor((e+5)/6)*16;case To:return Math.floor((s+7)/8)*Math.floor((e+4)/5)*16;case wo:return Math.floor((s+7)/8)*Math.floor((e+5)/6)*16;case Eo:return Math.floor((s+7)/8)*Math.floor((e+7)/8)*16;case Ro:return Math.floor((s+9)/10)*Math.floor((e+4)/5)*16;case Co:return Math.floor((s+9)/10)*Math.floor((e+5)/6)*16;case Po:return Math.floor((s+9)/10)*Math.floor((e+7)/8)*16;case Io:return Math.floor((s+9)/10)*Math.floor((e+9)/10)*16;case Lo:return Math.floor((s+11)/12)*Math.floor((e+9)/10)*16;case Do:return Math.floor((s+11)/12)*Math.floor((e+11)/12)*16;case Fo:case No:case Uo:return Math.ceil(s/4)*Math.ceil(e/4)*16;case Oo:case ko:return Math.ceil(s/4)*Math.ceil(e/4)*8;case Pr:case Bo:return Math.ceil(s/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function mp(s){switch(s){case qt:case cl:return{byteLength:1,components:1};case ws:case ll:case Fn:return{byteLength:2,components:1};case io:case so:return{byteLength:2,components:4};case _n:case no:case $t:return{byteLength:4,components:1};case hl:case ul:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"184"}}));typeof window<"u"&&(window.__THREE__?_e("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="184");function wd(){let s=null,e=!1,t=null,n=null;function i(r,a){t(r,a),n=s.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&s!==null&&(n=s.requestAnimationFrame(i),e=!0)},stop:function(){s!==null&&s.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){s=r}}}function bp(s){let e=new WeakMap;function t(o,c){let l=o.array,h=o.usage,u=l.byteLength,d=s.createBuffer();s.bindBuffer(c,d),s.bufferData(c,l,h),o.onUploadCallback();let f;if(l instanceof Float32Array)f=s.FLOAT;else if(typeof Float16Array<"u"&&l instanceof Float16Array)f=s.HALF_FLOAT;else if(l instanceof Uint16Array)o.isFloat16BufferAttribute?f=s.HALF_FLOAT:f=s.UNSIGNED_SHORT;else if(l instanceof Int16Array)f=s.SHORT;else if(l instanceof Uint32Array)f=s.UNSIGNED_INT;else if(l instanceof Int32Array)f=s.INT;else if(l instanceof Int8Array)f=s.BYTE;else if(l instanceof Uint8Array)f=s.UNSIGNED_BYTE;else if(l instanceof Uint8ClampedArray)f=s.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+l);return{buffer:d,type:f,bytesPerElement:l.BYTES_PER_ELEMENT,version:o.version,size:u}}function n(o,c,l){let h=c.array,u=c.updateRanges;if(s.bindBuffer(l,o),u.length===0)s.bufferSubData(l,0,h);else{u.sort((f,g)=>f.start-g.start);let d=0;for(let f=1;f<u.length;f++){let g=u[d],_=u[f];_.start<=g.start+g.count+1?g.count=Math.max(g.count,_.start+_.count-g.start):(++d,u[d]=_)}u.length=d+1;for(let f=0,g=u.length;f<g;f++){let _=u[f];s.bufferSubData(l,_.start*h.BYTES_PER_ELEMENT,h,_.start,_.count)}c.clearUpdateRanges()}c.onUploadCallback()}function i(o){return o.isInterleavedBufferAttribute&&(o=o.data),e.get(o)}function r(o){o.isInterleavedBufferAttribute&&(o=o.data);let c=e.get(o);c&&(s.deleteBuffer(c.buffer),e.delete(o))}function a(o,c){if(o.isInterleavedBufferAttribute&&(o=o.data),o.isGLBufferAttribute){let h=e.get(o);(!h||h.version<o.version)&&e.set(o,{buffer:o.buffer,type:o.type,bytesPerElement:o.elementSize,version:o.version});return}let l=e.get(o);if(l===void 0)e.set(o,t(o,c));else if(l.version<o.version){if(l.size!==o.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(l.buffer,o,c),l.version=o.version}}return{get:i,remove:r,update:a}}var xp=`#ifdef USE_ALPHAHASH
+}`,$t=class extends Gt{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=bp,this.fragmentShader=xp,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Wi(e.uniforms),this.uniformsGroups=gp(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){let t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(let i in this.uniforms){let a=this.uniforms[i].value;a&&a.isTexture?t.uniforms[i]={type:"t",value:a.toJSON(e).uuid}:a&&a.isColor?t.uniforms[i]={type:"c",value:a.getHex()}:a&&a.isVector2?t.uniforms[i]={type:"v2",value:a.toArray()}:a&&a.isVector3?t.uniforms[i]={type:"v3",value:a.toArray()}:a&&a.isVector4?t.uniforms[i]={type:"v4",value:a.toArray()}:a&&a.isMatrix3?t.uniforms[i]={type:"m3",value:a.toArray()}:a&&a.isMatrix4?t.uniforms[i]={type:"m4",value:a.toArray()}:t.uniforms[i]={value:a}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}},Ha=class extends $t{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}},Cn=class extends Gt{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Te(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ur,this.normalScale=new He(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Rn,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},Ht=class extends Cn{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new He(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Ve(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Te(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Te(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Te(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}};var pr=class extends Gt{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Te(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ur,this.normalScale=new He(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Rn,this.combine=io,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},Wa=class extends Gt{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=td,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},qa=class extends Gt{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};function Ma(s,e){return!s||s.constructor===e?s:typeof e.BYTES_PER_ELEMENT=="number"?new e(s):Array.prototype.slice.call(s)}function _p(s){function e(i,r){return s[i]-s[r]}let t=s.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function Mu(s,e,t){let n=s.length,i=new s.constructor(n);for(let r=0,a=0;a!==n;++r){let o=t[r]*e;for(let c=0;c!==e;++c)i[a++]=s[o+c]}return i}function md(s,e,t,n){let i=1,r=s[0];for(;r!==void 0&&r[n]===void 0;)r=s[i++];if(r===void 0)return;let a=r[n];if(a!==void 0)if(Array.isArray(a))do a=r[n],a!==void 0&&(e.push(r.time),t.push(...a)),r=s[i++];while(r!==void 0);else if(a.toArray!==void 0)do a=r[n],a!==void 0&&(e.push(r.time),a.toArray(t,t.length)),r=s[i++];while(r!==void 0);else do a=r[n],a!==void 0&&(e.push(r.time),t.push(a)),r=s[i++];while(r!==void 0)}var Pn=class{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,n=this._cachedIndex,i=t[n],r=t[n-1];e:{t:{let a;n:{i:if(!(e<i)){for(let o=n+2;;){if(i===void 0){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===o)break;if(r=i,i=t[++n],e<i)break t}a=t.length;break n}if(!(e>=r)){let o=t[1];e<o&&(n=2,r=o);for(let c=n-2;;){if(r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===c)break;if(i=r,r=t[--n-1],e>=r)break t}a=n,n=0;break n}break e}for(;n<a;){let o=n+a>>>1;e<t[o]?a=o:n=o+1}if(i=t[n],r=t[n-1],r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let a=0;a!==i;++a)t[a]=n[r+a];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}},Xa=class extends Pn{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Ri,endingEnd:Ri}}intervalChanged_(e,t,n){let i=this.parameterPositions,r=e-2,a=e+1,o=i[r],c=i[a];if(o===void 0)switch(this.getSettings_().endingStart){case Ci:r=e,o=2*t-n;break;case Qs:r=i.length-2,o=t+i[r]-i[r+1];break;default:r=e,o=n}if(c===void 0)switch(this.getSettings_().endingEnd){case Ci:a=e,c=2*n-t;break;case Qs:a=1,c=n+i[1]-i[0];break;default:a=e-1,c=t}let l=(n-t)*.5,h=this.valueSize;this._weightPrev=l/(t-o),this._weightNext=l/(c-n),this._offsetPrev=r*h,this._offsetNext=a*h}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=e*o,l=c-o,h=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,f=this._weightNext,g=(n-t)/(i-t),_=g*g,m=_*g,p=-d*m+2*d*_-d*g,v=(1+d)*m+(-1.5-2*d)*_+(-.5+d)*g+1,S=(-1-f)*m+(1.5+f)*_+.5*g,M=f*m-f*_;for(let E=0;E!==o;++E)r[E]=p*a[h+E]+v*a[l+E]+S*a[c+E]+M*a[u+E];return r}},mr=class extends Pn{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=e*o,l=c-o,h=(n-t)/(i-t),u=1-h;for(let d=0;d!==o;++d)r[d]=a[l+d]*u+a[c+d]*h;return r}},ja=class extends Pn{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}},Ka=class extends Pn{interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=e*o,l=c-o,h=this.settings||this.DefaultSettings_,u=h.inTangents,d=h.outTangents;if(!u||!d){let _=(n-t)/(i-t),m=1-_;for(let p=0;p!==o;++p)r[p]=a[l+p]*m+a[c+p]*_;return r}let f=o*2,g=e-1;for(let _=0;_!==o;++_){let m=a[l+_],p=a[c+_],v=g*f+_*2,S=d[v],M=d[v+1],E=e*f+_*2,T=u[E],C=u[E+1],x=(n-t)/(i-t),w,L,R,O,H;for(let q=0;q<8;q++){w=x*x,L=w*x,R=1-x,O=R*R,H=O*R;let z=H*t+3*O*x*S+3*R*w*T+L*i-n;if(Math.abs(z)<1e-10)break;let V=3*O*(S-t)+6*R*x*(T-S)+3*w*(i-T);if(Math.abs(V)<1e-10)break;x=x-z/V,x=Math.max(0,Math.min(1,x))}r[_]=H*m+3*O*x*M+3*R*w*C+L*p}return r}},Wt=class{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Ma(t,this.TimeBufferType),this.values=Ma(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){let t=e.constructor,n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:Ma(e.times,Array),values:Ma(e.values,Array)};let i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new ja(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new mr(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Xa(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodBezier(e){let t=new Ka(this.times,this.values,this.getValueSize(),e);return this.settings&&(t.settings=this.settings),t}setInterpolation(e){let t;switch(e){case Li:t=this.InterpolantFactoryMethodDiscrete;break;case Di:t=this.InterpolantFactoryMethodLinear;break;case Ta:t=this.InterpolantFactoryMethodSmooth;break;case $c:t=this.InterpolantFactoryMethodBezier;break}if(t===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return _e("KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Li;case this.InterpolantFactoryMethodLinear:return Di;case this.InterpolantFactoryMethodSmooth:return Ta;case this.InterpolantFactoryMethodBezier:return $c}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){let t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){let t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){let n=this.times,i=n.length,r=0,a=i-1;for(;r!==i&&n[r]<e;)++r;for(;a!==-1&&n[a]>t;)--a;if(++a,r!==0||a!==i){r>=a&&(a=Math.max(a,1),r=a-1);let o=this.getValueSize();this.times=n.slice(r,a),this.values=this.values.slice(r*o,a*o)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(we("KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,i=this.values,r=n.length;r===0&&(we("KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let o=0;o!==r;o++){let c=n[o];if(typeof c=="number"&&isNaN(c)){we("KeyframeTrack: Time is not a valid number.",this,o,c),e=!1;break}if(a!==null&&a>c){we("KeyframeTrack: Out of order keys.",this,o,c,a),e=!1;break}a=c}if(i!==void 0&&Lf(i))for(let o=0,c=i.length;o!==c;++o){let l=i[o];if(isNaN(l)){we("KeyframeTrack: Value is not a valid number.",this,o,l),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===Ta,r=e.length-1,a=1;for(let o=1;o<r;++o){let c=!1,l=e[o],h=e[o+1];if(l!==h&&(o!==1||l!==e[0]))if(i)c=!0;else{let u=o*n,d=u-n,f=u+n;for(let g=0;g!==n;++g){let _=t[u+g];if(_!==t[d+g]||_!==t[f+g]){c=!0;break}}}if(c){if(o!==a){e[a]=e[o];let u=o*n,d=a*n;for(let f=0;f!==n;++f)t[d+f]=t[u+f]}++a}}if(r>0){e[a]=e[r];for(let o=r*n,c=a*n,l=0;l!==n;++l)t[c+l]=t[o+l];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}};Wt.prototype.ValueTypeName="";Wt.prototype.TimeBufferType=Float32Array;Wt.prototype.ValueBufferType=Float32Array;Wt.prototype.DefaultInterpolation=Di;var Jn=class extends Wt{constructor(e,t,n){super(e,t,n)}};Jn.prototype.ValueTypeName="bool";Jn.prototype.ValueBufferType=Array;Jn.prototype.DefaultInterpolation=Li;Jn.prototype.InterpolantFactoryMethodLinear=void 0;Jn.prototype.InterpolantFactoryMethodSmooth=void 0;var gr=class extends Wt{constructor(e,t,n,i){super(e,t,n,i)}};gr.prototype.ValueTypeName="color";var In=class extends Wt{constructor(e,t,n,i){super(e,t,n,i)}};In.prototype.ValueTypeName="number";var Ya=class extends Pn{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=(n-t)/(i-t),l=e*o;for(let h=l+o;l!==h;l+=4)Ft.slerpFlat(r,0,a,l-o,a,l,c);return r}},Ln=class extends Wt{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new Ya(this.times,this.values,this.getValueSize(),e)}};Ln.prototype.ValueTypeName="quaternion";Ln.prototype.InterpolantFactoryMethodSmooth=void 0;var $n=class extends Wt{constructor(e,t,n){super(e,t,n)}};$n.prototype.ValueTypeName="string";$n.prototype.ValueBufferType=Array;$n.prototype.DefaultInterpolation=Li;$n.prototype.InterpolantFactoryMethodLinear=void 0;$n.prototype.InterpolantFactoryMethodSmooth=void 0;var Dn=class extends Wt{constructor(e,t,n,i){super(e,t,n,i)}};Dn.prototype.ValueTypeName="vector";var Bi=class{constructor(e="",t=-1,n=[],i=qo){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=pn(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,i=1/(e.fps||1);for(let a=0,o=n.length;a!==o;++a)t.push(yp(n[a]).scale(i));let r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r.userData=JSON.parse(e.userData||"{}"),r}static toJSON(e){let t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let r=0,a=n.length;r!==a;++r)t.push(Wt.toJSON(n[r]));return i}static CreateFromMorphTargetSequence(e,t,n,i){let r=t.length,a=[];for(let o=0;o<r;o++){let c=[],l=[];c.push((o+r-1)%r,o,(o+1)%r),l.push(0,1,0);let h=_p(c);c=Mu(c,1,h),l=Mu(l,1,h),!i&&c[0]===0&&(c.push(r),l.push(l[0])),a.push(new In(".morphTargetInfluences["+t[o].name+"]",c,l).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;if(!Array.isArray(e)){let i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){let i={},r=/^([\w-]*?)([\d]+)$/;for(let o=0,c=e.length;o<c;o++){let l=e[o],h=l.name.match(r);if(h&&h.length>1){let u=h[1],d=i[u];d||(i[u]=d=[]),d.push(l)}}let a=[];for(let o in i)a.push(this.CreateFromMorphTargetSequence(o,i[o],t,n));return a}static parseAnimation(e,t){if(_e("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return we("AnimationClip: No animation in JSONLoader data."),null;let n=function(u,d,f,g,_){if(f.length!==0){let m=[],p=[];md(f,m,p,g),m.length!==0&&_.push(new u(d,m,p))}},i=[],r=e.name||"default",a=e.fps||30,o=e.blendMode,c=e.length||-1,l=e.hierarchy||[];for(let u=0;u<l.length;u++){let d=l[u].keys;if(!(!d||d.length===0))if(d[0].morphTargets){let f={},g;for(g=0;g<d.length;g++)if(d[g].morphTargets)for(let _=0;_<d[g].morphTargets.length;_++)f[d[g].morphTargets[_]]=-1;for(let _ in f){let m=[],p=[];for(let v=0;v!==d[g].morphTargets.length;++v){let S=d[g];m.push(S.time),p.push(S.morphTarget===_?1:0)}i.push(new In(".morphTargetInfluence["+_+"]",m,p))}c=f.length*a}else{let f=".bones["+t[u].name+"]";n(Dn,f+".position",d,"pos",i),n(Ln,f+".quaternion",d,"rot",i),n(Dn,f+".scale",d,"scl",i)}}return i.length===0?null:new this(r,c,i,o)}resetDuration(){let e=this.tracks,t=0;for(let n=0,i=e.length;n!==i;++n){let r=this.tracks[n];t=Math.max(t,r.times[r.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){let e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());let t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}};function vp(s){switch(s.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return In;case"vector":case"vector2":case"vector3":case"vector4":return Dn;case"color":return gr;case"quaternion":return Ln;case"bool":case"boolean":return Jn;case"string":return $n}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+s)}function yp(s){if(s.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");let e=vp(s.type);if(s.times===void 0){let t=[],n=[];md(s.keys,t,n,"value"),s.times=t,s.values=n}return e.parse!==void 0?e.parse(s):new e(s.name,s.times,s.values,s.interpolation)}var wn={enabled:!1,files:{},add:function(s,e){this.enabled!==!1&&(Su(s)||(this.files[s]=e))},get:function(s){if(this.enabled!==!1&&!Su(s))return this.files[s]},remove:function(s){delete this.files[s]},clear:function(){this.files={}}};function Su(s){try{let e=s.slice(s.indexOf(":")+1);return new URL(e).protocol==="blob:"}catch{return!1}}var Ja=class{constructor(e,t,n){let i=this,r=!1,a=0,o=0,c,l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(h){o++,r===!1&&i.onStart!==void 0&&i.onStart(h,a,o),r=!0},this.itemEnd=function(h){a++,i.onProgress!==void 0&&i.onProgress(h,a,o),a===o&&(r=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(h){i.onError!==void 0&&i.onError(h)},this.resolveURL=function(h){return c?c(h):h},this.setURLModifier=function(h){return c=h,this},this.addHandler=function(h,u){return l.push(h,u),this},this.removeHandler=function(h){let u=l.indexOf(h);return u!==-1&&l.splice(u,2),this},this.getHandler=function(h){for(let u=0,d=l.length;u<d;u+=2){let f=l[u],g=l[u+1];if(f.global&&(f.lastIndex=0),f.test(h))return g}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}},gd=new Ja,Fn=class{constructor(e){this.manager=e!==void 0?e:gd,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}load(){}loadAsync(e,t){let n=this;return new Promise(function(i,r){n.load(e,i,t,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}};Fn.DEFAULT_MATERIAL_NAME="__DEFAULT";var jn={},el=class extends Error{constructor(e,t){super(e),this.response=t}},ws=class extends Fn{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let r=wn.get(`file:${e}`);if(r!==void 0){this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0);return}if(jn[e]!==void 0){jn[e].push({onLoad:t,onProgress:n,onError:i});return}jn[e]=[],jn[e].push({onLoad:t,onProgress:n,onError:i});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),o=this.mimeType,c=this.responseType;fetch(a).then(l=>{if(l.status===200||l.status===0){if(l.status===0&&_e("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||l.body===void 0||l.body.getReader===void 0)return l;let h=jn[e],u=l.body.getReader(),d=l.headers.get("X-File-Size")||l.headers.get("Content-Length"),f=d?parseInt(d):0,g=f!==0,_=0,m=new ReadableStream({start(p){v();function v(){u.read().then(({done:S,value:M})=>{if(S)p.close();else{_+=M.byteLength;let E=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:f});for(let T=0,C=h.length;T<C;T++){let x=h[T];x.onProgress&&x.onProgress(E)}p.enqueue(M),v()}},S=>{p.error(S)})}}});return new Response(m)}else throw new el(`fetch for "${l.url}" responded with ${l.status}: ${l.statusText}`,l)}).then(l=>{switch(c){case"arraybuffer":return l.arrayBuffer();case"blob":return l.blob();case"document":return l.text().then(h=>new DOMParser().parseFromString(h,o));case"json":return l.json();default:if(o==="")return l.text();{let u=/charset="?([^;"\s]*)"?/i.exec(o),d=u&&u[1]?u[1].toLowerCase():void 0,f=new TextDecoder(d);return l.arrayBuffer().then(g=>f.decode(g))}}}).then(l=>{wn.add(`file:${e}`,l);let h=jn[e];delete jn[e];for(let u=0,d=h.length;u<d;u++){let f=h[u];f.onLoad&&f.onLoad(l)}}).catch(l=>{let h=jn[e];if(h===void 0)throw this.manager.itemError(e),l;delete jn[e];for(let u=0,d=h.length;u<d;u++){let f=h[u];f.onError&&f.onError(l)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}};var ls=new WeakMap,$a=class extends Fn{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let r=this,a=wn.get(`image:${e}`);if(a!==void 0){if(a.complete===!0)r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0);else{let u=ls.get(a);u===void 0&&(u=[],ls.set(a,u)),u.push({onLoad:t,onError:i})}return a}let o=ms("img");function c(){h(),t&&t(this);let u=ls.get(this)||[];for(let d=0;d<u.length;d++){let f=u[d];f.onLoad&&f.onLoad(this)}ls.delete(this),r.manager.itemEnd(e)}function l(u){h(),i&&i(u),wn.remove(`image:${e}`);let d=ls.get(this)||[];for(let f=0;f<d.length;f++){let g=d[f];g.onError&&g.onError(u)}ls.delete(this),r.manager.itemError(e),r.manager.itemEnd(e)}function h(){o.removeEventListener("load",c,!1),o.removeEventListener("error",l,!1)}return o.addEventListener("load",c,!1),o.addEventListener("error",l,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(o.crossOrigin=this.crossOrigin),wn.add(`image:${e}`,o),r.manager.itemStart(e),o.src=e,o}};var br=class extends Fn{constructor(e){super(e)}load(e,t,n,i){let r=new Ct,a=new $a(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(o){r.image=o,r.needsUpdate=!0,t!==void 0&&t(r)},n,i),r}},zi=class extends ct{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Te(e),this.intensity=t}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,t}};var Kc=new Ue,Au=new F,Tu=new F,xr=class{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new He(512,512),this.mapType=qt,this.map=null,this.mapPass=null,this.matrix=new Ue,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ss,this._frameExtents=new He(1,1),this._viewportCount=1,this._viewports=[new nt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,n=this.matrix;Au.setFromMatrixPosition(e.matrixWorld),t.position.copy(Au),Tu.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Tu),t.updateMatrixWorld(),Kc.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Kc,t.coordinateSystem,t.reversedDepth),t.coordinateSystem===ps||t.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Kc)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this.biasNode=e.biasNode,this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}},Sa=new F,Aa=new Ft,An=new F,_r=class extends ct{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ue,this.projectionMatrix=new Ue,this.projectionMatrixInverse=new Ue,this.coordinateSystem=dn,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(Sa,Aa,An),An.x===1&&An.y===1&&An.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Sa,Aa,An.set(1,1,1)).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorld.decompose(Sa,Aa,An),An.x===1&&An.y===1&&An.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Sa,Aa,An.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}},ci=new F,wu=new He,Eu=new He,Mt=class extends _r{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=Fi*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan($s*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Fi*2*Math.atan(Math.tan($s*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){ci.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ci.x,ci.y).multiplyScalar(-e/ci.z),ci.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ci.x,ci.y).multiplyScalar(-e/ci.z)}getViewSize(e,t){return this.getViewBounds(e,wu,Eu),t.subVectors(Eu,wu)}setViewOffset(e,t,n,i,r,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan($s*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i,a=this.view;if(this.view!==null&&this.view.enabled){let c=a.fullWidth,l=a.fullHeight;r+=a.offsetX*i/c,t-=a.offsetY*n/l,i*=a.width/c,n*=a.height/l}let o=this.filmOffset;o!==0&&(r+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}},tl=class extends xr{constructor(){super(new Mt(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){let t=this.camera,n=Fi*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,r=e.distance||t.far;(n!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}},vr=class extends zi{constructor(e,t,n=0,i=Math.PI/3,r=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ct.DEFAULT_UP),this.updateMatrix(),this.target=new ct,this.distance=n,this.angle=i,this.penumbra=r,this.decay=a,this.map=null,this.shadow=new tl}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.distance=this.distance,t.object.angle=this.angle,t.object.decay=this.decay,t.object.penumbra=this.penumbra,t.object.target=this.target.uuid,this.map&&this.map.isTexture&&(t.object.map=this.map.toJSON(e).uuid),t.object.shadow=this.shadow.toJSON(),t}},nl=class extends xr{constructor(){super(new Mt(90,1,.5,500)),this.isPointLightShadow=!0}},Gi=class extends zi{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new nl}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.distance=this.distance,t.object.decay=this.decay,t.object.shadow=this.shadow.toJSON(),t}},pi=class extends _r{constructor(e=-1,t=1,n=1,i=-1,r=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,r=n-e,a=n+e,o=i+t,c=i-t;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=l*this.view.offsetX,a=r+l*this.view.width,o-=h*this.view.offsetY,c=o-h*this.view.height}this.projectionMatrix.makeOrthographic(r,a,o,c,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}},il=class extends xr{constructor(){super(new pi(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},mi=class extends zi{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ct.DEFAULT_UP),this.updateMatrix(),this.target=new ct,this.shadow=new il}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.shadow=this.shadow.toJSON(),t.object.target=this.target.uuid,t}},yr=class extends zi{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}};var Zn=class{static extractUrlBase(e){let t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}};var Yc=new WeakMap,Mr=class extends Fn{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&_e("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&_e("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let r=this,a=wn.get(`image-bitmap:${e}`);if(a!==void 0){if(r.manager.itemStart(e),a.then){a.then(l=>{Yc.has(a)===!0?(i&&i(Yc.get(a)),r.manager.itemError(e),r.manager.itemEnd(e)):(t&&t(l),r.manager.itemEnd(e))});return}setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0);return}let o={};o.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",o.headers=this.requestHeader,o.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;let c=fetch(e,o).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(l){wn.add(`image-bitmap:${e}`,l),t&&t(l),r.manager.itemEnd(e)}).catch(function(l){i&&i(l),Yc.set(c,l),wn.remove(`image-bitmap:${e}`),r.manager.itemError(e),r.manager.itemEnd(e)});wn.add(`image-bitmap:${e}`,c),r.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}};var hs=-90,us=1,Za=class extends ct{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let i=new Mt(hs,us,e,t);i.layers=this.layers,this.add(i);let r=new Mt(hs,us,e,t);r.layers=this.layers,this.add(r);let a=new Mt(hs,us,e,t);a.layers=this.layers,this.add(a);let o=new Mt(hs,us,e,t);o.layers=this.layers,this.add(o);let c=new Mt(hs,us,e,t);c.layers=this.layers,this.add(c);let l=new Mt(hs,us,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,i,r,a,o,c]=t;for(let l of t)this.remove(l);if(e===dn)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===ps)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(let l of t)this.add(l),l.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[r,a,o,c,l,h]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;let _=n.texture.generateMipmaps;n.texture.generateMipmaps=!1;let m=!1;e.isWebGLRenderer===!0?m=e.state.buffers.depth.getReversed():m=e.reversedDepthBuffer,e.setRenderTarget(n,0,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,r),e.setRenderTarget(n,1,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,a),e.setRenderTarget(n,2,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,o),e.setRenderTarget(n,3,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,c),e.setRenderTarget(n,4,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,l),n.texture.generateMipmaps=_,e.setRenderTarget(n,5,i),m&&e.autoClear===!1&&e.clearDepth(),e.render(t,h),e.setRenderTarget(u,d,f),e.xr.enabled=g,n.texture.needsPMREMUpdate=!0}},Qa=class extends Mt{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}};var eo=class{constructor(e,t,n){this.binding=e,this.valueSize=n;let i,r,a;switch(t){case"quaternion":i=this._slerp,r=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":i=this._select,r=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:i=this._lerp,r=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*5)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=r,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){let n=this.buffer,i=this.valueSize,r=e*i+i,a=this.cumulativeWeight;if(a===0){for(let o=0;o!==i;++o)n[r+o]=n[o];a=t}else{a+=t;let o=t/a;this._mixBufferRegion(n,r,0,o,i)}this.cumulativeWeight=a}accumulateAdditive(e){let t=this.buffer,n=this.valueSize,i=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,i,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){let t=this.valueSize,n=this.buffer,i=e*t+t,r=this.cumulativeWeight,a=this.cumulativeWeightAdditive,o=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){let c=t*this._origIndex;this._mixBufferRegion(n,i,c,1-r,t)}a>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let c=t,l=t+t;c!==l;++c)if(n[c]!==n[c+t]){o.setValue(n,i);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let r=n,a=i;r!==a;++r)t[r]=t[i+r%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,i,r){if(i>=.5)for(let a=0;a!==r;++a)e[t+a]=e[n+a]}_slerp(e,t,n,i){Ft.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,r){let a=this._workIndex*r;Ft.multiplyQuaternionsFlat(e,a,e,t,e,n),Ft.slerpFlat(e,t,e,t,e,a,i)}_lerp(e,t,n,i,r){let a=1-i;for(let o=0;o!==r;++o){let c=t+o;e[c]=e[c]*a+e[n+o]*i}}_lerpAdditive(e,t,n,i,r){for(let a=0;a!==r;++a){let o=t+a;e[o]=e[o]+e[n+a]*i}}},El="\\[\\]\\.:\\/",Mp=new RegExp("["+El+"]","g"),Rl="[^"+El+"]",Sp="[^"+El.replace("\\.","")+"]",Ap=/((?:WC+[\/:])*)/.source.replace("WC",Rl),Tp=/(WCOD+)?/.source.replace("WCOD",Sp),wp=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Rl),Ep=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Rl),Rp=new RegExp("^"+Ap+Tp+wp+Ep+"$"),Cp=["material","materials","bones","map"],sl=class{constructor(e,t,n){let i=n||tt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},tt=class s{constructor(e,t,n){this.path=t,this.parsedPath=n||s.parseTrackName(t),this.node=s.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new s.Composite(e,t,n):new s(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Mp,"")}static parseTrackName(e){let t=Rp.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let r=n.nodeName.substring(i+1);Cp.indexOf(r)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=r)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(r){for(let a=0;a<r.length;a++){let o=r[a];if(o.name===t||o.uuid===t)return o;let c=n(o.children);if(c)return c}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)e[t++]=n[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node,t=this.parsedPath,n=t.objectName,i=t.propertyName,r=t.propertyIndex;if(e||(e=s.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){_e("PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let l=t.objectIndex;switch(n){case"materials":if(!e.material){we("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){we("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){we("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let h=0;h<e.length;h++)if(e[h].name===l){l=h;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){we("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){we("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){we("PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(l!==void 0){if(e[l]===void 0){we("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[l]}}let a=e[i];if(a===void 0){let l=t.nodeName;we("PropertyBinding: Trying to update property for track: "+l+"."+i+" but it wasn't found.",e);return}let o=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?o=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(o=this.Versioning.MatrixWorldNeedsUpdate);let c=this.BindingType.Direct;if(r!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){we("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){we("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[r]!==void 0&&(r=e.morphTargetDictionary[r])}c=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=r}else a.fromArray!==void 0&&a.toArray!==void 0?(c=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(c=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=i;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};tt.Composite=sl;tt.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};tt.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};tt.prototype.GetterByBindingType=[tt.prototype._getValue_direct,tt.prototype._getValue_array,tt.prototype._getValue_arrayElement,tt.prototype._getValue_toArray];tt.prototype.SetterByBindingTypeAndVersioning=[[tt.prototype._setValue_direct,tt.prototype._setValue_direct_setNeedsUpdate,tt.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[tt.prototype._setValue_array,tt.prototype._setValue_array_setNeedsUpdate,tt.prototype._setValue_array_setMatrixWorldNeedsUpdate],[tt.prototype._setValue_arrayElement,tt.prototype._setValue_arrayElement_setNeedsUpdate,tt.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[tt.prototype._setValue_fromArray,tt.prototype._setValue_fromArray_setNeedsUpdate,tt.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var to=class{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;let r=t.tracks,a=r.length,o=new Array(a),c={endingStart:Ri,endingEnd:Ri};for(let l=0;l!==a;++l){let h=r[l].createInterpolant(null);o[l]=h,h.settings&&Object.assign(c,h.settings),h.settings=c}this._interpolantSettings=c,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Fr,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){let i=this._clip.duration,r=e._clip.duration,a=r/i,o=i/r;e.warp(1,a,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let i=this._mixer,r=i.time,a=this.timeScale,o=this._timeScaleInterpolant;o===null&&(o=i._lendControlInterpolant(),this._timeScaleInterpolant=o);let c=o.parameterPositions,l=o.sampleValues;return c[0]=r,c[1]=r+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){let e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled){this._updateWeight(e);return}let r=this._startTime;if(r!==null){let c=(e-r)*n;c<0||n===0?t=0:(this._startTime=null,t=n*c)}t*=this._updateTimeScale(e);let a=this._updateTime(t),o=this._updateWeight(e);if(o>0){let c=this._interpolants,l=this._propertyBindings;switch(this.blendMode){case ed:for(let h=0,u=c.length;h!==u;++h)c[h].evaluate(a),l[h].accumulateAdditive(o);break;case qo:default:for(let h=0,u=c.length;h!==u;++h)c[h].evaluate(a),l[h].accumulate(i,o)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(n!==null){let i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;if(n!==null){let i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,i=this.time+e,r=this._loopCount,a=n===Qu;if(e===0)return r===-1?i:a&&(r&1)===1?t-i:i;if(n===Zu){r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(r===-1&&(e>=0?(r=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),i>=t||i<0){let o=Math.floor(i/t);i-=t*o,r+=Math.abs(o);let c=this.repetitions-r;if(c<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(c===1){let l=e<0;this._setEndings(l,!l,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this._loopCount=r,this.time=i;if(a&&(r&1)===1)return t-i}return i}_setEndings(e,t,n){let i=this._interpolantSettings;n?(i.endingStart=Ci,i.endingEnd=Ci):(e?i.endingStart=this.zeroSlopeAtStart?Ci:Ri:i.endingStart=Qs,t?i.endingEnd=this.zeroSlopeAtEnd?Ci:Ri:i.endingEnd=Qs)}_scheduleFading(e,t,n){let i=this._mixer,r=i.time,a=this._weightInterpolant;a===null&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);let o=a.parameterPositions,c=a.sampleValues;return o[0]=r,c[0]=t,o[1]=r+e,c[1]=n,this}},Pp=new Float32Array(1),Sr=class extends gn{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}_bindAction(e,t){let n=e._localRoot||this._root,i=e._clip.tracks,r=i.length,a=e._propertyBindings,o=e._interpolants,c=n.uuid,l=this._bindingsByRootAndName,h=l[c];h===void 0&&(h={},l[c]=h);for(let u=0;u!==r;++u){let d=i[u],f=d.name,g=h[f];if(g!==void 0)++g.referenceCount,a[u]=g;else{if(g=a[u],g!==void 0){g._cacheIndex===null&&(++g.referenceCount,this._addInactiveBinding(g,c,f));continue}let _=t&&t._propertyBindings[u].binding.parsedPath;g=new eo(tt.create(n,f,_),d.ValueTypeName,d.getValueSize()),++g.referenceCount,this._addInactiveBinding(g,c,f),a[u]=g}o[u].resultBuffer=g.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){let n=(e._localRoot||this._root).uuid,i=e._clip.uuid,r=this._actionsByClip[i];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,i,n)}let t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){let r=t[n];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){let r=t[n];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return t!==null&&t<this._nActiveActions}_addInactiveAction(e,t,n){let i=this._actions,r=this._actionsByClip,a=r[t];if(a===void 0)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=a;else{let o=a.knownActions;e._byClipCacheIndex=o.length,o.push(e)}e._cacheIndex=i.length,i.push(e),a.actionByRoot[n]=e}_removeInactiveAction(e){let t=this._actions,n=t[t.length-1],i=e._cacheIndex;n._cacheIndex=i,t[i]=n,t.pop(),e._cacheIndex=null;let r=e._clip.uuid,a=this._actionsByClip,o=a[r],c=o.knownActions,l=c[c.length-1],h=e._byClipCacheIndex;l._byClipCacheIndex=h,c[h]=l,c.pop(),e._byClipCacheIndex=null;let u=o.actionByRoot,d=(e._localRoot||this._root).uuid;delete u[d],c.length===0&&delete a[r],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){let t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){let r=t[n];--r.referenceCount===0&&this._removeInactiveBinding(r)}}_lendAction(e){let t=this._actions,n=e._cacheIndex,i=this._nActiveActions++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackAction(e){let t=this._actions,n=e._cacheIndex,i=--this._nActiveActions,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_addInactiveBinding(e,t,n){let i=this._bindingsByRootAndName,r=this._bindings,a=i[t];a===void 0&&(a={},i[t]=a),a[n]=e,e._cacheIndex=r.length,r.push(e)}_removeInactiveBinding(e){let t=this._bindings,n=e.binding,i=n.rootNode.uuid,r=n.path,a=this._bindingsByRootAndName,o=a[i],c=t[t.length-1],l=e._cacheIndex;c._cacheIndex=l,t[l]=c,t.pop(),delete o[r],Object.keys(o).length===0&&delete a[i]}_lendBinding(e){let t=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackBinding(e){let t=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_lendControlInterpolant(){let e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return n===void 0&&(n=new mr(new Float32Array(2),new Float32Array(2),1,Pp),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){let t=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,r=t[i];e.__cacheIndex=i,t[i]=e,r.__cacheIndex=n,t[n]=r}clipAction(e,t,n){let i=t||this._root,r=i.uuid,a=typeof e=="string"?Bi.findByName(i,e):e,o=a!==null?a.uuid:e,c=this._actionsByClip[o],l=null;if(n===void 0&&(a!==null?n=a.blendMode:n=qo),c!==void 0){let u=c.actionByRoot[r];if(u!==void 0&&u.blendMode===n)return u;l=c.knownActions[0],a===null&&(a=l._clip)}if(a===null)return null;let h=new to(this,a,t,n);return this._bindAction(h,l),this._addInactiveAction(h,o,r),h}existingAction(e,t){let n=t||this._root,i=n.uuid,r=typeof e=="string"?Bi.findByName(n,e):e,a=r?r.uuid:e,o=this._actionsByClip[a];return o!==void 0&&o.actionByRoot[i]||null}stopAllAction(){let e=this._actions,t=this._nActiveActions;for(let n=t-1;n>=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,i=this.time+=e,r=Math.sign(e),a=this._accuIndex^=1;for(let l=0;l!==n;++l)t[l]._update(i,e,r,a);let o=this._bindings,c=this._nActiveBindings;for(let l=0;l!==c;++l)o[l].apply(a);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){let t=this._actions,n=e.uuid,i=this._actionsByClip,r=i[n];if(r!==void 0){let a=r.knownActions;for(let o=0,c=a.length;o!==c;++o){let l=a[o];this._deactivateAction(l);let h=l._cacheIndex,u=t[t.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,u._cacheIndex=h,t[h]=u,t.pop(),this._removeInactiveBindingsForAction(l)}delete i[n]}}uncacheRoot(e){let t=e.uuid,n=this._actionsByClip;for(let a in n){let o=n[a].actionByRoot,c=o[t];c!==void 0&&(this._deactivateAction(c),this._removeInactiveAction(c))}let i=this._bindingsByRootAndName,r=i[t];if(r!==void 0)for(let a in r){let o=r[a];o.restoreOriginalState(),this._removeInactiveBinding(o)}}uncacheAction(e,t){let n=this.existingAction(e,t);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}};var Ar=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1,_e("Clock: This module has been deprecated. Please use THREE.Timer instead.")}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}};var Fl=class Fl{constructor(e,t,n,i){this.elements=[1,0,0,1],e!==void 0&&this.set(e,t,n,i)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,i){let r=this.elements;return r[0]=e,r[2]=t,r[1]=n,r[3]=i,this}};Fl.prototype.isMatrix2=!0;var rl=Fl;function Cl(s,e,t,n){let i=Ip(n);switch(t){case yl:return s*e;case ho:return s*e/i.components*i.byteLength;case uo:return s*e/i.components*i.byteLength;case xi:return s*e*2/i.components*i.byteLength;case fo:return s*e*2/i.components*i.byteLength;case Ml:return s*e*3/i.components*i.byteLength;case Qt:return s*e*4/i.components*i.byteLength;case po:return s*e*4/i.components*i.byteLength;case Rr:case Cr:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case Pr:case Ir:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case go:case xo:return Math.max(s,16)*Math.max(e,8)/4;case mo:case bo:return Math.max(s,8)*Math.max(e,8)/2;case _o:case vo:case Mo:case So:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case yo:case Lr:case Ao:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case To:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case wo:return Math.floor((s+4)/5)*Math.floor((e+3)/4)*16;case Eo:return Math.floor((s+4)/5)*Math.floor((e+4)/5)*16;case Ro:return Math.floor((s+5)/6)*Math.floor((e+4)/5)*16;case Co:return Math.floor((s+5)/6)*Math.floor((e+5)/6)*16;case Po:return Math.floor((s+7)/8)*Math.floor((e+4)/5)*16;case Io:return Math.floor((s+7)/8)*Math.floor((e+5)/6)*16;case Lo:return Math.floor((s+7)/8)*Math.floor((e+7)/8)*16;case Do:return Math.floor((s+9)/10)*Math.floor((e+4)/5)*16;case Fo:return Math.floor((s+9)/10)*Math.floor((e+5)/6)*16;case No:return Math.floor((s+9)/10)*Math.floor((e+7)/8)*16;case Uo:return Math.floor((s+9)/10)*Math.floor((e+9)/10)*16;case Oo:return Math.floor((s+11)/12)*Math.floor((e+9)/10)*16;case ko:return Math.floor((s+11)/12)*Math.floor((e+11)/12)*16;case Bo:case zo:case Go:return Math.ceil(s/4)*Math.ceil(e/4)*16;case Vo:case Ho:return Math.ceil(s/4)*Math.ceil(e/4)*8;case Dr:case Wo:return Math.ceil(s/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function Ip(s){switch(s){case qt:case bl:return{byteLength:1,components:1};case Cs:case xl:case Un:return{byteLength:2,components:1};case co:case lo:return{byteLength:2,components:4};case vn:case oo:case Zt:return{byteLength:4,components:1};case _l:case vl:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"184"}}));typeof window<"u"&&(window.__THREE__?_e("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="184");function Bd(){let s=null,e=!1,t=null,n=null;function i(r,a){t(r,a),n=s.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&s!==null&&(n=s.requestAnimationFrame(i),e=!0)},stop:function(){s!==null&&s.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){s=r}}}function Dp(s){let e=new WeakMap;function t(o,c){let l=o.array,h=o.usage,u=l.byteLength,d=s.createBuffer();s.bindBuffer(c,d),s.bufferData(c,l,h),o.onUploadCallback();let f;if(l instanceof Float32Array)f=s.FLOAT;else if(typeof Float16Array<"u"&&l instanceof Float16Array)f=s.HALF_FLOAT;else if(l instanceof Uint16Array)o.isFloat16BufferAttribute?f=s.HALF_FLOAT:f=s.UNSIGNED_SHORT;else if(l instanceof Int16Array)f=s.SHORT;else if(l instanceof Uint32Array)f=s.UNSIGNED_INT;else if(l instanceof Int32Array)f=s.INT;else if(l instanceof Int8Array)f=s.BYTE;else if(l instanceof Uint8Array)f=s.UNSIGNED_BYTE;else if(l instanceof Uint8ClampedArray)f=s.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+l);return{buffer:d,type:f,bytesPerElement:l.BYTES_PER_ELEMENT,version:o.version,size:u}}function n(o,c,l){let h=c.array,u=c.updateRanges;if(s.bindBuffer(l,o),u.length===0)s.bufferSubData(l,0,h);else{u.sort((f,g)=>f.start-g.start);let d=0;for(let f=1;f<u.length;f++){let g=u[d],_=u[f];_.start<=g.start+g.count+1?g.count=Math.max(g.count,_.start+_.count-g.start):(++d,u[d]=_)}u.length=d+1;for(let f=0,g=u.length;f<g;f++){let _=u[f];s.bufferSubData(l,_.start*h.BYTES_PER_ELEMENT,h,_.start,_.count)}c.clearUpdateRanges()}c.onUploadCallback()}function i(o){return o.isInterleavedBufferAttribute&&(o=o.data),e.get(o)}function r(o){o.isInterleavedBufferAttribute&&(o=o.data);let c=e.get(o);c&&(s.deleteBuffer(c.buffer),e.delete(o))}function a(o,c){if(o.isInterleavedBufferAttribute&&(o=o.data),o.isGLBufferAttribute){let h=e.get(o);(!h||h.version<o.version)&&e.set(o,{buffer:o.buffer,type:o.type,bytesPerElement:o.elementSize,version:o.version});return}let l=e.get(o);if(l===void 0)e.set(o,t(o,c));else if(l.version<o.version){if(l.size!==o.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(l.buffer,o,c),l.version=o.version}}return{get:i,remove:r,update:a}}var Fp=`#ifdef USE_ALPHAHASH
if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
-#endif`,_p=`#ifdef USE_ALPHAHASH
+#endif`,Np=`#ifdef USE_ALPHAHASH
const float ALPHA_HASH_SCALE = 0.05;
float hash2D( vec2 value ) {
return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
@@ -40,20 +40,20 @@ var ff=Object.defineProperty;var pf=(s,e,t)=>()=>{if(t)throw t[0];try{return s&&
: cases.z;
return clamp( threshold , 1.0e-6, 1.0 );
}
-#endif`,vp=`#ifdef USE_ALPHAMAP
+#endif`,Up=`#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
-#endif`,yp=`#ifdef USE_ALPHAMAP
+#endif`,Op=`#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
-#endif`,Mp=`#ifdef USE_ALPHATEST
+#endif`,kp=`#ifdef USE_ALPHATEST
#ifdef ALPHA_TO_COVERAGE
diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
if ( diffuseColor.a == 0.0 ) discard;
#else
if ( diffuseColor.a < alphaTest ) discard;
#endif
-#endif`,Sp=`#ifdef USE_ALPHATEST
+#endif`,Bp=`#ifdef USE_ALPHATEST
uniform float alphaTest;
-#endif`,Ap=`#ifdef USE_AOMAP
+#endif`,zp=`#ifdef USE_AOMAP
float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
reflectedLight.indirectDiffuse *= ambientOcclusion;
#if defined( USE_CLEARCOAT )
@@ -66,10 +66,10 @@ var ff=Object.defineProperty;var pf=(s,e,t)=>()=>{if(t)throw t[0];try{return s&&
float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
#endif
-#endif`,Tp=`#ifdef USE_AOMAP
+#endif`,Gp=`#ifdef USE_AOMAP
uniform sampler2D aoMap;
uniform float aoMapIntensity;
-#endif`,wp=`#ifdef USE_BATCHING
+#endif`,Vp=`#ifdef USE_BATCHING
#if ! defined( GL_ANGLE_multi_draw )
#define gl_DrawID _gl_DrawID
uniform int _gl_DrawID;
@@ -103,15 +103,15 @@ var ff=Object.defineProperty;var pf=(s,e,t)=>()=>{if(t)throw t[0];try{return s&&
int y = j / size;
return texelFetch( batchingColorTexture, ivec2( x, y ), 0 );
}
-#endif`,Ep=`#ifdef USE_BATCHING
+#endif`,Hp=`#ifdef USE_BATCHING
mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
-#endif`,Rp=`vec3 transformed = vec3( position );
+#endif`,Wp=`vec3 transformed = vec3( position );
#ifdef USE_ALPHAHASH
vPosition = vec3( position );
-#endif`,Cp=`vec3 objectNormal = vec3( normal );
+#endif`,qp=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
vec3 objectTangent = vec3( tangent.xyz );
-#endif`,Pp=`float G_BlinnPhong_Implicit( ) {
+#endif`,Xp=`float G_BlinnPhong_Implicit( ) {
return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
@@ -125,7 +125,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve
float G = G_BlinnPhong_Implicit( );
float D = D_BlinnPhong( shininess, dotNH );
return F * ( G * D );
-} // validated`,Ip=`#ifdef USE_IRIDESCENCE
+} // validated`,jp=`#ifdef USE_IRIDESCENCE
const mat3 XYZ_TO_REC709 = mat3(
3.2404542, -0.9692660, 0.0556434,
-1.5371385, 1.8760108, -0.2040259,
@@ -188,7 +188,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve
}
return max( I, vec3( 0.0 ) );
}
-#endif`,Lp=`#ifdef USE_BUMPMAP
+#endif`,Kp=`#ifdef USE_BUMPMAP
uniform sampler2D bumpMap;
uniform float bumpScale;
vec2 dHdxy_fwd() {
@@ -209,7 +209,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve
vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
return normalize( abs( fDet ) * surf_norm - vGrad );
}
-#endif`,Dp=`#if NUM_CLIPPING_PLANES > 0
+#endif`,Yp=`#if NUM_CLIPPING_PLANES > 0
vec4 plane;
#ifdef ALPHA_TO_COVERAGE
float distanceToPlane, distanceGradient;
@@ -255,20 +255,20 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve
if ( clipped ) discard;
#endif
#endif
-#endif`,Fp=`#if NUM_CLIPPING_PLANES > 0
+#endif`,Jp=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
-#endif`,Np=`#if NUM_CLIPPING_PLANES > 0
+#endif`,$p=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
-#endif`,Up=`#if NUM_CLIPPING_PLANES > 0
+#endif`,Zp=`#if NUM_CLIPPING_PLANES > 0
vClipPosition = - mvPosition.xyz;
-#endif`,Op=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )
+#endif`,Qp=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )
diffuseColor *= vColor;
-#endif`,kp=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )
+#endif`,em=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )
varying vec4 vColor;
-#endif`,Bp=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
+#endif`,tm=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
varying vec4 vColor;
-#endif`,zp=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
+#endif`,nm=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
vColor = vec4( 1.0 );
#endif
#ifdef USE_COLOR_ALPHA
@@ -281,7 +281,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve
#endif
#ifdef USE_BATCHING_COLOR
vColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) );
-#endif`,Gp=`#define PI 3.141592653589793
+#endif`,im=`#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
@@ -348,7 +348,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
-} // validated`,Vp=`#ifdef ENVMAP_TYPE_CUBE_UV
+} // validated`,sm=`#ifdef ENVMAP_TYPE_CUBE_UV
#define cubeUV_minMipLevel 4.0
#define cubeUV_minTileSize 16.0
float getFace( vec3 direction ) {
@@ -441,7 +441,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
return vec4( mix( color0, color1, mipF ), 1.0 );
}
}
-#endif`,Hp=`vec3 transformedNormal = objectNormal;
+#endif`,rm=`vec3 transformedNormal = objectNormal;
#ifdef USE_TANGENT
vec3 transformedTangent = objectTangent;
#endif
@@ -470,21 +470,21 @@ transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
transformedTangent = - transformedTangent;
#endif
-#endif`,Wp=`#ifdef USE_DISPLACEMENTMAP
+#endif`,am=`#ifdef USE_DISPLACEMENTMAP
uniform sampler2D displacementMap;
uniform float displacementScale;
uniform float displacementBias;
-#endif`,qp=`#ifdef USE_DISPLACEMENTMAP
+#endif`,om=`#ifdef USE_DISPLACEMENTMAP
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
-#endif`,Xp=`#ifdef USE_EMISSIVEMAP
+#endif`,cm=`#ifdef USE_EMISSIVEMAP
vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE
emissiveColor = sRGBTransferEOTF( emissiveColor );
#endif
totalEmissiveRadiance *= emissiveColor.rgb;
-#endif`,jp=`#ifdef USE_EMISSIVEMAP
+#endif`,lm=`#ifdef USE_EMISSIVEMAP
uniform sampler2D emissiveMap;
-#endif`,Kp="gl_FragColor = linearToOutputTexel( gl_FragColor );",Jp=`vec4 LinearTransferOETF( in vec4 value ) {
+#endif`,hm="gl_FragColor = linearToOutputTexel( gl_FragColor );",um=`vec4 LinearTransferOETF( in vec4 value ) {
return value;
}
vec4 sRGBTransferEOTF( in vec4 value ) {
@@ -492,7 +492,7 @@ vec4 sRGBTransferEOTF( in vec4 value ) {
}
vec4 sRGBTransferOETF( in vec4 value ) {
return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
-}`,Yp=`#ifdef USE_ENVMAP
+}`,dm=`#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vec3 cameraToFrag;
if ( isOrthographic ) {
@@ -519,7 +519,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
outgoingLight += envColor.xyz * specularStrength * reflectivity;
#endif
#endif
-#endif`,Zp=`#ifdef USE_ENVMAP
+#endif`,fm=`#ifdef USE_ENVMAP
uniform float envMapIntensity;
uniform mat3 envMapRotation;
#ifdef ENVMAP_TYPE_CUBE
@@ -527,7 +527,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
#else
uniform sampler2D envMap;
#endif
-#endif`,$p=`#ifdef USE_ENVMAP
+#endif`,pm=`#ifdef USE_ENVMAP
uniform float reflectivity;
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
#define ENV_WORLDPOS
@@ -538,7 +538,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
#else
varying vec3 vReflect;
#endif
-#endif`,Qp=`#ifdef USE_ENVMAP
+#endif`,mm=`#ifdef USE_ENVMAP
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
#define ENV_WORLDPOS
#endif
@@ -549,7 +549,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
varying vec3 vReflect;
uniform float refractionRatio;
#endif
-#endif`,em=`#ifdef USE_ENVMAP
+#endif`,gm=`#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vWorldPosition = worldPosition.xyz;
#else
@@ -566,18 +566,18 @@ vec4 sRGBTransferOETF( in vec4 value ) {
vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
#endif
#endif
-#endif`,tm=`#ifdef USE_FOG
+#endif`,bm=`#ifdef USE_FOG
vFogDepth = - mvPosition.z;
-#endif`,nm=`#ifdef USE_FOG
+#endif`,xm=`#ifdef USE_FOG
varying float vFogDepth;
-#endif`,im=`#ifdef USE_FOG
+#endif`,_m=`#ifdef USE_FOG
#ifdef FOG_EXP2
float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
#else
float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
#endif
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
-#endif`,sm=`#ifdef USE_FOG
+#endif`,vm=`#ifdef USE_FOG
uniform vec3 fogColor;
varying float vFogDepth;
#ifdef FOG_EXP2
@@ -586,7 +586,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
uniform float fogNear;
uniform float fogFar;
#endif
-#endif`,rm=`#ifdef USE_GRADIENTMAP
+#endif`,ym=`#ifdef USE_GRADIENTMAP
uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
@@ -598,12 +598,12 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
vec2 fw = fwidth( coord ) * 0.5;
return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
#endif
-}`,am=`#ifdef USE_LIGHTMAP
+}`,Mm=`#ifdef USE_LIGHTMAP
uniform sampler2D lightMap;
uniform float lightMapIntensity;
-#endif`,om=`LambertMaterial material;
+#endif`,Sm=`LambertMaterial material;
material.diffuseColor = diffuseColor.rgb;
-material.specularStrength = specularStrength;`,cm=`varying vec3 vViewPosition;
+material.specularStrength = specularStrength;`,Am=`varying vec3 vViewPosition;
struct LambertMaterial {
vec3 diffuseColor;
float specularStrength;
@@ -617,7 +617,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_Lambert
-#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,lm=`uniform bool receiveShadow;
+#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Tm=`uniform bool receiveShadow;
uniform vec3 ambientLightColor;
#if defined( USE_LIGHT_PROBES )
uniform vec3 lightProbe[ 9 ];
@@ -734,7 +734,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi
return irradiance;
}
#endif
-#include <lightprobes_pars_fragment>`,hm=`#ifdef USE_ENVMAP
+#include <lightprobes_pars_fragment>`,wm=`#ifdef USE_ENVMAP
vec3 getIBLIrradiance( const in vec3 normal ) {
#ifdef ENVMAP_TYPE_CUBE_UV
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
@@ -767,8 +767,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi
#endif
}
#endif
-#endif`,um=`ToonMaterial material;
-material.diffuseColor = diffuseColor.rgb;`,dm=`varying vec3 vViewPosition;
+#endif`,Em=`ToonMaterial material;
+material.diffuseColor = diffuseColor.rgb;`,Rm=`varying vec3 vViewPosition;
struct ToonMaterial {
vec3 diffuseColor;
};
@@ -780,11 +780,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_Toon
-#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,fm=`BlinnPhongMaterial material;
+#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Cm=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
-material.specularStrength = specularStrength;`,pm=`varying vec3 vViewPosition;
+material.specularStrength = specularStrength;`,Pm=`varying vec3 vViewPosition;
struct BlinnPhongMaterial {
vec3 diffuseColor;
vec3 specularColor;
@@ -801,7 +801,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_BlinnPhong
-#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,mm=`PhysicalMaterial material;
+#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Im=`PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );
material.metalness = metalnessFactor;
@@ -891,7 +891,7 @@ material.roughness = min( material.roughness, 1.0 );
material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
-#endif`,gm=`uniform sampler2D dfgLUT;
+#endif`,Lm=`uniform sampler2D dfgLUT;
struct PhysicalMaterial {
vec3 diffuseColor;
vec3 diffuseContribution;
@@ -1251,7 +1251,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia
#define RE_IndirectSpecular RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
-}`,bm=`
+}`,Dm=`
vec3 geometryPosition = - vViewPosition;
vec3 geometryNormal = normal;
vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
@@ -1373,7 +1373,7 @@ IncidentLight directLight;
#if defined( RE_IndirectSpecular )
vec3 radiance = vec3( 0.0 );
vec3 clearcoatRadiance = vec3( 0.0 );
-#endif`,xm=`#if defined( RE_IndirectDiffuse )
+#endif`,Fm=`#if defined( RE_IndirectDiffuse )
#ifdef USE_LIGHTMAP
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
@@ -1394,7 +1394,7 @@ IncidentLight directLight;
#ifdef USE_CLEARCOAT
clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
#endif
-#endif`,_m=`#if defined( RE_IndirectDiffuse )
+#endif`,Nm=`#if defined( RE_IndirectDiffuse )
#if defined( LAMBERT ) || defined( PHONG )
irradiance += iblIrradiance;
#endif
@@ -1402,7 +1402,7 @@ IncidentLight directLight;
#endif
#if defined( RE_IndirectSpecular )
RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
-#endif`,vm=`#ifdef USE_LIGHT_PROBES_GRID
+#endif`,Um=`#ifdef USE_LIGHT_PROBES_GRID
uniform highp sampler3D probesSH;
uniform vec3 probesMin;
uniform vec3 probesMax;
@@ -1447,27 +1447,27 @@ vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {
result += c8 * 0.429043 * ( x * x - y * y );
return max( result, vec3( 0.0 ) );
}
-#endif`,ym=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
+#endif`,Om=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
-#endif`,Mm=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
+#endif`,km=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
uniform float logDepthBufFC;
varying float vFragDepth;
varying float vIsPerspective;
-#endif`,Sm=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
+#endif`,Bm=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
varying float vFragDepth;
varying float vIsPerspective;
-#endif`,Am=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
+#endif`,zm=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
vFragDepth = 1.0 + gl_Position.w;
vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
-#endif`,Tm=`#ifdef USE_MAP
+#endif`,Gm=`#ifdef USE_MAP
vec4 sampledDiffuseColor = texture2D( map, vMapUv );
#ifdef DECODE_VIDEO_TEXTURE
sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );
#endif
diffuseColor *= sampledDiffuseColor;
-#endif`,wm=`#ifdef USE_MAP
+#endif`,Vm=`#ifdef USE_MAP
uniform sampler2D map;
-#endif`,Em=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
+#endif`,Hm=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
#if defined( USE_POINTS_UV )
vec2 uv = vUv;
#else
@@ -1479,7 +1479,7 @@ vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {
#endif
#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, uv ).g;
-#endif`,Rm=`#if defined( USE_POINTS_UV )
+#endif`,Wm=`#if defined( USE_POINTS_UV )
varying vec2 vUv;
#else
#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
@@ -1491,19 +1491,19 @@ vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {
#endif
#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
-#endif`,Cm=`float metalnessFactor = metalness;
+#endif`,qm=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
metalnessFactor *= texelMetalness.b;
-#endif`,Pm=`#ifdef USE_METALNESSMAP
+#endif`,Xm=`#ifdef USE_METALNESSMAP
uniform sampler2D metalnessMap;
-#endif`,Im=`#ifdef USE_INSTANCING_MORPH
+#endif`,jm=`#ifdef USE_INSTANCING_MORPH
float morphTargetInfluences[ MORPHTARGETS_COUNT ];
float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
}
-#endif`,Lm=`#if defined( USE_MORPHCOLORS )
+#endif`,Km=`#if defined( USE_MORPHCOLORS )
vColor *= morphTargetBaseInfluence;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
#if defined( USE_COLOR_ALPHA )
@@ -1512,12 +1512,12 @@ vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
#endif
}
-#endif`,Dm=`#ifdef USE_MORPHNORMALS
+#endif`,Ym=`#ifdef USE_MORPHNORMALS
objectNormal *= morphTargetBaseInfluence;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
}
-#endif`,Fm=`#ifdef USE_MORPHTARGETS
+#endif`,Jm=`#ifdef USE_MORPHTARGETS
#ifndef USE_INSTANCING_MORPH
uniform float morphTargetBaseInfluence;
uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
@@ -1531,12 +1531,12 @@ vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {
ivec3 morphUV = ivec3( x, y, morphTargetIndex );
return texelFetch( morphTargetsTexture, morphUV, 0 );
}
-#endif`,Nm=`#ifdef USE_MORPHTARGETS
+#endif`,$m=`#ifdef USE_MORPHTARGETS
transformed *= morphTargetBaseInfluence;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
}
-#endif`,Um=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
+#endif`,Zm=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
vec3 fdx = dFdx( vViewPosition );
vec3 fdy = dFdy( vViewPosition );
@@ -1577,7 +1577,7 @@ vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {
tbn2[1] *= faceDirection;
#endif
#endif
-vec3 nonPerturbedNormal = normal;`,Om=`#ifdef USE_NORMALMAP_OBJECTSPACE
+vec3 nonPerturbedNormal = normal;`,Qm=`#ifdef USE_NORMALMAP_OBJECTSPACE
normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
#ifdef FLIP_SIDED
normal = - normal;
@@ -1595,25 +1595,25 @@ vec3 nonPerturbedNormal = normal;`,Om=`#ifdef USE_NORMALMAP_OBJECTSPACE
normal = normalize( tbn * mapN );
#elif defined( USE_BUMPMAP )
normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
-#endif`,km=`#ifndef FLAT_SHADED
+#endif`,eg=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
-#endif`,Bm=`#ifndef FLAT_SHADED
+#endif`,tg=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
-#endif`,zm=`#ifndef FLAT_SHADED
+#endif`,ng=`#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#ifdef USE_TANGENT
vTangent = normalize( transformedTangent );
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
#endif
-#endif`,Gm=`#ifdef USE_NORMALMAP
+#endif`,ig=`#ifdef USE_NORMALMAP
uniform sampler2D normalMap;
uniform vec2 normalScale;
#endif
@@ -1635,13 +1635,13 @@ vec3 nonPerturbedNormal = normal;`,Om=`#ifdef USE_NORMALMAP_OBJECTSPACE
float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
return mat3( T * scale, B * scale, N );
}
-#endif`,Vm=`#ifdef USE_CLEARCOAT
+#endif`,sg=`#ifdef USE_CLEARCOAT
vec3 clearcoatNormal = nonPerturbedNormal;
-#endif`,Hm=`#ifdef USE_CLEARCOAT_NORMALMAP
+#endif`,rg=`#ifdef USE_CLEARCOAT_NORMALMAP
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
clearcoatMapN.xy *= clearcoatNormalScale;
clearcoatNormal = normalize( tbn2 * clearcoatMapN );
-#endif`,Wm=`#ifdef USE_CLEARCOATMAP
+#endif`,ag=`#ifdef USE_CLEARCOATMAP
uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
@@ -1650,18 +1650,18 @@ vec3 nonPerturbedNormal = normal;`,Om=`#ifdef USE_NORMALMAP_OBJECTSPACE
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
uniform sampler2D clearcoatRoughnessMap;
-#endif`,qm=`#ifdef USE_IRIDESCENCEMAP
+#endif`,og=`#ifdef USE_IRIDESCENCEMAP
uniform sampler2D iridescenceMap;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
uniform sampler2D iridescenceThicknessMap;
-#endif`,Xm=`#ifdef OPAQUE
+#endif`,cg=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= material.transmissionAlpha;
#endif
-gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,jm=`vec3 packNormalToRGB( const in vec3 normal ) {
+gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,lg=`vec3 packNormalToRGB( const in vec3 normal ) {
return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
@@ -1740,9 +1740,9 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const
#else
return ( near * far ) / ( ( far - near ) * depth - far );
#endif
-}`,Km=`#ifdef PREMULTIPLIED_ALPHA
+}`,hg=`#ifdef PREMULTIPLIED_ALPHA
gl_FragColor.rgb *= gl_FragColor.a;
-#endif`,Jm=`vec4 mvPosition = vec4( transformed, 1.0 );
+#endif`,ug=`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_BATCHING
mvPosition = batchingMatrix * mvPosition;
#endif
@@ -1750,22 +1750,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const
mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
-gl_Position = projectionMatrix * mvPosition;`,Ym=`#ifdef DITHERING
+gl_Position = projectionMatrix * mvPosition;`,dg=`#ifdef DITHERING
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
-#endif`,Zm=`#ifdef DITHERING
+#endif`,fg=`#ifdef DITHERING
vec3 dithering( vec3 color ) {
float grid_position = rand( gl_FragCoord.xy );
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
return color + dither_shift_RGB;
}
-#endif`,$m=`float roughnessFactor = roughness;
+#endif`,pg=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
roughnessFactor *= texelRoughness.g;
-#endif`,Qm=`#ifdef USE_ROUGHNESSMAP
+#endif`,mg=`#ifdef USE_ROUGHNESSMAP
uniform sampler2D roughnessMap;
-#endif`,eg=`#if NUM_SPOT_LIGHT_COORDS > 0
+#endif`,gg=`#if NUM_SPOT_LIGHT_COORDS > 0
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#if NUM_SPOT_LIGHT_MAPS > 0
@@ -1965,7 +1965,7 @@ gl_Position = projectionMatrix * mvPosition;`,Ym=`#ifdef DITHERING
}
#endif
#endif
-#endif`,tg=`#if NUM_SPOT_LIGHT_COORDS > 0
+#endif`,bg=`#if NUM_SPOT_LIGHT_COORDS > 0
uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
@@ -2006,7 +2006,7 @@ gl_Position = projectionMatrix * mvPosition;`,Ym=`#ifdef DITHERING
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
-#endif`,ng=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
+#endif`,xg=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
#ifdef HAS_NORMAL
vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
#else
@@ -2042,7 +2042,7 @@ gl_Position = projectionMatrix * mvPosition;`,Ym=`#ifdef DITHERING
vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
-#endif`,ig=`float getShadowMask() {
+#endif`,_g=`float getShadowMask() {
float shadow = 1.0;
#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
@@ -2074,12 +2074,12 @@ gl_Position = projectionMatrix * mvPosition;`,Ym=`#ifdef DITHERING
#endif
#endif
return shadow;
-}`,sg=`#ifdef USE_SKINNING
+}`,vg=`#ifdef USE_SKINNING
mat4 boneMatX = getBoneMatrix( skinIndex.x );
mat4 boneMatY = getBoneMatrix( skinIndex.y );
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
mat4 boneMatW = getBoneMatrix( skinIndex.w );
-#endif`,rg=`#ifdef USE_SKINNING
+#endif`,yg=`#ifdef USE_SKINNING
uniform mat4 bindMatrix;
uniform mat4 bindMatrixInverse;
uniform highp sampler2D boneTexture;
@@ -2094,7 +2094,7 @@ gl_Position = projectionMatrix * mvPosition;`,Ym=`#ifdef DITHERING
vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
return mat4( v1, v2, v3, v4 );
}
-#endif`,ag=`#ifdef USE_SKINNING
+#endif`,Mg=`#ifdef USE_SKINNING
vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
vec4 skinned = vec4( 0.0 );
skinned += boneMatX * skinVertex * skinWeight.x;
@@ -2102,7 +2102,7 @@ gl_Position = projectionMatrix * mvPosition;`,Ym=`#ifdef DITHERING
skinned += boneMatZ * skinVertex * skinWeight.z;
skinned += boneMatW * skinVertex * skinWeight.w;
transformed = ( bindMatrixInverse * skinned ).xyz;
-#endif`,og=`#ifdef USE_SKINNING
+#endif`,Sg=`#ifdef USE_SKINNING
mat4 skinMatrix = mat4( 0.0 );
skinMatrix += skinWeight.x * boneMatX;
skinMatrix += skinWeight.y * boneMatY;
@@ -2113,17 +2113,17 @@ gl_Position = projectionMatrix * mvPosition;`,Ym=`#ifdef DITHERING
#ifdef USE_TANGENT
objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
#endif
-#endif`,cg=`float specularStrength;
+#endif`,Ag=`float specularStrength;
#ifdef USE_SPECULARMAP
vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
specularStrength = texelSpecular.r;
#else
specularStrength = 1.0;
-#endif`,lg=`#ifdef USE_SPECULARMAP
+#endif`,Tg=`#ifdef USE_SPECULARMAP
uniform sampler2D specularMap;
-#endif`,hg=`#if defined( TONE_MAPPING )
+#endif`,wg=`#if defined( TONE_MAPPING )
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
-#endif`,ug=`#ifndef saturate
+#endif`,Eg=`#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
@@ -2220,7 +2220,7 @@ vec3 NeutralToneMapping( vec3 color ) {
float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
return mix( color, vec3( newPeak ), g );
}
-vec3 CustomToneMapping( vec3 color ) { return color; }`,dg=`#ifdef USE_TRANSMISSION
+vec3 CustomToneMapping( vec3 color ) { return color; }`,Rg=`#ifdef USE_TRANSMISSION
material.transmission = transmission;
material.transmissionAlpha = 1.0;
material.thickness = thickness;
@@ -2241,7 +2241,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,dg=`#ifdef USE_TRANSMISS
material.attenuationColor, material.attenuationDistance );
material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
-#endif`,fg=`#ifdef USE_TRANSMISSION
+#endif`,Cg=`#ifdef USE_TRANSMISSION
uniform float transmission;
uniform float thickness;
uniform float attenuationDistance;
@@ -2367,7 +2367,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,dg=`#ifdef USE_TRANSMISS
float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
}
-#endif`,pg=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
+#endif`,Pg=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
varying vec2 vUv;
#endif
#ifdef USE_MAP
@@ -2437,7 +2437,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,dg=`#ifdef USE_TRANSMISS
#ifdef USE_THICKNESSMAP
uniform mat3 thicknessMapTransform;
varying vec2 vThicknessMapUv;
-#endif`,mg=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
+#endif`,Ig=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
varying vec2 vUv;
#endif
#ifdef USE_MAP
@@ -2531,7 +2531,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,dg=`#ifdef USE_TRANSMISS
#ifdef USE_THICKNESSMAP
uniform mat3 thicknessMapTransform;
varying vec2 vThicknessMapUv;
-#endif`,gg=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
+#endif`,Lg=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
vUv = vec3( uv, 1 ).xy;
#endif
#ifdef USE_MAP
@@ -2602,7 +2602,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,dg=`#ifdef USE_TRANSMISS
#endif
#ifdef USE_THICKNESSMAP
vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
-#endif`,bg=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
+#endif`,Dg=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
vec4 worldPosition = vec4( transformed, 1.0 );
#ifdef USE_BATCHING
worldPosition = batchingMatrix * worldPosition;
@@ -2611,12 +2611,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,dg=`#ifdef USE_TRANSMISS
worldPosition = instanceMatrix * worldPosition;
#endif
worldPosition = modelMatrix * worldPosition;
-#endif`,xg=`varying vec2 vUv;
+#endif`,Fg=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
gl_Position = vec4( position.xy, 1.0, 1.0 );
-}`,_g=`uniform sampler2D t2D;
+}`,Ng=`uniform sampler2D t2D;
uniform float backgroundIntensity;
varying vec2 vUv;
void main() {
@@ -2628,14 +2628,14 @@ void main() {
gl_FragColor = texColor;
#include <tonemapping_fragment>
#include <colorspace_fragment>
-}`,vg=`varying vec3 vWorldDirection;
+}`,Ug=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
-}`,yg=`#ifdef ENVMAP_TYPE_CUBE
+}`,Og=`#ifdef ENVMAP_TYPE_CUBE
uniform samplerCube envMap;
#elif defined( ENVMAP_TYPE_CUBE_UV )
uniform sampler2D envMap;
@@ -2657,14 +2657,14 @@ void main() {
gl_FragColor = texColor;
#include <tonemapping_fragment>
#include <colorspace_fragment>
-}`,Mg=`varying vec3 vWorldDirection;
+}`,kg=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
-}`,Sg=`uniform samplerCube tCube;
+}`,Bg=`uniform samplerCube tCube;
uniform float tFlip;
uniform float opacity;
varying vec3 vWorldDirection;
@@ -2674,7 +2674,7 @@ void main() {
gl_FragColor.a *= opacity;
#include <tonemapping_fragment>
#include <colorspace_fragment>
-}`,Ag=`#include <common>
+}`,zg=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
@@ -2701,7 +2701,7 @@ void main() {
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vHighPrecisionZW = gl_Position.zw;
-}`,Tg=`#if DEPTH_PACKING == 3200
+}`,Gg=`#if DEPTH_PACKING == 3200
uniform float opacity;
#endif
#include <common>
@@ -2739,7 +2739,7 @@ void main() {
#elif DEPTH_PACKING == 3203
gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
#endif
-}`,wg=`#define DISTANCE
+}`,Vg=`#define DISTANCE
varying vec3 vWorldPosition;
#include <common>
#include <batching_pars_vertex>
@@ -2766,7 +2766,7 @@ void main() {
#include <worldpos_vertex>
#include <clipping_planes_vertex>
vWorldPosition = worldPosition.xyz;
-}`,Eg=`#define DISTANCE
+}`,Hg=`#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
@@ -2789,13 +2789,13 @@ void main () {
dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
dist = saturate( dist );
gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );
-}`,Rg=`varying vec3 vWorldDirection;
+}`,Wg=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
-}`,Cg=`uniform sampler2D tEquirect;
+}`,qg=`uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
@@ -2804,7 +2804,7 @@ void main() {
gl_FragColor = texture2D( tEquirect, sampleUV );
#include <tonemapping_fragment>
#include <colorspace_fragment>
-}`,Pg=`uniform float scale;
+}`,Xg=`uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include <common>
@@ -2826,7 +2826,7 @@ void main() {
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
-}`,Ig=`uniform vec3 diffuse;
+}`,jg=`uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
@@ -2854,7 +2854,7 @@ void main() {
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
-}`,Lg=`#include <common>
+}`,Kg=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <envmap_pars_vertex>
@@ -2886,7 +2886,7 @@ void main() {
#include <worldpos_vertex>
#include <envmap_vertex>
#include <fog_vertex>
-}`,Dg=`uniform vec3 diffuse;
+}`,Yg=`uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
varying vec3 vNormal;
@@ -2934,7 +2934,7 @@ void main() {
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
-}`,Fg=`#define LAMBERT
+}`,Jg=`#define LAMBERT
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
@@ -2973,7 +2973,7 @@ void main() {
#include <envmap_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
-}`,Ng=`#define LAMBERT
+}`,$g=`#define LAMBERT
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
@@ -3031,7 +3031,7 @@ void main() {
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
-}`,Ug=`#define MATCAP
+}`,Zg=`#define MATCAP
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
@@ -3065,7 +3065,7 @@ void main() {
#include <clipping_planes_vertex>
#include <fog_vertex>
vViewPosition = - mvPosition.xyz;
-}`,Og=`#define MATCAP
+}`,Qg=`#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
@@ -3111,7 +3111,7 @@ void main() {
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
-}`,kg=`#define NORMAL
+}`,eb=`#define NORMAL
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
varying vec3 vViewPosition;
#endif
@@ -3144,7 +3144,7 @@ void main() {
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
vViewPosition = - mvPosition.xyz;
#endif
-}`,Bg=`#define NORMAL
+}`,tb=`#define NORMAL
uniform float opacity;
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
varying vec3 vViewPosition;
@@ -3165,7 +3165,7 @@ void main() {
#ifdef OPAQUE
gl_FragColor.a = 1.0;
#endif
-}`,zg=`#define PHONG
+}`,nb=`#define PHONG
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
@@ -3204,7 +3204,7 @@ void main() {
#include <envmap_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
-}`,Gg=`#define PHONG
+}`,ib=`#define PHONG
uniform vec3 diffuse;
uniform vec3 emissive;
uniform vec3 specular;
@@ -3264,7 +3264,7 @@ void main() {
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
-}`,Vg=`#define STANDARD
+}`,sb=`#define STANDARD
varying vec3 vViewPosition;
#ifdef USE_TRANSMISSION
varying vec3 vWorldPosition;
@@ -3307,7 +3307,7 @@ void main() {
#ifdef USE_TRANSMISSION
vWorldPosition = worldPosition.xyz;
#endif
-}`,Hg=`#define STANDARD
+}`,rb=`#define STANDARD
#ifdef PHYSICAL
#define IOR
#define USE_SPECULAR
@@ -3432,7 +3432,7 @@ void main() {
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
-}`,Wg=`#define TOON
+}`,ab=`#define TOON
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
@@ -3469,7 +3469,7 @@ void main() {
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
-}`,qg=`#define TOON
+}`,ob=`#define TOON
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
@@ -3521,7 +3521,7 @@ void main() {
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
-}`,Xg=`uniform float size;
+}`,cb=`uniform float size;
uniform float scale;
#include <common>
#include <color_pars_vertex>
@@ -3552,7 +3552,7 @@ void main() {
#include <clipping_planes_vertex>
#include <worldpos_vertex>
#include <fog_vertex>
-}`,jg=`uniform vec3 diffuse;
+}`,lb=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <color_pars_fragment>
@@ -3577,7 +3577,7 @@ void main() {
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
-}`,Kg=`#include <common>
+}`,hb=`#include <common>
#include <batching_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
@@ -3600,7 +3600,7 @@ void main() {
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
-}`,Jg=`uniform vec3 color;
+}`,ub=`uniform vec3 color;
uniform float opacity;
#include <common>
#include <fog_pars_fragment>
@@ -3616,7 +3616,7 @@ void main() {
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
-}`,Yg=`uniform float rotation;
+}`,db=`uniform float rotation;
uniform vec2 center;
#include <common>
#include <uv_pars_vertex>
@@ -3640,7 +3640,7 @@ void main() {
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
-}`,Zg=`uniform vec3 diffuse;
+}`,fb=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <uv_pars_fragment>
@@ -3665,7 +3665,7 @@ void main() {
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
-}`,Oe={alphahash_fragment:xp,alphahash_pars_fragment:_p,alphamap_fragment:vp,alphamap_pars_fragment:yp,alphatest_fragment:Mp,alphatest_pars_fragment:Sp,aomap_fragment:Ap,aomap_pars_fragment:Tp,batching_pars_vertex:wp,batching_vertex:Ep,begin_vertex:Rp,beginnormal_vertex:Cp,bsdfs:Pp,iridescence_fragment:Ip,bumpmap_pars_fragment:Lp,clipping_planes_fragment:Dp,clipping_planes_pars_fragment:Fp,clipping_planes_pars_vertex:Np,clipping_planes_vertex:Up,color_fragment:Op,color_pars_fragment:kp,color_pars_vertex:Bp,color_vertex:zp,common:Gp,cube_uv_reflection_fragment:Vp,defaultnormal_vertex:Hp,displacementmap_pars_vertex:Wp,displacementmap_vertex:qp,emissivemap_fragment:Xp,emissivemap_pars_fragment:jp,colorspace_fragment:Kp,colorspace_pars_fragment:Jp,envmap_fragment:Yp,envmap_common_pars_fragment:Zp,envmap_pars_fragment:$p,envmap_pars_vertex:Qp,envmap_physical_pars_fragment:hm,envmap_vertex:em,fog_vertex:tm,fog_pars_vertex:nm,fog_fragment:im,fog_pars_fragment:sm,gradientmap_pars_fragment:rm,lightmap_pars_fragment:am,lights_lambert_fragment:om,lights_lambert_pars_fragment:cm,lights_pars_begin:lm,lights_toon_fragment:um,lights_toon_pars_fragment:dm,lights_phong_fragment:fm,lights_phong_pars_fragment:pm,lights_physical_fragment:mm,lights_physical_pars_fragment:gm,lights_fragment_begin:bm,lights_fragment_maps:xm,lights_fragment_end:_m,lightprobes_pars_fragment:vm,logdepthbuf_fragment:ym,logdepthbuf_pars_fragment:Mm,logdepthbuf_pars_vertex:Sm,logdepthbuf_vertex:Am,map_fragment:Tm,map_pars_fragment:wm,map_particle_fragment:Em,map_particle_pars_fragment:Rm,metalnessmap_fragment:Cm,metalnessmap_pars_fragment:Pm,morphinstance_vertex:Im,morphcolor_vertex:Lm,morphnormal_vertex:Dm,morphtarget_pars_vertex:Fm,morphtarget_vertex:Nm,normal_fragment_begin:Um,normal_fragment_maps:Om,normal_pars_fragment:km,normal_pars_vertex:Bm,normal_vertex:zm,normalmap_pars_fragment:Gm,clearcoat_normal_fragment_begin:Vm,clearcoat_normal_fragment_maps:Hm,clearcoat_pars_fragment:Wm,iridescence_pars_fragment:qm,opaque_fragment:Xm,packing:jm,premultiplied_alpha_fragment:Km,project_vertex:Jm,dithering_fragment:Ym,dithering_pars_fragment:Zm,roughnessmap_fragment:$m,roughnessmap_pars_fragment:Qm,shadowmap_pars_fragment:eg,shadowmap_pars_vertex:tg,shadowmap_vertex:ng,shadowmask_pars_fragment:ig,skinbase_vertex:sg,skinning_pars_vertex:rg,skinning_vertex:ag,skinnormal_vertex:og,specularmap_fragment:cg,specularmap_pars_fragment:lg,tonemapping_fragment:hg,tonemapping_pars_fragment:ug,transmission_fragment:dg,transmission_pars_fragment:fg,uv_pars_fragment:pg,uv_pars_vertex:mg,uv_vertex:gg,worldpos_vertex:bg,background_vert:xg,background_frag:_g,backgroundCube_vert:vg,backgroundCube_frag:yg,cube_vert:Mg,cube_frag:Sg,depth_vert:Ag,depth_frag:Tg,distance_vert:wg,distance_frag:Eg,equirect_vert:Rg,equirect_frag:Cg,linedashed_vert:Pg,linedashed_frag:Ig,meshbasic_vert:Lg,meshbasic_frag:Dg,meshlambert_vert:Fg,meshlambert_frag:Ng,meshmatcap_vert:Ug,meshmatcap_frag:Og,meshnormal_vert:kg,meshnormal_frag:Bg,meshphong_vert:zg,meshphong_frag:Gg,meshphysical_vert:Vg,meshphysical_frag:Hg,meshtoon_vert:Wg,meshtoon_frag:qg,points_vert:Xg,points_frag:jg,shadow_vert:Kg,shadow_frag:Jg,sprite_vert:Yg,sprite_frag:Zg},ce={common:{diffuse:{value:new Te(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Pe},alphaMap:{value:null},alphaMapTransform:{value:new Pe},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Pe}},envmap:{envMap:{value:null},envMapRotation:{value:new Pe},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Pe}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Pe}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Pe},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Pe},normalScale:{value:new He(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Pe},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Pe}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Pe}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Pe}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Te(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null},probesSH:{value:null},probesMin:{value:new F},probesMax:{value:new F},probesResolution:{value:new F}},points:{diffuse:{value:new Te(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Pe},alphaTest:{value:0},uvTransform:{value:new Pe}},sprite:{diffuse:{value:new Te(16777215)},opacity:{value:1},center:{value:new He(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Pe},alphaMap:{value:null},alphaMapTransform:{value:new Pe},alphaTest:{value:0}}},Un={basic:{uniforms:Nt([ce.common,ce.specularmap,ce.envmap,ce.aomap,ce.lightmap,ce.fog]),vertexShader:Oe.meshbasic_vert,fragmentShader:Oe.meshbasic_frag},lambert:{uniforms:Nt([ce.common,ce.specularmap,ce.envmap,ce.aomap,ce.lightmap,ce.emissivemap,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.fog,ce.lights,{emissive:{value:new Te(0)},envMapIntensity:{value:1}}]),vertexShader:Oe.meshlambert_vert,fragmentShader:Oe.meshlambert_frag},phong:{uniforms:Nt([ce.common,ce.specularmap,ce.envmap,ce.aomap,ce.lightmap,ce.emissivemap,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.fog,ce.lights,{emissive:{value:new Te(0)},specular:{value:new Te(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:Oe.meshphong_vert,fragmentShader:Oe.meshphong_frag},standard:{uniforms:Nt([ce.common,ce.envmap,ce.aomap,ce.lightmap,ce.emissivemap,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.roughnessmap,ce.metalnessmap,ce.fog,ce.lights,{emissive:{value:new Te(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Oe.meshphysical_vert,fragmentShader:Oe.meshphysical_frag},toon:{uniforms:Nt([ce.common,ce.aomap,ce.lightmap,ce.emissivemap,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.gradientmap,ce.fog,ce.lights,{emissive:{value:new Te(0)}}]),vertexShader:Oe.meshtoon_vert,fragmentShader:Oe.meshtoon_frag},matcap:{uniforms:Nt([ce.common,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.fog,{matcap:{value:null}}]),vertexShader:Oe.meshmatcap_vert,fragmentShader:Oe.meshmatcap_frag},points:{uniforms:Nt([ce.points,ce.fog]),vertexShader:Oe.points_vert,fragmentShader:Oe.points_frag},dashed:{uniforms:Nt([ce.common,ce.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Oe.linedashed_vert,fragmentShader:Oe.linedashed_frag},depth:{uniforms:Nt([ce.common,ce.displacementmap]),vertexShader:Oe.depth_vert,fragmentShader:Oe.depth_frag},normal:{uniforms:Nt([ce.common,ce.bumpmap,ce.normalmap,ce.displacementmap,{opacity:{value:1}}]),vertexShader:Oe.meshnormal_vert,fragmentShader:Oe.meshnormal_frag},sprite:{uniforms:Nt([ce.sprite,ce.fog]),vertexShader:Oe.sprite_vert,fragmentShader:Oe.sprite_frag},background:{uniforms:{uvTransform:{value:new Pe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Oe.background_vert,fragmentShader:Oe.background_frag},backgroundCube:{uniforms:{envMap:{value:null},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Pe}},vertexShader:Oe.backgroundCube_vert,fragmentShader:Oe.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Oe.cube_vert,fragmentShader:Oe.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Oe.equirect_vert,fragmentShader:Oe.equirect_frag},distance:{uniforms:Nt([ce.common,ce.displacementmap,{referencePosition:{value:new F},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Oe.distance_vert,fragmentShader:Oe.distance_frag},shadow:{uniforms:Nt([ce.lights,ce.fog,{color:{value:new Te(0)},opacity:{value:1}}]),vertexShader:Oe.shadow_vert,fragmentShader:Oe.shadow_frag}};Un.physical={uniforms:Nt([Un.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Pe},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Pe},clearcoatNormalScale:{value:new He(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Pe},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Pe},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Pe},sheen:{value:0},sheenColor:{value:new Te(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Pe},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Pe},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Pe},transmissionSamplerSize:{value:new He},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Pe},attenuationDistance:{value:0},attenuationColor:{value:new Te(0)},specularColor:{value:new Te(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Pe},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Pe},anisotropyVector:{value:new He},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Pe}}]),vertexShader:Oe.meshphysical_vert,fragmentShader:Oe.meshphysical_frag};var Ho={r:0,b:0,g:0},$g=new Ue,Ed=new Pe;Ed.set(-1,0,0,0,1,0,0,0,1);function Qg(s,e,t,n,i,r){let a=new Te(0),o=i===!0?0:1,c,l,h=null,u=0,d=null;function f(v){let S=v.isScene===!0?v.background:null;if(S&&S.isTexture){let M=v.backgroundBlurriness>0;S=e.get(S,M)}return S}function g(v){let S=!1,M=f(v);M===null?m(a,o):M&&M.isColor&&(m(M,1),S=!0);let E=s.xr.getEnvironmentBlendMode();E==="additive"?t.buffers.color.setClear(0,0,0,1,r):E==="alpha-blend"&&t.buffers.color.setClear(0,0,0,0,r),(s.autoClear||S)&&(t.buffers.depth.setTest(!0),t.buffers.depth.setMask(!0),t.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function _(v,S){let M=f(S);M&&(M.isCubeTexture||M.mapping===Ar)?(l===void 0&&(l=new lt(new ui(1,1,1),new Zt({name:"BackgroundCubeMaterial",uniforms:Vi(Un.backgroundCube.uniforms),vertexShader:Un.backgroundCube.vertexShader,fragmentShader:Un.backgroundCube.fragmentShader,side:Pt,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(E,T,C){this.matrixWorld.copyPosition(C.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(l)),l.material.uniforms.envMap.value=M,l.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4($g.makeRotationFromEuler(S.backgroundRotation)).transpose(),M.isCubeTexture&&M.isRenderTargetTexture===!1&&l.material.uniforms.backgroundRotation.value.premultiply(Ed),l.material.toneMapped=Be.getTransfer(M.colorSpace)!==Je,(h!==M||u!==M.version||d!==s.toneMapping)&&(l.material.needsUpdate=!0,h=M,u=M.version,d=s.toneMapping),l.layers.enableAll(),v.unshift(l,l.geometry,l.material,0,0,null)):M&&M.isTexture&&(c===void 0&&(c=new lt(new hr(2,2),new Zt({name:"BackgroundMaterial",uniforms:Vi(Un.background.uniforms),vertexShader:Un.background.vertexShader,fragmentShader:Un.background.fragmentShader,side:pn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(c)),c.material.uniforms.t2D.value=M,c.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,c.material.toneMapped=Be.getTransfer(M.colorSpace)!==Je,M.matrixAutoUpdate===!0&&M.updateMatrix(),c.material.uniforms.uvTransform.value.copy(M.matrix),(h!==M||u!==M.version||d!==s.toneMapping)&&(c.material.needsUpdate=!0,h=M,u=M.version,d=s.toneMapping),c.layers.enableAll(),v.unshift(c,c.geometry,c.material,0,0,null))}function m(v,S){v.getRGB(Ho,bl(s)),t.buffers.color.setClear(Ho.r,Ho.g,Ho.b,S,r)}function p(){l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(v,S=1){a.set(v),o=S,m(a,o)},getClearAlpha:function(){return o},setClearAlpha:function(v){o=v,m(a,o)},render:g,addToRenderList:_,dispose:p}}function eb(s,e){let t=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},i=d(null),r=i,a=!1;function o(R,O,H,q,N){let z=!1,V=u(R,q,H,O);r!==V&&(r=V,l(r.object)),z=f(R,q,H,N),z&&g(R,q,H,N),N!==null&&e.update(N,s.ELEMENT_ARRAY_BUFFER),(z||a)&&(a=!1,M(R,O,H,q),N!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get(N).buffer))}function c(){return s.createVertexArray()}function l(R){return s.bindVertexArray(R)}function h(R){return s.deleteVertexArray(R)}function u(R,O,H,q){let N=q.wireframe===!0,z=n[O.id];z===void 0&&(z={},n[O.id]=z);let V=R.isInstancedMesh===!0?R.id:0,$=z[V];$===void 0&&($={},z[V]=$);let Q=$[H.id];Q===void 0&&(Q={},$[H.id]=Q);let le=Q[N];return le===void 0&&(le=d(c()),Q[N]=le),le}function d(R){let O=[],H=[],q=[];for(let N=0;N<t;N++)O[N]=0,H[N]=0,q[N]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:O,enabledAttributes:H,attributeDivisors:q,object:R,attributes:{},index:null}}function f(R,O,H,q){let N=r.attributes,z=O.attributes,V=0,$=H.getAttributes();for(let Q in $)if($[Q].location>=0){let xe=N[Q],Se=z[Q];if(Se===void 0&&(Q==="instanceMatrix"&&R.instanceMatrix&&(Se=R.instanceMatrix),Q==="instanceColor"&&R.instanceColor&&(Se=R.instanceColor)),xe===void 0||xe.attribute!==Se||Se&&xe.data!==Se.data)return!0;V++}return r.attributesNum!==V||r.index!==q}function g(R,O,H,q){let N={},z=O.attributes,V=0,$=H.getAttributes();for(let Q in $)if($[Q].location>=0){let xe=z[Q];xe===void 0&&(Q==="instanceMatrix"&&R.instanceMatrix&&(xe=R.instanceMatrix),Q==="instanceColor"&&R.instanceColor&&(xe=R.instanceColor));let Se={};Se.attribute=xe,xe&&xe.data&&(Se.data=xe.data),N[Q]=Se,V++}r.attributes=N,r.attributesNum=V,r.index=q}function _(){let R=r.newAttributes;for(let O=0,H=R.length;O<H;O++)R[O]=0}function m(R){p(R,0)}function p(R,O){let H=r.newAttributes,q=r.enabledAttributes,N=r.attributeDivisors;H[R]=1,q[R]===0&&(s.enableVertexAttribArray(R),q[R]=1),N[R]!==O&&(s.vertexAttribDivisor(R,O),N[R]=O)}function v(){let R=r.newAttributes,O=r.enabledAttributes;for(let H=0,q=O.length;H<q;H++)O[H]!==R[H]&&(s.disableVertexAttribArray(H),O[H]=0)}function S(R,O,H,q,N,z,V){V===!0?s.vertexAttribIPointer(R,O,H,N,z):s.vertexAttribPointer(R,O,H,q,N,z)}function M(R,O,H,q){_();let N=q.attributes,z=H.getAttributes(),V=O.defaultAttributeValues;for(let $ in z){let Q=z[$];if(Q.location>=0){let le=N[$];if(le===void 0&&($==="instanceMatrix"&&R.instanceMatrix&&(le=R.instanceMatrix),$==="instanceColor"&&R.instanceColor&&(le=R.instanceColor)),le!==void 0){let xe=le.normalized,Se=le.itemSize,Xe=e.get(le);if(Xe===void 0)continue;let Ze=Xe.buffer,Fe=Xe.type,J=Xe.bytesPerElement,de=Fe===s.INT||Fe===s.UNSIGNED_INT||le.gpuType===no;if(le.isInterleavedBufferAttribute){let ie=le.data,Ee=ie.stride,Ie=le.offset;if(ie.isInstancedInterleavedBuffer){for(let Re=0;Re<Q.locationSize;Re++)p(Q.location+Re,ie.meshPerAttribute);R.isInstancedMesh!==!0&&q._maxInstanceCount===void 0&&(q._maxInstanceCount=ie.meshPerAttribute*ie.count)}else for(let Re=0;Re<Q.locationSize;Re++)m(Q.location+Re);s.bindBuffer(s.ARRAY_BUFFER,Ze);for(let Re=0;Re<Q.locationSize;Re++)S(Q.location+Re,Se/Q.locationSize,Fe,xe,Ee*J,(Ie+Se/Q.locationSize*Re)*J,de)}else{if(le.isInstancedBufferAttribute){for(let ie=0;ie<Q.locationSize;ie++)p(Q.location+ie,le.meshPerAttribute);R.isInstancedMesh!==!0&&q._maxInstanceCount===void 0&&(q._maxInstanceCount=le.meshPerAttribute*le.count)}else for(let ie=0;ie<Q.locationSize;ie++)m(Q.location+ie);s.bindBuffer(s.ARRAY_BUFFER,Ze);for(let ie=0;ie<Q.locationSize;ie++)S(Q.location+ie,Se/Q.locationSize,Fe,xe,Se*J,Se/Q.locationSize*ie*J,de)}}else if(V!==void 0){let xe=V[$];if(xe!==void 0)switch(xe.length){case 2:s.vertexAttrib2fv(Q.location,xe);break;case 3:s.vertexAttrib3fv(Q.location,xe);break;case 4:s.vertexAttrib4fv(Q.location,xe);break;default:s.vertexAttrib1fv(Q.location,xe)}}}}v()}function E(){w();for(let R in n){let O=n[R];for(let H in O){let q=O[H];for(let N in q){let z=q[N];for(let V in z)h(z[V].object),delete z[V];delete q[N]}}delete n[R]}}function T(R){if(n[R.id]===void 0)return;let O=n[R.id];for(let H in O){let q=O[H];for(let N in q){let z=q[N];for(let V in z)h(z[V].object),delete z[V];delete q[N]}}delete n[R.id]}function C(R){for(let O in n){let H=n[O];for(let q in H){let N=H[q];if(N[R.id]===void 0)continue;let z=N[R.id];for(let V in z)h(z[V].object),delete z[V];delete N[R.id]}}}function x(R){for(let O in n){let H=n[O],q=R.isInstancedMesh===!0?R.id:0,N=H[q];if(N!==void 0){for(let z in N){let V=N[z];for(let $ in V)h(V[$].object),delete V[$];delete N[z]}delete H[q],Object.keys(H).length===0&&delete n[O]}}}function w(){L(),a=!0,r!==i&&(r=i,l(r.object))}function L(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:o,reset:w,resetDefaultState:L,dispose:E,releaseStatesOfGeometry:T,releaseStatesOfObject:x,releaseStatesOfProgram:C,initAttributes:_,enableAttribute:m,disableUnusedAttributes:v}}function tb(s,e,t){let n;function i(c){n=c}function r(c,l){s.drawArrays(n,c,l),t.update(l,n,1)}function a(c,l,h){h!==0&&(s.drawArraysInstanced(n,c,l,h),t.update(l,n,h))}function o(c,l,h){if(h===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,c,0,l,0,h);let d=0;for(let f=0;f<h;f++)d+=l[f];t.update(d,n,1)}this.setMode=i,this.render=r,this.renderInstances=a,this.renderMultiDraw=o}function nb(s,e,t,n){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){let C=e.get("EXT_texture_filter_anisotropic");i=s.getParameter(C.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function a(C){return!(C!==Qt&&n.convert(C)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function o(C){let x=C===Fn&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(C!==qt&&n.convert(C)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&C!==$t&&!x)}function c(C){if(C==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";C="mediump"}return C==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let l=t.precision!==void 0?t.precision:"highp",h=c(l);h!==l&&(_e("WebGLRenderer:",l,"not supported, using",h,"instead."),l=h);let u=t.logarithmicDepthBuffer===!0,d=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control");t.reversedDepthBuffer===!0&&d===!1&&_e("WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.");let f=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),g=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=s.getParameter(s.MAX_TEXTURE_SIZE),m=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),p=s.getParameter(s.MAX_VERTEX_ATTRIBS),v=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),S=s.getParameter(s.MAX_VARYING_VECTORS),M=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),E=s.getParameter(s.MAX_SAMPLES),T=s.getParameter(s.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:c,textureFormatReadable:a,textureTypeReadable:o,precision:l,logarithmicDepthBuffer:u,reversedDepthBuffer:d,maxTextures:f,maxVertexTextures:g,maxTextureSize:_,maxCubemapSize:m,maxAttributes:p,maxVertexUniforms:v,maxVaryings:S,maxFragmentUniforms:M,maxSamples:E,samples:T}}function ib(s){let e=this,t=null,n=0,i=!1,r=!1,a=new Sn,o=new Pe,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(u,d){let f=u.length!==0||d||n!==0||i;return i=d,n=u.length,f},this.beginShadows=function(){r=!0,h(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(u,d){t=h(u,d,0)},this.setState=function(u,d,f){let g=u.clippingPlanes,_=u.clipIntersection,m=u.clipShadows,p=s.get(u);if(!i||g===null||g.length===0||r&&!m)r?h(null):l();else{let v=r?0:n,S=v*4,M=p.clippingState||null;c.value=M,M=h(g,d,S,f);for(let E=0;E!==S;++E)M[E]=t[E];p.clippingState=M,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}};function l(){c.value!==t&&(c.value=t,c.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function h(u,d,f,g){let _=u!==null?u.length:0,m=null;if(_!==0){if(m=c.value,g!==!0||m===null){let p=f+_*4,v=d.matrixWorldInverse;o.getNormalMatrix(v),(m===null||m.length<p)&&(m=new Float32Array(p));for(let S=0,M=f;S!==_;++S,M+=4)a.copy(u[S]).applyMatrix4(v,o),a.normal.toArray(m,M),m[M+3]=a.constant}c.value=m,c.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,m}}var bi=4,sd=[.125,.215,.35,.446,.526,.582],Hi=20,sb=256,Nr=new di,rd=new Te,wl=null,El=0,Rl=0,Cl=!1,rb=new F,Is=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,i=100,r={}){let{size:a=256,position:o=rb}=r;wl=this._renderer.getRenderTarget(),El=this._renderer.getActiveCubeFace(),Rl=this._renderer.getActiveMipmapLevel(),Cl=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let c=this._allocateTargets();return c.depthBuffer=!0,this._sceneToCubeUV(e,n,i,c,o),t>0&&this._blur(c,0,0,t),this._applyPMREM(c),this._cleanup(c),c}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=cd(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=od(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(wl,El,Rl),this._renderer.xr.enabled=Cl,e.scissorTest=!1,Cs(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===pi||e.mapping===zi?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),wl=this._renderer.getRenderTarget(),El=this._renderer.getActiveCubeFace(),Rl=this._renderer.getActiveMipmapLevel(),Cl=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){let e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:_t,minFilter:_t,generateMipmaps:!1,type:Fn,format:Qt,colorSpace:kt,depthBuffer:!1},i=ad(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=ad(e,t,n);let{_lodMax:r}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=ab(r)),this._blurMaterial=cb(r,e,t),this._ggxMaterial=ob(r,e,t)}return i}_compileMaterial(e){let t=new lt(new zt,e);this._renderer.compile(t,Nr)}_sceneToCubeUV(e,t,n,i,r){let c=new Mt(90,1,t,n),l=[1,-1,1,1,1,1],h=[1,1,1,-1,-1,-1],u=this._renderer,d=u.autoClear,f=u.toneMapping;u.getClearColor(rd),u.toneMapping=bn,u.autoClear=!1,u.state.buffers.depth.getReversed()&&(u.setRenderTarget(i),u.clearDepth(),u.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new lt(new ui,new gn({name:"PMREM.Background",side:Pt,depthWrite:!1,depthTest:!1})));let _=this._backgroundBox,m=_.material,p=!1,v=e.background;v?v.isColor&&(m.color.copy(v),e.background=null,p=!0):(m.color.copy(rd),p=!0);for(let S=0;S<6;S++){let M=S%3;M===0?(c.up.set(0,l[S],0),c.position.set(r.x,r.y,r.z),c.lookAt(r.x+h[S],r.y,r.z)):M===1?(c.up.set(0,0,l[S]),c.position.set(r.x,r.y,r.z),c.lookAt(r.x,r.y+h[S],r.z)):(c.up.set(0,l[S],0),c.position.set(r.x,r.y,r.z),c.lookAt(r.x,r.y,r.z+h[S]));let E=this._cubeSize;Cs(i,M*E,S>2?E:0,E,E),u.setRenderTarget(i),p&&u.render(_,c),u.render(e,c)}u.toneMapping=f,u.autoClear=d,e.background=v}_textureToCubeUV(e,t){let n=this._renderer,i=e.mapping===pi||e.mapping===zi;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=cd()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=od());let r=i?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=r;let o=r.uniforms;o.envMap.value=e;let c=this._cubeSize;Cs(t,0,0,3*c,2*c),n.setRenderTarget(t),n.render(a,Nr)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let i=this._lodMeshes.length;for(let r=1;r<i;r++)this._applyGGXFilter(e,r-1,r);t.autoClear=n}_applyGGXFilter(e,t,n){let i=this._renderer,r=this._pingPongRenderTarget,a=this._ggxMaterial,o=this._lodMeshes[n];o.material=a;let c=a.uniforms,l=n/(this._lodMeshes.length-1),h=t/(this._lodMeshes.length-1),u=Math.sqrt(l*l-h*h),d=0+l*1.25,f=u*d,{_lodMax:g}=this,_=this._sizeLods[n],m=3*_*(n>g-bi?n-g+bi:0),p=4*(this._cubeSize-_);c.envMap.value=e.texture,c.roughness.value=f,c.mipInt.value=g-t,Cs(r,m,p,3*_,2*_),i.setRenderTarget(r),i.render(o,Nr),c.envMap.value=r.texture,c.roughness.value=0,c.mipInt.value=g-n,Cs(e,m,p,3*_,2*_),i.setRenderTarget(e),i.render(o,Nr)}_blur(e,t,n,i,r){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,i,"latitudinal",r),this._halfBlur(a,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,a,o){let c=this._renderer,l=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&we("blur direction must be either latitudinal or longitudinal!");let h=3,u=this._lodMeshes[i];u.material=l;let d=l.uniforms,f=this._sizeLods[n]-1,g=isFinite(r)?Math.PI/(2*f):2*Math.PI/(2*Hi-1),_=r/g,m=isFinite(r)?1+Math.floor(h*_):Hi;m>Hi&&_e(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${Hi}`);let p=[],v=0;for(let C=0;C<Hi;++C){let x=C/_,w=Math.exp(-x*x/2);p.push(w),C===0?v+=w:C<m&&(v+=2*w)}for(let C=0;C<p.length;C++)p[C]=p[C]/v;d.envMap.value=e.texture,d.samples.value=m,d.weights.value=p,d.latitudinal.value=a==="latitudinal",o&&(d.poleAxis.value=o);let{_lodMax:S}=this;d.dTheta.value=g,d.mipInt.value=S-n;let M=this._sizeLods[i],E=3*M*(i>S-bi?i-S+bi:0),T=4*(this._cubeSize-M);Cs(t,E,T,3*M,2*M),c.setRenderTarget(t),c.render(u,Nr)}};function ab(s){let e=[],t=[],n=[],i=s,r=s-bi+1+sd.length;for(let a=0;a<r;a++){let o=Math.pow(2,i);e.push(o);let c=1/o;a>s-bi?c=sd[a-s+bi-1]:a===0&&(c=0),t.push(c);let l=1/(o-2),h=-l,u=1+l,d=[h,h,u,h,u,u,h,h,u,u,h,u],f=6,g=6,_=3,m=2,p=1,v=new Float32Array(_*g*f),S=new Float32Array(m*g*f),M=new Float32Array(p*g*f);for(let T=0;T<f;T++){let C=T%3*2/3-1,x=T>2?0:-1,w=[C,x,0,C+2/3,x,0,C+2/3,x+1,0,C,x,0,C+2/3,x+1,0,C,x+1,0];v.set(w,_*g*T),S.set(d,m*g*T);let L=[T,T,T,T,T,T];M.set(L,p*g*T)}let E=new zt;E.setAttribute("position",new St(v,_)),E.setAttribute("uv",new St(S,m)),E.setAttribute("faceIndex",new St(M,p)),n.push(new lt(E,null)),i>bi&&i--}return{lodMeshes:n,sizeLods:e,sigmas:t}}function ad(s,e,t){let n=new Yt(s,e,t);return n.texture.mapping=Ar,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Cs(s,e,t,n,i){s.viewport.set(e,t,n,i),s.scissor.set(e,t,n,i)}function ob(s,e,t){return new Zt({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:sb,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:jo(),fragmentShader:`
+}`,Oe={alphahash_fragment:Fp,alphahash_pars_fragment:Np,alphamap_fragment:Up,alphamap_pars_fragment:Op,alphatest_fragment:kp,alphatest_pars_fragment:Bp,aomap_fragment:zp,aomap_pars_fragment:Gp,batching_pars_vertex:Vp,batching_vertex:Hp,begin_vertex:Wp,beginnormal_vertex:qp,bsdfs:Xp,iridescence_fragment:jp,bumpmap_pars_fragment:Kp,clipping_planes_fragment:Yp,clipping_planes_pars_fragment:Jp,clipping_planes_pars_vertex:$p,clipping_planes_vertex:Zp,color_fragment:Qp,color_pars_fragment:em,color_pars_vertex:tm,color_vertex:nm,common:im,cube_uv_reflection_fragment:sm,defaultnormal_vertex:rm,displacementmap_pars_vertex:am,displacementmap_vertex:om,emissivemap_fragment:cm,emissivemap_pars_fragment:lm,colorspace_fragment:hm,colorspace_pars_fragment:um,envmap_fragment:dm,envmap_common_pars_fragment:fm,envmap_pars_fragment:pm,envmap_pars_vertex:mm,envmap_physical_pars_fragment:wm,envmap_vertex:gm,fog_vertex:bm,fog_pars_vertex:xm,fog_fragment:_m,fog_pars_fragment:vm,gradientmap_pars_fragment:ym,lightmap_pars_fragment:Mm,lights_lambert_fragment:Sm,lights_lambert_pars_fragment:Am,lights_pars_begin:Tm,lights_toon_fragment:Em,lights_toon_pars_fragment:Rm,lights_phong_fragment:Cm,lights_phong_pars_fragment:Pm,lights_physical_fragment:Im,lights_physical_pars_fragment:Lm,lights_fragment_begin:Dm,lights_fragment_maps:Fm,lights_fragment_end:Nm,lightprobes_pars_fragment:Um,logdepthbuf_fragment:Om,logdepthbuf_pars_fragment:km,logdepthbuf_pars_vertex:Bm,logdepthbuf_vertex:zm,map_fragment:Gm,map_pars_fragment:Vm,map_particle_fragment:Hm,map_particle_pars_fragment:Wm,metalnessmap_fragment:qm,metalnessmap_pars_fragment:Xm,morphinstance_vertex:jm,morphcolor_vertex:Km,morphnormal_vertex:Ym,morphtarget_pars_vertex:Jm,morphtarget_vertex:$m,normal_fragment_begin:Zm,normal_fragment_maps:Qm,normal_pars_fragment:eg,normal_pars_vertex:tg,normal_vertex:ng,normalmap_pars_fragment:ig,clearcoat_normal_fragment_begin:sg,clearcoat_normal_fragment_maps:rg,clearcoat_pars_fragment:ag,iridescence_pars_fragment:og,opaque_fragment:cg,packing:lg,premultiplied_alpha_fragment:hg,project_vertex:ug,dithering_fragment:dg,dithering_pars_fragment:fg,roughnessmap_fragment:pg,roughnessmap_pars_fragment:mg,shadowmap_pars_fragment:gg,shadowmap_pars_vertex:bg,shadowmap_vertex:xg,shadowmask_pars_fragment:_g,skinbase_vertex:vg,skinning_pars_vertex:yg,skinning_vertex:Mg,skinnormal_vertex:Sg,specularmap_fragment:Ag,specularmap_pars_fragment:Tg,tonemapping_fragment:wg,tonemapping_pars_fragment:Eg,transmission_fragment:Rg,transmission_pars_fragment:Cg,uv_pars_fragment:Pg,uv_pars_vertex:Ig,uv_vertex:Lg,worldpos_vertex:Dg,background_vert:Fg,background_frag:Ng,backgroundCube_vert:Ug,backgroundCube_frag:Og,cube_vert:kg,cube_frag:Bg,depth_vert:zg,depth_frag:Gg,distance_vert:Vg,distance_frag:Hg,equirect_vert:Wg,equirect_frag:qg,linedashed_vert:Xg,linedashed_frag:jg,meshbasic_vert:Kg,meshbasic_frag:Yg,meshlambert_vert:Jg,meshlambert_frag:$g,meshmatcap_vert:Zg,meshmatcap_frag:Qg,meshnormal_vert:eb,meshnormal_frag:tb,meshphong_vert:nb,meshphong_frag:ib,meshphysical_vert:sb,meshphysical_frag:rb,meshtoon_vert:ab,meshtoon_frag:ob,points_vert:cb,points_frag:lb,shadow_vert:hb,shadow_frag:ub,sprite_vert:db,sprite_frag:fb},ce={common:{diffuse:{value:new Te(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Pe},alphaMap:{value:null},alphaMapTransform:{value:new Pe},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Pe}},envmap:{envMap:{value:null},envMapRotation:{value:new Pe},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Pe}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Pe}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Pe},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Pe},normalScale:{value:new He(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Pe},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Pe}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Pe}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Pe}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Te(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null},probesSH:{value:null},probesMin:{value:new F},probesMax:{value:new F},probesResolution:{value:new F}},points:{diffuse:{value:new Te(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Pe},alphaTest:{value:0},uvTransform:{value:new Pe}},sprite:{diffuse:{value:new Te(16777215)},opacity:{value:1},center:{value:new He(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Pe},alphaMap:{value:null},alphaMapTransform:{value:new Pe},alphaTest:{value:0}}},kn={basic:{uniforms:Nt([ce.common,ce.specularmap,ce.envmap,ce.aomap,ce.lightmap,ce.fog]),vertexShader:Oe.meshbasic_vert,fragmentShader:Oe.meshbasic_frag},lambert:{uniforms:Nt([ce.common,ce.specularmap,ce.envmap,ce.aomap,ce.lightmap,ce.emissivemap,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.fog,ce.lights,{emissive:{value:new Te(0)},envMapIntensity:{value:1}}]),vertexShader:Oe.meshlambert_vert,fragmentShader:Oe.meshlambert_frag},phong:{uniforms:Nt([ce.common,ce.specularmap,ce.envmap,ce.aomap,ce.lightmap,ce.emissivemap,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.fog,ce.lights,{emissive:{value:new Te(0)},specular:{value:new Te(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:Oe.meshphong_vert,fragmentShader:Oe.meshphong_frag},standard:{uniforms:Nt([ce.common,ce.envmap,ce.aomap,ce.lightmap,ce.emissivemap,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.roughnessmap,ce.metalnessmap,ce.fog,ce.lights,{emissive:{value:new Te(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Oe.meshphysical_vert,fragmentShader:Oe.meshphysical_frag},toon:{uniforms:Nt([ce.common,ce.aomap,ce.lightmap,ce.emissivemap,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.gradientmap,ce.fog,ce.lights,{emissive:{value:new Te(0)}}]),vertexShader:Oe.meshtoon_vert,fragmentShader:Oe.meshtoon_frag},matcap:{uniforms:Nt([ce.common,ce.bumpmap,ce.normalmap,ce.displacementmap,ce.fog,{matcap:{value:null}}]),vertexShader:Oe.meshmatcap_vert,fragmentShader:Oe.meshmatcap_frag},points:{uniforms:Nt([ce.points,ce.fog]),vertexShader:Oe.points_vert,fragmentShader:Oe.points_frag},dashed:{uniforms:Nt([ce.common,ce.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Oe.linedashed_vert,fragmentShader:Oe.linedashed_frag},depth:{uniforms:Nt([ce.common,ce.displacementmap]),vertexShader:Oe.depth_vert,fragmentShader:Oe.depth_frag},normal:{uniforms:Nt([ce.common,ce.bumpmap,ce.normalmap,ce.displacementmap,{opacity:{value:1}}]),vertexShader:Oe.meshnormal_vert,fragmentShader:Oe.meshnormal_frag},sprite:{uniforms:Nt([ce.sprite,ce.fog]),vertexShader:Oe.sprite_vert,fragmentShader:Oe.sprite_frag},background:{uniforms:{uvTransform:{value:new Pe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Oe.background_vert,fragmentShader:Oe.background_frag},backgroundCube:{uniforms:{envMap:{value:null},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Pe}},vertexShader:Oe.backgroundCube_vert,fragmentShader:Oe.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Oe.cube_vert,fragmentShader:Oe.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Oe.equirect_vert,fragmentShader:Oe.equirect_frag},distance:{uniforms:Nt([ce.common,ce.displacementmap,{referencePosition:{value:new F},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Oe.distance_vert,fragmentShader:Oe.distance_frag},shadow:{uniforms:Nt([ce.lights,ce.fog,{color:{value:new Te(0)},opacity:{value:1}}]),vertexShader:Oe.shadow_vert,fragmentShader:Oe.shadow_frag}};kn.physical={uniforms:Nt([kn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Pe},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Pe},clearcoatNormalScale:{value:new He(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Pe},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Pe},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Pe},sheen:{value:0},sheenColor:{value:new Te(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Pe},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Pe},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Pe},transmissionSamplerSize:{value:new He},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Pe},attenuationDistance:{value:0},attenuationColor:{value:new Te(0)},specularColor:{value:new Te(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Pe},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Pe},anisotropyVector:{value:new He},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Pe}}]),vertexShader:Oe.meshphysical_vert,fragmentShader:Oe.meshphysical_frag};var Ko={r:0,b:0,g:0},pb=new Ue,zd=new Pe;zd.set(-1,0,0,0,1,0,0,0,1);function mb(s,e,t,n,i,r){let a=new Te(0),o=i===!0?0:1,c,l,h=null,u=0,d=null;function f(v){let S=v.isScene===!0?v.background:null;if(S&&S.isTexture){let M=v.backgroundBlurriness>0;S=e.get(S,M)}return S}function g(v){let S=!1,M=f(v);M===null?m(a,o):M&&M.isColor&&(m(M,1),S=!0);let E=s.xr.getEnvironmentBlendMode();E==="additive"?t.buffers.color.setClear(0,0,0,1,r):E==="alpha-blend"&&t.buffers.color.setClear(0,0,0,0,r),(s.autoClear||S)&&(t.buffers.depth.setTest(!0),t.buffers.depth.setMask(!0),t.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function _(v,S){let M=f(S);M&&(M.isCubeTexture||M.mapping===Er)?(l===void 0&&(l=new lt(new fi(1,1,1),new $t({name:"BackgroundCubeMaterial",uniforms:Wi(kn.backgroundCube.uniforms),vertexShader:kn.backgroundCube.vertexShader,fragmentShader:kn.backgroundCube.fragmentShader,side:Pt,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(E,T,C){this.matrixWorld.copyPosition(C.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(l)),l.material.uniforms.envMap.value=M,l.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(pb.makeRotationFromEuler(S.backgroundRotation)).transpose(),M.isCubeTexture&&M.isRenderTargetTexture===!1&&l.material.uniforms.backgroundRotation.value.premultiply(zd),l.material.toneMapped=Be.getTransfer(M.colorSpace)!==Ye,(h!==M||u!==M.version||d!==s.toneMapping)&&(l.material.needsUpdate=!0,h=M,u=M.version,d=s.toneMapping),l.layers.enableAll(),v.unshift(l,l.geometry,l.material,0,0,null)):M&&M.isTexture&&(c===void 0&&(c=new lt(new fr(2,2),new $t({name:"BackgroundMaterial",uniforms:Wi(kn.background.uniforms),vertexShader:kn.background.vertexShader,fragmentShader:kn.background.fragmentShader,side:mn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(c)),c.material.uniforms.t2D.value=M,c.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,c.material.toneMapped=Be.getTransfer(M.colorSpace)!==Ye,M.matrixAutoUpdate===!0&&M.updateMatrix(),c.material.uniforms.uvTransform.value.copy(M.matrix),(h!==M||u!==M.version||d!==s.toneMapping)&&(c.material.needsUpdate=!0,h=M,u=M.version,d=s.toneMapping),c.layers.enableAll(),v.unshift(c,c.geometry,c.material,0,0,null))}function m(v,S){v.getRGB(Ko,wl(s)),t.buffers.color.setClear(Ko.r,Ko.g,Ko.b,S,r)}function p(){l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(v,S=1){a.set(v),o=S,m(a,o)},getClearAlpha:function(){return o},setClearAlpha:function(v){o=v,m(a,o)},render:g,addToRenderList:_,dispose:p}}function gb(s,e){let t=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},i=d(null),r=i,a=!1;function o(R,O,H,q,N){let z=!1,V=u(R,q,H,O);r!==V&&(r=V,l(r.object)),z=f(R,q,H,N),z&&g(R,q,H,N),N!==null&&e.update(N,s.ELEMENT_ARRAY_BUFFER),(z||a)&&(a=!1,M(R,O,H,q),N!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get(N).buffer))}function c(){return s.createVertexArray()}function l(R){return s.bindVertexArray(R)}function h(R){return s.deleteVertexArray(R)}function u(R,O,H,q){let N=q.wireframe===!0,z=n[O.id];z===void 0&&(z={},n[O.id]=z);let V=R.isInstancedMesh===!0?R.id:0,Z=z[V];Z===void 0&&(Z={},z[V]=Z);let Q=Z[H.id];Q===void 0&&(Q={},Z[H.id]=Q);let le=Q[N];return le===void 0&&(le=d(c()),Q[N]=le),le}function d(R){let O=[],H=[],q=[];for(let N=0;N<t;N++)O[N]=0,H[N]=0,q[N]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:O,enabledAttributes:H,attributeDivisors:q,object:R,attributes:{},index:null}}function f(R,O,H,q){let N=r.attributes,z=O.attributes,V=0,Z=H.getAttributes();for(let Q in Z)if(Z[Q].location>=0){let xe=N[Q],Se=z[Q];if(Se===void 0&&(Q==="instanceMatrix"&&R.instanceMatrix&&(Se=R.instanceMatrix),Q==="instanceColor"&&R.instanceColor&&(Se=R.instanceColor)),xe===void 0||xe.attribute!==Se||Se&&xe.data!==Se.data)return!0;V++}return r.attributesNum!==V||r.index!==q}function g(R,O,H,q){let N={},z=O.attributes,V=0,Z=H.getAttributes();for(let Q in Z)if(Z[Q].location>=0){let xe=z[Q];xe===void 0&&(Q==="instanceMatrix"&&R.instanceMatrix&&(xe=R.instanceMatrix),Q==="instanceColor"&&R.instanceColor&&(xe=R.instanceColor));let Se={};Se.attribute=xe,xe&&xe.data&&(Se.data=xe.data),N[Q]=Se,V++}r.attributes=N,r.attributesNum=V,r.index=q}function _(){let R=r.newAttributes;for(let O=0,H=R.length;O<H;O++)R[O]=0}function m(R){p(R,0)}function p(R,O){let H=r.newAttributes,q=r.enabledAttributes,N=r.attributeDivisors;H[R]=1,q[R]===0&&(s.enableVertexAttribArray(R),q[R]=1),N[R]!==O&&(s.vertexAttribDivisor(R,O),N[R]=O)}function v(){let R=r.newAttributes,O=r.enabledAttributes;for(let H=0,q=O.length;H<q;H++)O[H]!==R[H]&&(s.disableVertexAttribArray(H),O[H]=0)}function S(R,O,H,q,N,z,V){V===!0?s.vertexAttribIPointer(R,O,H,N,z):s.vertexAttribPointer(R,O,H,q,N,z)}function M(R,O,H,q){_();let N=q.attributes,z=H.getAttributes(),V=O.defaultAttributeValues;for(let Z in z){let Q=z[Z];if(Q.location>=0){let le=N[Z];if(le===void 0&&(Z==="instanceMatrix"&&R.instanceMatrix&&(le=R.instanceMatrix),Z==="instanceColor"&&R.instanceColor&&(le=R.instanceColor)),le!==void 0){let xe=le.normalized,Se=le.itemSize,Xe=e.get(le);if(Xe===void 0)continue;let $e=Xe.buffer,Fe=Xe.type,Y=Xe.bytesPerElement,de=Fe===s.INT||Fe===s.UNSIGNED_INT||le.gpuType===oo;if(le.isInterleavedBufferAttribute){let ie=le.data,Ee=ie.stride,Ie=le.offset;if(ie.isInstancedInterleavedBuffer){for(let Re=0;Re<Q.locationSize;Re++)p(Q.location+Re,ie.meshPerAttribute);R.isInstancedMesh!==!0&&q._maxInstanceCount===void 0&&(q._maxInstanceCount=ie.meshPerAttribute*ie.count)}else for(let Re=0;Re<Q.locationSize;Re++)m(Q.location+Re);s.bindBuffer(s.ARRAY_BUFFER,$e);for(let Re=0;Re<Q.locationSize;Re++)S(Q.location+Re,Se/Q.locationSize,Fe,xe,Ee*Y,(Ie+Se/Q.locationSize*Re)*Y,de)}else{if(le.isInstancedBufferAttribute){for(let ie=0;ie<Q.locationSize;ie++)p(Q.location+ie,le.meshPerAttribute);R.isInstancedMesh!==!0&&q._maxInstanceCount===void 0&&(q._maxInstanceCount=le.meshPerAttribute*le.count)}else for(let ie=0;ie<Q.locationSize;ie++)m(Q.location+ie);s.bindBuffer(s.ARRAY_BUFFER,$e);for(let ie=0;ie<Q.locationSize;ie++)S(Q.location+ie,Se/Q.locationSize,Fe,xe,Se*Y,Se/Q.locationSize*ie*Y,de)}}else if(V!==void 0){let xe=V[Z];if(xe!==void 0)switch(xe.length){case 2:s.vertexAttrib2fv(Q.location,xe);break;case 3:s.vertexAttrib3fv(Q.location,xe);break;case 4:s.vertexAttrib4fv(Q.location,xe);break;default:s.vertexAttrib1fv(Q.location,xe)}}}}v()}function E(){w();for(let R in n){let O=n[R];for(let H in O){let q=O[H];for(let N in q){let z=q[N];for(let V in z)h(z[V].object),delete z[V];delete q[N]}}delete n[R]}}function T(R){if(n[R.id]===void 0)return;let O=n[R.id];for(let H in O){let q=O[H];for(let N in q){let z=q[N];for(let V in z)h(z[V].object),delete z[V];delete q[N]}}delete n[R.id]}function C(R){for(let O in n){let H=n[O];for(let q in H){let N=H[q];if(N[R.id]===void 0)continue;let z=N[R.id];for(let V in z)h(z[V].object),delete z[V];delete N[R.id]}}}function x(R){for(let O in n){let H=n[O],q=R.isInstancedMesh===!0?R.id:0,N=H[q];if(N!==void 0){for(let z in N){let V=N[z];for(let Z in V)h(V[Z].object),delete V[Z];delete N[z]}delete H[q],Object.keys(H).length===0&&delete n[O]}}}function w(){L(),a=!0,r!==i&&(r=i,l(r.object))}function L(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:o,reset:w,resetDefaultState:L,dispose:E,releaseStatesOfGeometry:T,releaseStatesOfObject:x,releaseStatesOfProgram:C,initAttributes:_,enableAttribute:m,disableUnusedAttributes:v}}function bb(s,e,t){let n;function i(c){n=c}function r(c,l){s.drawArrays(n,c,l),t.update(l,n,1)}function a(c,l,h){h!==0&&(s.drawArraysInstanced(n,c,l,h),t.update(l,n,h))}function o(c,l,h){if(h===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,c,0,l,0,h);let d=0;for(let f=0;f<h;f++)d+=l[f];t.update(d,n,1)}this.setMode=i,this.render=r,this.renderInstances=a,this.renderMultiDraw=o}function xb(s,e,t,n){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){let C=e.get("EXT_texture_filter_anisotropic");i=s.getParameter(C.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function a(C){return!(C!==Qt&&n.convert(C)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function o(C){let x=C===Un&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(C!==qt&&n.convert(C)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&C!==Zt&&!x)}function c(C){if(C==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";C="mediump"}return C==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let l=t.precision!==void 0?t.precision:"highp",h=c(l);h!==l&&(_e("WebGLRenderer:",l,"not supported, using",h,"instead."),l=h);let u=t.logarithmicDepthBuffer===!0,d=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control");t.reversedDepthBuffer===!0&&d===!1&&_e("WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.");let f=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),g=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=s.getParameter(s.MAX_TEXTURE_SIZE),m=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),p=s.getParameter(s.MAX_VERTEX_ATTRIBS),v=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),S=s.getParameter(s.MAX_VARYING_VECTORS),M=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),E=s.getParameter(s.MAX_SAMPLES),T=s.getParameter(s.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:c,textureFormatReadable:a,textureTypeReadable:o,precision:l,logarithmicDepthBuffer:u,reversedDepthBuffer:d,maxTextures:f,maxVertexTextures:g,maxTextureSize:_,maxCubemapSize:m,maxAttributes:p,maxVertexUniforms:v,maxVaryings:S,maxFragmentUniforms:M,maxSamples:E,samples:T}}function _b(s){let e=this,t=null,n=0,i=!1,r=!1,a=new Tn,o=new Pe,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(u,d){let f=u.length!==0||d||n!==0||i;return i=d,n=u.length,f},this.beginShadows=function(){r=!0,h(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(u,d){t=h(u,d,0)},this.setState=function(u,d,f){let g=u.clippingPlanes,_=u.clipIntersection,m=u.clipShadows,p=s.get(u);if(!i||g===null||g.length===0||r&&!m)r?h(null):l();else{let v=r?0:n,S=v*4,M=p.clippingState||null;c.value=M,M=h(g,d,S,f);for(let E=0;E!==S;++E)M[E]=t[E];p.clippingState=M,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}};function l(){c.value!==t&&(c.value=t,c.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function h(u,d,f,g){let _=u!==null?u.length:0,m=null;if(_!==0){if(m=c.value,g!==!0||m===null){let p=f+_*4,v=d.matrixWorldInverse;o.getNormalMatrix(v),(m===null||m.length<p)&&(m=new Float32Array(p));for(let S=0,M=f;S!==_;++S,M+=4)a.copy(u[S]).applyMatrix4(v,o),a.normal.toArray(m,M),m[M+3]=a.constant}c.value=m,c.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,m}}var _i=4,bd=[.125,.215,.35,.446,.526,.582],qi=20,vb=256,kr=new pi,xd=new Te,Nl=null,Ul=0,Ol=0,kl=!1,yb=new F,Fs=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,i=100,r={}){let{size:a=256,position:o=yb}=r;Nl=this._renderer.getRenderTarget(),Ul=this._renderer.getActiveCubeFace(),Ol=this._renderer.getActiveMipmapLevel(),kl=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let c=this._allocateTargets();return c.depthBuffer=!0,this._sceneToCubeUV(e,n,i,c,o),t>0&&this._blur(c,0,0,t),this._applyPMREM(c),this._cleanup(c),c}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=yd(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=vd(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(Nl,Ul,Ol),this._renderer.xr.enabled=kl,e.scissorTest=!1,Ls(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===gi||e.mapping===Vi?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Nl=this._renderer.getRenderTarget(),Ul=this._renderer.getActiveCubeFace(),Ol=this._renderer.getActiveMipmapLevel(),kl=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){let e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:_t,minFilter:_t,generateMipmaps:!1,type:Un,format:Qt,colorSpace:kt,depthBuffer:!1},i=_d(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=_d(e,t,n);let{_lodMax:r}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=Mb(r)),this._blurMaterial=Ab(r,e,t),this._ggxMaterial=Sb(r,e,t)}return i}_compileMaterial(e){let t=new lt(new zt,e);this._renderer.compile(t,kr)}_sceneToCubeUV(e,t,n,i,r){let c=new Mt(90,1,t,n),l=[1,-1,1,1,1,1],h=[1,1,1,-1,-1,-1],u=this._renderer,d=u.autoClear,f=u.toneMapping;u.getClearColor(xd),u.toneMapping=xn,u.autoClear=!1,u.state.buffers.depth.getReversed()&&(u.setRenderTarget(i),u.clearDepth(),u.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new lt(new fi,new bn({name:"PMREM.Background",side:Pt,depthWrite:!1,depthTest:!1})));let _=this._backgroundBox,m=_.material,p=!1,v=e.background;v?v.isColor&&(m.color.copy(v),e.background=null,p=!0):(m.color.copy(xd),p=!0);for(let S=0;S<6;S++){let M=S%3;M===0?(c.up.set(0,l[S],0),c.position.set(r.x,r.y,r.z),c.lookAt(r.x+h[S],r.y,r.z)):M===1?(c.up.set(0,0,l[S]),c.position.set(r.x,r.y,r.z),c.lookAt(r.x,r.y+h[S],r.z)):(c.up.set(0,l[S],0),c.position.set(r.x,r.y,r.z),c.lookAt(r.x,r.y,r.z+h[S]));let E=this._cubeSize;Ls(i,M*E,S>2?E:0,E,E),u.setRenderTarget(i),p&&u.render(_,c),u.render(e,c)}u.toneMapping=f,u.autoClear=d,e.background=v}_textureToCubeUV(e,t){let n=this._renderer,i=e.mapping===gi||e.mapping===Vi;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=yd()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=vd());let r=i?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=r;let o=r.uniforms;o.envMap.value=e;let c=this._cubeSize;Ls(t,0,0,3*c,2*c),n.setRenderTarget(t),n.render(a,kr)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let i=this._lodMeshes.length;for(let r=1;r<i;r++)this._applyGGXFilter(e,r-1,r);t.autoClear=n}_applyGGXFilter(e,t,n){let i=this._renderer,r=this._pingPongRenderTarget,a=this._ggxMaterial,o=this._lodMeshes[n];o.material=a;let c=a.uniforms,l=n/(this._lodMeshes.length-1),h=t/(this._lodMeshes.length-1),u=Math.sqrt(l*l-h*h),d=0+l*1.25,f=u*d,{_lodMax:g}=this,_=this._sizeLods[n],m=3*_*(n>g-_i?n-g+_i:0),p=4*(this._cubeSize-_);c.envMap.value=e.texture,c.roughness.value=f,c.mipInt.value=g-t,Ls(r,m,p,3*_,2*_),i.setRenderTarget(r),i.render(o,kr),c.envMap.value=r.texture,c.roughness.value=0,c.mipInt.value=g-n,Ls(e,m,p,3*_,2*_),i.setRenderTarget(e),i.render(o,kr)}_blur(e,t,n,i,r){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,i,"latitudinal",r),this._halfBlur(a,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,a,o){let c=this._renderer,l=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&we("blur direction must be either latitudinal or longitudinal!");let h=3,u=this._lodMeshes[i];u.material=l;let d=l.uniforms,f=this._sizeLods[n]-1,g=isFinite(r)?Math.PI/(2*f):2*Math.PI/(2*qi-1),_=r/g,m=isFinite(r)?1+Math.floor(h*_):qi;m>qi&&_e(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${qi}`);let p=[],v=0;for(let C=0;C<qi;++C){let x=C/_,w=Math.exp(-x*x/2);p.push(w),C===0?v+=w:C<m&&(v+=2*w)}for(let C=0;C<p.length;C++)p[C]=p[C]/v;d.envMap.value=e.texture,d.samples.value=m,d.weights.value=p,d.latitudinal.value=a==="latitudinal",o&&(d.poleAxis.value=o);let{_lodMax:S}=this;d.dTheta.value=g,d.mipInt.value=S-n;let M=this._sizeLods[i],E=3*M*(i>S-_i?i-S+_i:0),T=4*(this._cubeSize-M);Ls(t,E,T,3*M,2*M),c.setRenderTarget(t),c.render(u,kr)}};function Mb(s){let e=[],t=[],n=[],i=s,r=s-_i+1+bd.length;for(let a=0;a<r;a++){let o=Math.pow(2,i);e.push(o);let c=1/o;a>s-_i?c=bd[a-s+_i-1]:a===0&&(c=0),t.push(c);let l=1/(o-2),h=-l,u=1+l,d=[h,h,u,h,u,u,h,h,u,u,h,u],f=6,g=6,_=3,m=2,p=1,v=new Float32Array(_*g*f),S=new Float32Array(m*g*f),M=new Float32Array(p*g*f);for(let T=0;T<f;T++){let C=T%3*2/3-1,x=T>2?0:-1,w=[C,x,0,C+2/3,x,0,C+2/3,x+1,0,C,x,0,C+2/3,x+1,0,C,x+1,0];v.set(w,_*g*T),S.set(d,m*g*T);let L=[T,T,T,T,T,T];M.set(L,p*g*T)}let E=new zt;E.setAttribute("position",new St(v,_)),E.setAttribute("uv",new St(S,m)),E.setAttribute("faceIndex",new St(M,p)),n.push(new lt(E,null)),i>_i&&i--}return{lodMeshes:n,sizeLods:e,sigmas:t}}function _d(s,e,t){let n=new Jt(s,e,t);return n.texture.mapping=Er,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Ls(s,e,t,n,i){s.viewport.set(e,t,n,i),s.scissor.set(e,t,n,i)}function Sb(s,e,t){return new $t({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:vb,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:Zo(),fragmentShader:`
precision highp float;
precision highp int;
@@ -3769,7 +3769,7 @@ void main() {
gl_FragColor = vec4(prefilteredColor, 1.0);
}
- `,blending:Dn,depthTest:!1,depthWrite:!1})}function cb(s,e,t){let n=new Float32Array(Hi),i=new F(0,1,0);return new Zt({name:"SphericalGaussianBlur",defines:{n:Hi,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:jo(),fragmentShader:`
+ `,blending:Nn,depthTest:!1,depthWrite:!1})}function Ab(s,e,t){let n=new Float32Array(qi),i=new F(0,1,0);return new $t({name:"SphericalGaussianBlur",defines:{n:qi,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Zo(),fragmentShader:`
precision mediump float;
precision mediump int;
@@ -3829,7 +3829,7 @@ void main() {
}
}
- `,blending:Dn,depthTest:!1,depthWrite:!1})}function od(){return new Zt({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:jo(),fragmentShader:`
+ `,blending:Nn,depthTest:!1,depthWrite:!1})}function vd(){return new $t({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Zo(),fragmentShader:`
precision mediump float;
precision mediump int;
@@ -3848,7 +3848,7 @@ void main() {
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
}
- `,blending:Dn,depthTest:!1,depthWrite:!1})}function cd(){return new Zt({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:jo(),fragmentShader:`
+ `,blending:Nn,depthTest:!1,depthWrite:!1})}function yd(){return new $t({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Zo(),fragmentShader:`
precision mediump float;
precision mediump int;
@@ -3864,7 +3864,7 @@ void main() {
gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
}
- `,blending:Dn,depthTest:!1,depthWrite:!1})}function jo(){return`
+ `,blending:Nn,depthTest:!1,depthWrite:!1})}function Zo(){return`
precision mediump float;
precision mediump int;
@@ -3919,7 +3919,7 @@ void main() {
gl_Position = vec4( position, 1.0 );
}
- `}var qo=class extends Yt{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new cr(i),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:`
+ `}var Jo=class extends Jt{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new ur(i),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:`
varying vec3 vWorldDirection;
@@ -3954,7 +3954,7 @@ void main() {
gl_FragColor = texture2D( tEquirect, sampleUV );
}
- `},i=new ui(5,5,5),r=new Zt({name:"CubemapFromEquirect",uniforms:Vi(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Pt,blending:Dn});r.uniforms.tEquirect.value=t;let a=new lt(i,r),o=t.minFilter;return t.minFilter===xn&&(t.minFilter=_t),new ja(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){let r=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,i);e.setRenderTarget(r)}};function lb(s){let e=new WeakMap,t=new WeakMap,n=null;function i(d,f=!1){return d==null?null:f?a(d):r(d)}function r(d){if(d&&d.isTexture){let f=d.mapping;if(f===Qa||f===eo)if(e.has(d)){let g=e.get(d).texture;return o(g,d.mapping)}else{let g=d.image;if(g&&g.height>0){let _=new qo(g.height);return _.fromEquirectangularTexture(s,d),e.set(d,_),d.addEventListener("dispose",l),o(_.texture,d.mapping)}else return null}}return d}function a(d){if(d&&d.isTexture){let f=d.mapping,g=f===Qa||f===eo,_=f===pi||f===zi;if(g||_){let m=t.get(d),p=m!==void 0?m.texture.pmremVersion:0;if(d.isRenderTargetTexture&&d.pmremVersion!==p)return n===null&&(n=new Is(s)),m=g?n.fromEquirectangular(d,m):n.fromCubemap(d,m),m.texture.pmremVersion=d.pmremVersion,t.set(d,m),m.texture;if(m!==void 0)return m.texture;{let v=d.image;return g&&v&&v.height>0||_&&v&&c(v)?(n===null&&(n=new Is(s)),m=g?n.fromEquirectangular(d):n.fromCubemap(d),m.texture.pmremVersion=d.pmremVersion,t.set(d,m),d.addEventListener("dispose",h),m.texture):null}}}return d}function o(d,f){return f===Qa?d.mapping=pi:f===eo&&(d.mapping=zi),d}function c(d){let f=0,g=6;for(let _=0;_<g;_++)d[_]!==void 0&&f++;return f===g}function l(d){let f=d.target;f.removeEventListener("dispose",l);let g=e.get(f);g!==void 0&&(e.delete(f),g.dispose())}function h(d){let f=d.target;f.removeEventListener("dispose",h);let g=t.get(f);g!==void 0&&(t.delete(f),g.dispose())}function u(){e=new WeakMap,t=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:i,dispose:u}}function hb(s){let e={};function t(n){if(e[n]!==void 0)return e[n];let i=s.getExtension(n);return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){let i=t(n);return i===null&&Ia("WebGLRenderer: "+n+" extension not supported."),i}}}function ub(s,e,t,n){let i={},r=new WeakMap;function a(u){let d=u.target;d.index!==null&&e.remove(d.index);for(let g in d.attributes)e.remove(d.attributes[g]);d.removeEventListener("dispose",a),delete i[d.id];let f=r.get(d);f&&(e.remove(f),r.delete(d)),n.releaseStatesOfGeometry(d),d.isInstancedBufferGeometry===!0&&delete d._maxInstanceCount,t.memory.geometries--}function o(u,d){return i[d.id]===!0||(d.addEventListener("dispose",a),i[d.id]=!0,t.memory.geometries++),d}function c(u){let d=u.attributes;for(let f in d)e.update(d[f],s.ARRAY_BUFFER)}function l(u){let d=[],f=u.index,g=u.attributes.position,_=0;if(g===void 0)return;if(f!==null){let v=f.array;_=f.version;for(let S=0,M=v.length;S<M;S+=3){let E=v[S+0],T=v[S+1],C=v[S+2];d.push(E,T,T,C,C,E)}}else{let v=g.array;_=g.version;for(let S=0,M=v.length/3-1;S<M;S+=3){let E=S+0,T=S+1,C=S+2;d.push(E,T,T,C,C,E)}}let m=new(g.count>=65535?nr:tr)(d,1);m.version=_;let p=r.get(u);p&&e.remove(p),r.set(u,m)}function h(u){let d=r.get(u);if(d){let f=u.index;f!==null&&d.version<f.version&&l(u)}else l(u);return r.get(u)}return{get:o,update:c,getWireframeAttribute:h}}function db(s,e,t){let n;function i(u){n=u}let r,a;function o(u){r=u.type,a=u.bytesPerElement}function c(u,d){s.drawElements(n,d,r,u*a),t.update(d,n,1)}function l(u,d,f){f!==0&&(s.drawElementsInstanced(n,d,r,u*a,f),t.update(d,n,f))}function h(u,d,f){if(f===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,d,0,r,u,0,f);let _=0;for(let m=0;m<f;m++)_+=d[m];t.update(_,n,1)}this.setMode=i,this.setIndex=o,this.render=c,this.renderInstances=l,this.renderMultiDraw=h}function fb(s){let e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(r,a,o){switch(t.calls++,a){case s.TRIANGLES:t.triangles+=o*(r/3);break;case s.LINES:t.lines+=o*(r/2);break;case s.LINE_STRIP:t.lines+=o*(r-1);break;case s.LINE_LOOP:t.lines+=o*r;break;case s.POINTS:t.points+=o*r;break;default:we("WebGLInfo: Unknown draw mode:",a);break}}function i(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:i,update:n}}function pb(s,e,t){let n=new WeakMap,i=new nt;function r(a,o,c){let l=a.morphTargetInfluences,h=o.morphAttributes.position||o.morphAttributes.normal||o.morphAttributes.color,u=h!==void 0?h.length:0,d=n.get(o);if(d===void 0||d.count!==u){let w=function(){C.dispose(),n.delete(o),o.removeEventListener("dispose",w)};d!==void 0&&d.texture.dispose();let f=o.morphAttributes.position!==void 0,g=o.morphAttributes.normal!==void 0,_=o.morphAttributes.color!==void 0,m=o.morphAttributes.position||[],p=o.morphAttributes.normal||[],v=o.morphAttributes.color||[],S=0;f===!0&&(S=1),g===!0&&(S=2),_===!0&&(S=3);let M=o.attributes.position.count*S,E=1;M>e.maxTextureSize&&(E=Math.ceil(M/e.maxTextureSize),M=e.maxTextureSize);let T=new Float32Array(M*E*4*u),C=new Qs(T,M,E,u);C.type=$t,C.needsUpdate=!0;let x=S*4;for(let L=0;L<u;L++){let R=m[L],O=p[L],H=v[L],q=M*E*4*L;for(let N=0;N<R.count;N++){let z=N*x;f===!0&&(i.fromBufferAttribute(R,N),T[q+z+0]=i.x,T[q+z+1]=i.y,T[q+z+2]=i.z,T[q+z+3]=0),g===!0&&(i.fromBufferAttribute(O,N),T[q+z+4]=i.x,T[q+z+5]=i.y,T[q+z+6]=i.z,T[q+z+7]=0),_===!0&&(i.fromBufferAttribute(H,N),T[q+z+8]=i.x,T[q+z+9]=i.y,T[q+z+10]=i.z,T[q+z+11]=H.itemSize===4?i.w:1)}}d={count:u,texture:C,size:new He(M,E)},n.set(o,d),o.addEventListener("dispose",w)}if(a.isInstancedMesh===!0&&a.morphTexture!==null)c.getUniforms().setValue(s,"morphTexture",a.morphTexture,t);else{let f=0;for(let _=0;_<l.length;_++)f+=l[_];let g=o.morphTargetsRelative?1:1-f;c.getUniforms().setValue(s,"morphTargetBaseInfluence",g),c.getUniforms().setValue(s,"morphTargetInfluences",l)}c.getUniforms().setValue(s,"morphTargetsTexture",d.texture,t),c.getUniforms().setValue(s,"morphTargetsTextureSize",d.size)}return{update:r}}function mb(s,e,t,n,i){let r=new WeakMap;function a(l){let h=i.render.frame,u=l.geometry,d=e.get(l,u);if(r.get(d)!==h&&(e.update(d),r.set(d,h)),l.isInstancedMesh&&(l.hasEventListener("dispose",c)===!1&&l.addEventListener("dispose",c),r.get(l)!==h&&(t.update(l.instanceMatrix,s.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,s.ARRAY_BUFFER),r.set(l,h))),l.isSkinnedMesh){let f=l.skeleton;r.get(f)!==h&&(f.update(),r.set(f,h))}return d}function o(){r=new WeakMap}function c(l){let h=l.target;h.removeEventListener("dispose",c),n.releaseStatesOfObject(h),t.remove(h.instanceMatrix),h.instanceColor!==null&&t.remove(h.instanceColor)}return{update:a,dispose:o}}var gb={[tl]:"LINEAR_TONE_MAPPING",[nl]:"REINHARD_TONE_MAPPING",[il]:"CINEON_TONE_MAPPING",[Sr]:"ACES_FILMIC_TONE_MAPPING",[rl]:"AGX_TONE_MAPPING",[al]:"NEUTRAL_TONE_MAPPING",[sl]:"CUSTOM_TONE_MAPPING"};function bb(s,e,t,n,i){let r=new Yt(e,t,{type:s,depthBuffer:n,stencilBuffer:i,depthTexture:n?new jn(e,t):void 0}),a=new Yt(e,t,{type:Fn,depthBuffer:!1,stencilBuffer:!1}),o=new zt;o.setAttribute("position",new Ot([-1,3,0,-1,-1,0,3,-1,0],3)),o.setAttribute("uv",new Ot([0,2,0,0,2,0],2));let c=new ka({uniforms:{tDiffuse:{value:null}},vertexShader:`
+ `},i=new fi(5,5,5),r=new $t({name:"CubemapFromEquirect",uniforms:Wi(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Pt,blending:Nn});r.uniforms.tEquirect.value=t;let a=new lt(i,r),o=t.minFilter;return t.minFilter===_n&&(t.minFilter=_t),new Za(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){let r=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,i);e.setRenderTarget(r)}};function Tb(s){let e=new WeakMap,t=new WeakMap,n=null;function i(d,f=!1){return d==null?null:f?a(d):r(d)}function r(d){if(d&&d.isTexture){let f=d.mapping;if(f===so||f===ro)if(e.has(d)){let g=e.get(d).texture;return o(g,d.mapping)}else{let g=d.image;if(g&&g.height>0){let _=new Jo(g.height);return _.fromEquirectangularTexture(s,d),e.set(d,_),d.addEventListener("dispose",l),o(_.texture,d.mapping)}else return null}}return d}function a(d){if(d&&d.isTexture){let f=d.mapping,g=f===so||f===ro,_=f===gi||f===Vi;if(g||_){let m=t.get(d),p=m!==void 0?m.texture.pmremVersion:0;if(d.isRenderTargetTexture&&d.pmremVersion!==p)return n===null&&(n=new Fs(s)),m=g?n.fromEquirectangular(d,m):n.fromCubemap(d,m),m.texture.pmremVersion=d.pmremVersion,t.set(d,m),m.texture;if(m!==void 0)return m.texture;{let v=d.image;return g&&v&&v.height>0||_&&v&&c(v)?(n===null&&(n=new Fs(s)),m=g?n.fromEquirectangular(d):n.fromCubemap(d),m.texture.pmremVersion=d.pmremVersion,t.set(d,m),d.addEventListener("dispose",h),m.texture):null}}}return d}function o(d,f){return f===so?d.mapping=gi:f===ro&&(d.mapping=Vi),d}function c(d){let f=0,g=6;for(let _=0;_<g;_++)d[_]!==void 0&&f++;return f===g}function l(d){let f=d.target;f.removeEventListener("dispose",l);let g=e.get(f);g!==void 0&&(e.delete(f),g.dispose())}function h(d){let f=d.target;f.removeEventListener("dispose",h);let g=t.get(f);g!==void 0&&(t.delete(f),g.dispose())}function u(){e=new WeakMap,t=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:i,dispose:u}}function wb(s){let e={};function t(n){if(e[n]!==void 0)return e[n];let i=s.getExtension(n);return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){let i=t(n);return i===null&&Ua("WebGLRenderer: "+n+" extension not supported."),i}}}function Eb(s,e,t,n){let i={},r=new WeakMap;function a(u){let d=u.target;d.index!==null&&e.remove(d.index);for(let g in d.attributes)e.remove(d.attributes[g]);d.removeEventListener("dispose",a),delete i[d.id];let f=r.get(d);f&&(e.remove(f),r.delete(d)),n.releaseStatesOfGeometry(d),d.isInstancedBufferGeometry===!0&&delete d._maxInstanceCount,t.memory.geometries--}function o(u,d){return i[d.id]===!0||(d.addEventListener("dispose",a),i[d.id]=!0,t.memory.geometries++),d}function c(u){let d=u.attributes;for(let f in d)e.update(d[f],s.ARRAY_BUFFER)}function l(u){let d=[],f=u.index,g=u.attributes.position,_=0;if(g===void 0)return;if(f!==null){let v=f.array;_=f.version;for(let S=0,M=v.length;S<M;S+=3){let E=v[S+0],T=v[S+1],C=v[S+2];d.push(E,T,T,C,C,E)}}else{let v=g.array;_=g.version;for(let S=0,M=v.length/3-1;S<M;S+=3){let E=S+0,T=S+1,C=S+2;d.push(E,T,T,C,C,E)}}let m=new(g.count>=65535?rr:sr)(d,1);m.version=_;let p=r.get(u);p&&e.remove(p),r.set(u,m)}function h(u){let d=r.get(u);if(d){let f=u.index;f!==null&&d.version<f.version&&l(u)}else l(u);return r.get(u)}return{get:o,update:c,getWireframeAttribute:h}}function Rb(s,e,t){let n;function i(u){n=u}let r,a;function o(u){r=u.type,a=u.bytesPerElement}function c(u,d){s.drawElements(n,d,r,u*a),t.update(d,n,1)}function l(u,d,f){f!==0&&(s.drawElementsInstanced(n,d,r,u*a,f),t.update(d,n,f))}function h(u,d,f){if(f===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,d,0,r,u,0,f);let _=0;for(let m=0;m<f;m++)_+=d[m];t.update(_,n,1)}this.setMode=i,this.setIndex=o,this.render=c,this.renderInstances=l,this.renderMultiDraw=h}function Cb(s){let e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(r,a,o){switch(t.calls++,a){case s.TRIANGLES:t.triangles+=o*(r/3);break;case s.LINES:t.lines+=o*(r/2);break;case s.LINE_STRIP:t.lines+=o*(r-1);break;case s.LINE_LOOP:t.lines+=o*r;break;case s.POINTS:t.points+=o*r;break;default:we("WebGLInfo: Unknown draw mode:",a);break}}function i(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:i,update:n}}function Pb(s,e,t){let n=new WeakMap,i=new nt;function r(a,o,c){let l=a.morphTargetInfluences,h=o.morphAttributes.position||o.morphAttributes.normal||o.morphAttributes.color,u=h!==void 0?h.length:0,d=n.get(o);if(d===void 0||d.count!==u){let w=function(){C.dispose(),n.delete(o),o.removeEventListener("dispose",w)};d!==void 0&&d.texture.dispose();let f=o.morphAttributes.position!==void 0,g=o.morphAttributes.normal!==void 0,_=o.morphAttributes.color!==void 0,m=o.morphAttributes.position||[],p=o.morphAttributes.normal||[],v=o.morphAttributes.color||[],S=0;f===!0&&(S=1),g===!0&&(S=2),_===!0&&(S=3);let M=o.attributes.position.count*S,E=1;M>e.maxTextureSize&&(E=Math.ceil(M/e.maxTextureSize),M=e.maxTextureSize);let T=new Float32Array(M*E*4*u),C=new nr(T,M,E,u);C.type=Zt,C.needsUpdate=!0;let x=S*4;for(let L=0;L<u;L++){let R=m[L],O=p[L],H=v[L],q=M*E*4*L;for(let N=0;N<R.count;N++){let z=N*x;f===!0&&(i.fromBufferAttribute(R,N),T[q+z+0]=i.x,T[q+z+1]=i.y,T[q+z+2]=i.z,T[q+z+3]=0),g===!0&&(i.fromBufferAttribute(O,N),T[q+z+4]=i.x,T[q+z+5]=i.y,T[q+z+6]=i.z,T[q+z+7]=0),_===!0&&(i.fromBufferAttribute(H,N),T[q+z+8]=i.x,T[q+z+9]=i.y,T[q+z+10]=i.z,T[q+z+11]=H.itemSize===4?i.w:1)}}d={count:u,texture:C,size:new He(M,E)},n.set(o,d),o.addEventListener("dispose",w)}if(a.isInstancedMesh===!0&&a.morphTexture!==null)c.getUniforms().setValue(s,"morphTexture",a.morphTexture,t);else{let f=0;for(let _=0;_<l.length;_++)f+=l[_];let g=o.morphTargetsRelative?1:1-f;c.getUniforms().setValue(s,"morphTargetBaseInfluence",g),c.getUniforms().setValue(s,"morphTargetInfluences",l)}c.getUniforms().setValue(s,"morphTargetsTexture",d.texture,t),c.getUniforms().setValue(s,"morphTargetsTextureSize",d.size)}return{update:r}}function Ib(s,e,t,n,i){let r=new WeakMap;function a(l){let h=i.render.frame,u=l.geometry,d=e.get(l,u);if(r.get(d)!==h&&(e.update(d),r.set(d,h)),l.isInstancedMesh&&(l.hasEventListener("dispose",c)===!1&&l.addEventListener("dispose",c),r.get(l)!==h&&(t.update(l.instanceMatrix,s.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,s.ARRAY_BUFFER),r.set(l,h))),l.isSkinnedMesh){let f=l.skeleton;r.get(f)!==h&&(f.update(),r.set(f,h))}return d}function o(){r=new WeakMap}function c(l){let h=l.target;h.removeEventListener("dispose",c),n.releaseStatesOfObject(h),t.remove(h.instanceMatrix),h.instanceColor!==null&&t.remove(h.instanceColor)}return{update:a,dispose:o}}var Lb={[hl]:"LINEAR_TONE_MAPPING",[ul]:"REINHARD_TONE_MAPPING",[dl]:"CINEON_TONE_MAPPING",[wr]:"ACES_FILMIC_TONE_MAPPING",[pl]:"AGX_TONE_MAPPING",[ml]:"NEUTRAL_TONE_MAPPING",[fl]:"CUSTOM_TONE_MAPPING"};function Db(s,e,t,n,i){let r=new Jt(e,t,{type:s,depthBuffer:n,stencilBuffer:i,depthTexture:n?new Yn(e,t):void 0}),a=new Jt(e,t,{type:Un,depthBuffer:!1,stencilBuffer:!1}),o=new zt;o.setAttribute("position",new Ot([-1,3,0,-1,-1,0,3,-1,0],3)),o.setAttribute("uv",new Ot([0,2,0,0,2,0],2));let c=new Ha({uniforms:{tDiffuse:{value:null}},vertexShader:`
precision highp float;
uniform mat4 modelViewMatrix;
@@ -4000,17 +4000,17 @@ void main() {
#ifdef SRGB_TRANSFER
gl_FragColor = sRGBTransferOETF( gl_FragColor );
#endif
- }`,depthTest:!1,depthWrite:!1}),l=new lt(o,c),h=new di(-1,1,1,-1,0,1),u=null,d=null,f=!1,g,_=null,m=[],p=!1;this.setSize=function(v,S){r.setSize(v,S),a.setSize(v,S);for(let M=0;M<m.length;M++){let E=m[M];E.setSize&&E.setSize(v,S)}},this.setEffects=function(v){m=v,p=m.length>0&&m[0].isRenderPass===!0;let S=r.width,M=r.height;for(let E=0;E<m.length;E++){let T=m[E];T.setSize&&T.setSize(S,M)}},this.begin=function(v,S){if(f||v.toneMapping===bn&&m.length===0)return!1;if(_=S,S!==null){let M=S.width,E=S.height;(r.width!==M||r.height!==E)&&this.setSize(M,E)}return p===!1&&v.setRenderTarget(r),g=v.toneMapping,v.toneMapping=bn,!0},this.hasRenderPass=function(){return p},this.end=function(v,S){v.toneMapping=g,f=!0;let M=r,E=a;for(let T=0;T<m.length;T++){let C=m[T];if(C.enabled!==!1&&(C.render(v,E,M,S),C.needsSwap!==!1)){let x=M;M=E,E=x}}if(u!==v.outputColorSpace||d!==v.toneMapping){u=v.outputColorSpace,d=v.toneMapping,c.defines={},Be.getTransfer(u)===Je&&(c.defines.SRGB_TRANSFER="");let T=gb[d];T&&(c.defines[T]=""),c.needsUpdate=!0}c.uniforms.tDiffuse.value=M.texture,v.setRenderTarget(_),v.render(l,h),_=null,f=!1},this.isCompositing=function(){return f},this.dispose=function(){r.depthTexture&&r.depthTexture.dispose(),r.dispose(),a.dispose(),o.dispose(),c.dispose()}}var Rd=new Ct,Ll=new jn(1,1),Cd=new Qs,Pd=new Fa,Id=new cr,ld=[],hd=[],ud=new Float32Array(16),dd=new Float32Array(9),fd=new Float32Array(4);function Ls(s,e,t){let n=s[0];if(n<=0||n>0)return s;let i=e*t,r=ld[i];if(r===void 0&&(r=new Float32Array(i),ld[i]=r),e!==0){n.toArray(r,0);for(let a=1,o=0;a!==e;++a)o+=t,s[a].toArray(r,o)}return r}function wt(s,e){if(s.length!==e.length)return!1;for(let t=0,n=s.length;t<n;t++)if(s[t]!==e[t])return!1;return!0}function Et(s,e){for(let t=0,n=e.length;t<n;t++)s[t]=e[t]}function Ko(s,e){let t=hd[e];t===void 0&&(t=new Int32Array(e),hd[e]=t);for(let n=0;n!==e;++n)t[n]=s.allocateTextureUnit();return t}function xb(s,e){let t=this.cache;t[0]!==e&&(s.uniform1f(this.addr,e),t[0]=e)}function _b(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(wt(t,e))return;s.uniform2fv(this.addr,e),Et(t,e)}}function vb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(s.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(wt(t,e))return;s.uniform3fv(this.addr,e),Et(t,e)}}function yb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(wt(t,e))return;s.uniform4fv(this.addr,e),Et(t,e)}}function Mb(s,e){let t=this.cache,n=e.elements;if(n===void 0){if(wt(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),Et(t,e)}else{if(wt(t,n))return;fd.set(n),s.uniformMatrix2fv(this.addr,!1,fd),Et(t,n)}}function Sb(s,e){let t=this.cache,n=e.elements;if(n===void 0){if(wt(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),Et(t,e)}else{if(wt(t,n))return;dd.set(n),s.uniformMatrix3fv(this.addr,!1,dd),Et(t,n)}}function Ab(s,e){let t=this.cache,n=e.elements;if(n===void 0){if(wt(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),Et(t,e)}else{if(wt(t,n))return;ud.set(n),s.uniformMatrix4fv(this.addr,!1,ud),Et(t,n)}}function Tb(s,e){let t=this.cache;t[0]!==e&&(s.uniform1i(this.addr,e),t[0]=e)}function wb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(wt(t,e))return;s.uniform2iv(this.addr,e),Et(t,e)}}function Eb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(wt(t,e))return;s.uniform3iv(this.addr,e),Et(t,e)}}function Rb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(wt(t,e))return;s.uniform4iv(this.addr,e),Et(t,e)}}function Cb(s,e){let t=this.cache;t[0]!==e&&(s.uniform1ui(this.addr,e),t[0]=e)}function Pb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(wt(t,e))return;s.uniform2uiv(this.addr,e),Et(t,e)}}function Ib(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(wt(t,e))return;s.uniform3uiv(this.addr,e),Et(t,e)}}function Lb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(wt(t,e))return;s.uniform4uiv(this.addr,e),Et(t,e)}}function Db(s,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i);let r;this.type===s.SAMPLER_2D_SHADOW?(Ll.compareFunction=t.isReversedDepthBuffer()?Vo:Go,r=Ll):r=Rd,t.setTexture2D(e||r,i)}function Fb(s,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture3D(e||Pd,i)}function Nb(s,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTextureCube(e||Id,i)}function Ub(s,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||Cd,i)}function Ob(s){switch(s){case 5126:return xb;case 35664:return _b;case 35665:return vb;case 35666:return yb;case 35674:return Mb;case 35675:return Sb;case 35676:return Ab;case 5124:case 35670:return Tb;case 35667:case 35671:return wb;case 35668:case 35672:return Eb;case 35669:case 35673:return Rb;case 5125:return Cb;case 36294:return Pb;case 36295:return Ib;case 36296:return Lb;case 35678:case 36198:case 36298:case 36306:case 35682:return Db;case 35679:case 36299:case 36307:return Fb;case 35680:case 36300:case 36308:case 36293:return Nb;case 36289:case 36303:case 36311:case 36292:return Ub}}function kb(s,e){s.uniform1fv(this.addr,e)}function Bb(s,e){let t=Ls(e,this.size,2);s.uniform2fv(this.addr,t)}function zb(s,e){let t=Ls(e,this.size,3);s.uniform3fv(this.addr,t)}function Gb(s,e){let t=Ls(e,this.size,4);s.uniform4fv(this.addr,t)}function Vb(s,e){let t=Ls(e,this.size,4);s.uniformMatrix2fv(this.addr,!1,t)}function Hb(s,e){let t=Ls(e,this.size,9);s.uniformMatrix3fv(this.addr,!1,t)}function Wb(s,e){let t=Ls(e,this.size,16);s.uniformMatrix4fv(this.addr,!1,t)}function qb(s,e){s.uniform1iv(this.addr,e)}function Xb(s,e){s.uniform2iv(this.addr,e)}function jb(s,e){s.uniform3iv(this.addr,e)}function Kb(s,e){s.uniform4iv(this.addr,e)}function Jb(s,e){s.uniform1uiv(this.addr,e)}function Yb(s,e){s.uniform2uiv(this.addr,e)}function Zb(s,e){s.uniform3uiv(this.addr,e)}function $b(s,e){s.uniform4uiv(this.addr,e)}function Qb(s,e,t){let n=this.cache,i=e.length,r=Ko(t,i);wt(n,r)||(s.uniform1iv(this.addr,r),Et(n,r));let a;this.type===s.SAMPLER_2D_SHADOW?a=Ll:a=Rd;for(let o=0;o!==i;++o)t.setTexture2D(e[o]||a,r[o])}function e0(s,e,t){let n=this.cache,i=e.length,r=Ko(t,i);wt(n,r)||(s.uniform1iv(this.addr,r),Et(n,r));for(let a=0;a!==i;++a)t.setTexture3D(e[a]||Pd,r[a])}function t0(s,e,t){let n=this.cache,i=e.length,r=Ko(t,i);wt(n,r)||(s.uniform1iv(this.addr,r),Et(n,r));for(let a=0;a!==i;++a)t.setTextureCube(e[a]||Id,r[a])}function n0(s,e,t){let n=this.cache,i=e.length,r=Ko(t,i);wt(n,r)||(s.uniform1iv(this.addr,r),Et(n,r));for(let a=0;a!==i;++a)t.setTexture2DArray(e[a]||Cd,r[a])}function i0(s){switch(s){case 5126:return kb;case 35664:return Bb;case 35665:return zb;case 35666:return Gb;case 35674:return Vb;case 35675:return Hb;case 35676:return Wb;case 5124:case 35670:return qb;case 35667:case 35671:return Xb;case 35668:case 35672:return jb;case 35669:case 35673:return Kb;case 5125:return Jb;case 36294:return Yb;case 36295:return Zb;case 36296:return $b;case 35678:case 36198:case 36298:case 36306:case 35682:return Qb;case 35679:case 36299:case 36307:return e0;case 35680:case 36300:case 36308:case 36293:return t0;case 36289:case 36303:case 36311:case 36292:return n0}}var Dl=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=Ob(t.type)}},Fl=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=i0(t.type)}},Nl=class{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){let i=this.seq;for(let r=0,a=i.length;r!==a;++r){let o=i[r];o.setValue(e,t[o.id],n)}}},Pl=/(\w+)(\])?(\[|\.)?/g;function pd(s,e){s.seq.push(e),s.map[e.id]=e}function s0(s,e,t){let n=s.name,i=n.length;for(Pl.lastIndex=0;;){let r=Pl.exec(n),a=Pl.lastIndex,o=r[1],c=r[2]==="]",l=r[3];if(c&&(o=o|0),l===void 0||l==="["&&a+2===i){pd(t,l===void 0?new Dl(o,s,e):new Fl(o,s,e));break}else{let u=t.map[o];u===void 0&&(u=new Nl(o),pd(t,u)),t=u}}}var Ps=class{constructor(e,t){this.seq=[],this.map={};let n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let a=0;a<n;++a){let o=e.getActiveUniform(t,a),c=e.getUniformLocation(t,o.name);s0(o,c,this)}let i=[],r=[];for(let a of this.seq)a.type===e.SAMPLER_2D_SHADOW||a.type===e.SAMPLER_CUBE_SHADOW||a.type===e.SAMPLER_2D_ARRAY_SHADOW?i.push(a):r.push(a);i.length>0&&(this.seq=i.concat(r))}setValue(e,t,n,i){let r=this.map[t];r!==void 0&&r.setValue(e,n,i)}setOptional(e,t,n){let i=t[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,a=t.length;r!==a;++r){let o=t[r],c=n[o.id];c.needsUpdate!==!1&&o.setValue(e,c.value,i)}}static seqWithValue(e,t){let n=[];for(let i=0,r=e.length;i!==r;++i){let a=e[i];a.id in t&&n.push(a)}return n}};function md(s,e,t){let n=s.createShader(e);return s.shaderSource(n,t),s.compileShader(n),n}var r0=37297,a0=0;function o0(s,e){let t=s.split(`
+ }`,depthTest:!1,depthWrite:!1}),l=new lt(o,c),h=new pi(-1,1,1,-1,0,1),u=null,d=null,f=!1,g,_=null,m=[],p=!1;this.setSize=function(v,S){r.setSize(v,S),a.setSize(v,S);for(let M=0;M<m.length;M++){let E=m[M];E.setSize&&E.setSize(v,S)}},this.setEffects=function(v){m=v,p=m.length>0&&m[0].isRenderPass===!0;let S=r.width,M=r.height;for(let E=0;E<m.length;E++){let T=m[E];T.setSize&&T.setSize(S,M)}},this.begin=function(v,S){if(f||v.toneMapping===xn&&m.length===0)return!1;if(_=S,S!==null){let M=S.width,E=S.height;(r.width!==M||r.height!==E)&&this.setSize(M,E)}return p===!1&&v.setRenderTarget(r),g=v.toneMapping,v.toneMapping=xn,!0},this.hasRenderPass=function(){return p},this.end=function(v,S){v.toneMapping=g,f=!0;let M=r,E=a;for(let T=0;T<m.length;T++){let C=m[T];if(C.enabled!==!1&&(C.render(v,E,M,S),C.needsSwap!==!1)){let x=M;M=E,E=x}}if(u!==v.outputColorSpace||d!==v.toneMapping){u=v.outputColorSpace,d=v.toneMapping,c.defines={},Be.getTransfer(u)===Ye&&(c.defines.SRGB_TRANSFER="");let T=Lb[d];T&&(c.defines[T]=""),c.needsUpdate=!0}c.uniforms.tDiffuse.value=M.texture,v.setRenderTarget(_),v.render(l,h),_=null,f=!1},this.isCompositing=function(){return f},this.dispose=function(){r.depthTexture&&r.depthTexture.dispose(),r.dispose(),a.dispose(),o.dispose(),c.dispose()}}var Gd=new Ct,Gl=new Yn(1,1),Vd=new nr,Hd=new Ba,Wd=new ur,Md=[],Sd=[],Ad=new Float32Array(16),Td=new Float32Array(9),wd=new Float32Array(4);function Ns(s,e,t){let n=s[0];if(n<=0||n>0)return s;let i=e*t,r=Md[i];if(r===void 0&&(r=new Float32Array(i),Md[i]=r),e!==0){n.toArray(r,0);for(let a=1,o=0;a!==e;++a)o+=t,s[a].toArray(r,o)}return r}function wt(s,e){if(s.length!==e.length)return!1;for(let t=0,n=s.length;t<n;t++)if(s[t]!==e[t])return!1;return!0}function Et(s,e){for(let t=0,n=e.length;t<n;t++)s[t]=e[t]}function Qo(s,e){let t=Sd[e];t===void 0&&(t=new Int32Array(e),Sd[e]=t);for(let n=0;n!==e;++n)t[n]=s.allocateTextureUnit();return t}function Fb(s,e){let t=this.cache;t[0]!==e&&(s.uniform1f(this.addr,e),t[0]=e)}function Nb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(wt(t,e))return;s.uniform2fv(this.addr,e),Et(t,e)}}function Ub(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(s.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(wt(t,e))return;s.uniform3fv(this.addr,e),Et(t,e)}}function Ob(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(wt(t,e))return;s.uniform4fv(this.addr,e),Et(t,e)}}function kb(s,e){let t=this.cache,n=e.elements;if(n===void 0){if(wt(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),Et(t,e)}else{if(wt(t,n))return;wd.set(n),s.uniformMatrix2fv(this.addr,!1,wd),Et(t,n)}}function Bb(s,e){let t=this.cache,n=e.elements;if(n===void 0){if(wt(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),Et(t,e)}else{if(wt(t,n))return;Td.set(n),s.uniformMatrix3fv(this.addr,!1,Td),Et(t,n)}}function zb(s,e){let t=this.cache,n=e.elements;if(n===void 0){if(wt(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),Et(t,e)}else{if(wt(t,n))return;Ad.set(n),s.uniformMatrix4fv(this.addr,!1,Ad),Et(t,n)}}function Gb(s,e){let t=this.cache;t[0]!==e&&(s.uniform1i(this.addr,e),t[0]=e)}function Vb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(wt(t,e))return;s.uniform2iv(this.addr,e),Et(t,e)}}function Hb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(wt(t,e))return;s.uniform3iv(this.addr,e),Et(t,e)}}function Wb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(wt(t,e))return;s.uniform4iv(this.addr,e),Et(t,e)}}function qb(s,e){let t=this.cache;t[0]!==e&&(s.uniform1ui(this.addr,e),t[0]=e)}function Xb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(wt(t,e))return;s.uniform2uiv(this.addr,e),Et(t,e)}}function jb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(wt(t,e))return;s.uniform3uiv(this.addr,e),Et(t,e)}}function Kb(s,e){let t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(wt(t,e))return;s.uniform4uiv(this.addr,e),Et(t,e)}}function Yb(s,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i);let r;this.type===s.SAMPLER_2D_SHADOW?(Gl.compareFunction=t.isReversedDepthBuffer()?jo:Xo,r=Gl):r=Gd,t.setTexture2D(e||r,i)}function Jb(s,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture3D(e||Hd,i)}function $b(s,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTextureCube(e||Wd,i)}function Zb(s,e,t){let n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||Vd,i)}function Qb(s){switch(s){case 5126:return Fb;case 35664:return Nb;case 35665:return Ub;case 35666:return Ob;case 35674:return kb;case 35675:return Bb;case 35676:return zb;case 5124:case 35670:return Gb;case 35667:case 35671:return Vb;case 35668:case 35672:return Hb;case 35669:case 35673:return Wb;case 5125:return qb;case 36294:return Xb;case 36295:return jb;case 36296:return Kb;case 35678:case 36198:case 36298:case 36306:case 35682:return Yb;case 35679:case 36299:case 36307:return Jb;case 35680:case 36300:case 36308:case 36293:return $b;case 36289:case 36303:case 36311:case 36292:return Zb}}function e0(s,e){s.uniform1fv(this.addr,e)}function t0(s,e){let t=Ns(e,this.size,2);s.uniform2fv(this.addr,t)}function n0(s,e){let t=Ns(e,this.size,3);s.uniform3fv(this.addr,t)}function i0(s,e){let t=Ns(e,this.size,4);s.uniform4fv(this.addr,t)}function s0(s,e){let t=Ns(e,this.size,4);s.uniformMatrix2fv(this.addr,!1,t)}function r0(s,e){let t=Ns(e,this.size,9);s.uniformMatrix3fv(this.addr,!1,t)}function a0(s,e){let t=Ns(e,this.size,16);s.uniformMatrix4fv(this.addr,!1,t)}function o0(s,e){s.uniform1iv(this.addr,e)}function c0(s,e){s.uniform2iv(this.addr,e)}function l0(s,e){s.uniform3iv(this.addr,e)}function h0(s,e){s.uniform4iv(this.addr,e)}function u0(s,e){s.uniform1uiv(this.addr,e)}function d0(s,e){s.uniform2uiv(this.addr,e)}function f0(s,e){s.uniform3uiv(this.addr,e)}function p0(s,e){s.uniform4uiv(this.addr,e)}function m0(s,e,t){let n=this.cache,i=e.length,r=Qo(t,i);wt(n,r)||(s.uniform1iv(this.addr,r),Et(n,r));let a;this.type===s.SAMPLER_2D_SHADOW?a=Gl:a=Gd;for(let o=0;o!==i;++o)t.setTexture2D(e[o]||a,r[o])}function g0(s,e,t){let n=this.cache,i=e.length,r=Qo(t,i);wt(n,r)||(s.uniform1iv(this.addr,r),Et(n,r));for(let a=0;a!==i;++a)t.setTexture3D(e[a]||Hd,r[a])}function b0(s,e,t){let n=this.cache,i=e.length,r=Qo(t,i);wt(n,r)||(s.uniform1iv(this.addr,r),Et(n,r));for(let a=0;a!==i;++a)t.setTextureCube(e[a]||Wd,r[a])}function x0(s,e,t){let n=this.cache,i=e.length,r=Qo(t,i);wt(n,r)||(s.uniform1iv(this.addr,r),Et(n,r));for(let a=0;a!==i;++a)t.setTexture2DArray(e[a]||Vd,r[a])}function _0(s){switch(s){case 5126:return e0;case 35664:return t0;case 35665:return n0;case 35666:return i0;case 35674:return s0;case 35675:return r0;case 35676:return a0;case 5124:case 35670:return o0;case 35667:case 35671:return c0;case 35668:case 35672:return l0;case 35669:case 35673:return h0;case 5125:return u0;case 36294:return d0;case 36295:return f0;case 36296:return p0;case 35678:case 36198:case 36298:case 36306:case 35682:return m0;case 35679:case 36299:case 36307:return g0;case 35680:case 36300:case 36308:case 36293:return b0;case 36289:case 36303:case 36311:case 36292:return x0}}var Vl=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=Qb(t.type)}},Hl=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=_0(t.type)}},Wl=class{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){let i=this.seq;for(let r=0,a=i.length;r!==a;++r){let o=i[r];o.setValue(e,t[o.id],n)}}},Bl=/(\w+)(\])?(\[|\.)?/g;function Ed(s,e){s.seq.push(e),s.map[e.id]=e}function v0(s,e,t){let n=s.name,i=n.length;for(Bl.lastIndex=0;;){let r=Bl.exec(n),a=Bl.lastIndex,o=r[1],c=r[2]==="]",l=r[3];if(c&&(o=o|0),l===void 0||l==="["&&a+2===i){Ed(t,l===void 0?new Vl(o,s,e):new Hl(o,s,e));break}else{let u=t.map[o];u===void 0&&(u=new Wl(o),Ed(t,u)),t=u}}}var Ds=class{constructor(e,t){this.seq=[],this.map={};let n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let a=0;a<n;++a){let o=e.getActiveUniform(t,a),c=e.getUniformLocation(t,o.name);v0(o,c,this)}let i=[],r=[];for(let a of this.seq)a.type===e.SAMPLER_2D_SHADOW||a.type===e.SAMPLER_CUBE_SHADOW||a.type===e.SAMPLER_2D_ARRAY_SHADOW?i.push(a):r.push(a);i.length>0&&(this.seq=i.concat(r))}setValue(e,t,n,i){let r=this.map[t];r!==void 0&&r.setValue(e,n,i)}setOptional(e,t,n){let i=t[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,a=t.length;r!==a;++r){let o=t[r],c=n[o.id];c.needsUpdate!==!1&&o.setValue(e,c.value,i)}}static seqWithValue(e,t){let n=[];for(let i=0,r=e.length;i!==r;++i){let a=e[i];a.id in t&&n.push(a)}return n}};function Rd(s,e,t){let n=s.createShader(e);return s.shaderSource(n,t),s.compileShader(n),n}var y0=37297,M0=0;function S0(s,e){let t=s.split(`
`),n=[],i=Math.max(e-6,0),r=Math.min(e+6,t.length);for(let a=i;a<r;a++){let o=a+1;n.push(`${o===e?">":" "} ${o}: ${t[a]}`)}return n.join(`
-`)}var gd=new Pe;function c0(s){Be._getMatrix(gd,Be.workingColorSpace,s);let e=`mat3( ${gd.elements.map(t=>t.toFixed(4))} )`;switch(Be.getTransfer(s)){case Zs:return[e,"LinearTransferOETF"];case Je:return[e,"sRGBTransferOETF"];default:return _e("WebGLProgram: Unsupported color space: ",s),[e,"LinearTransferOETF"]}}function bd(s,e,t){let n=s.getShaderParameter(e,s.COMPILE_STATUS),r=(s.getShaderInfoLog(e)||"").trim();if(n&&r==="")return"";let a=/ERROR: 0:(\d+)/.exec(r);if(a){let o=parseInt(a[1]);return t.toUpperCase()+`
+`)}var Cd=new Pe;function A0(s){Be._getMatrix(Cd,Be.workingColorSpace,s);let e=`mat3( ${Cd.elements.map(t=>t.toFixed(4))} )`;switch(Be.getTransfer(s)){case er:return[e,"LinearTransferOETF"];case Ye:return[e,"sRGBTransferOETF"];default:return _e("WebGLProgram: Unsupported color space: ",s),[e,"LinearTransferOETF"]}}function Pd(s,e,t){let n=s.getShaderParameter(e,s.COMPILE_STATUS),r=(s.getShaderInfoLog(e)||"").trim();if(n&&r==="")return"";let a=/ERROR: 0:(\d+)/.exec(r);if(a){let o=parseInt(a[1]);return t.toUpperCase()+`
`+r+`
-`+o0(s.getShaderSource(e),o)}else return r}function l0(s,e){let t=c0(e);return[`vec4 ${s}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(`
-`)}var h0={[tl]:"Linear",[nl]:"Reinhard",[il]:"Cineon",[Sr]:"ACESFilmic",[rl]:"AgX",[al]:"Neutral",[sl]:"Custom"};function u0(s,e){let t=h0[e];return t===void 0?(_e("WebGLProgram: Unsupported toneMapping:",e),"vec3 "+s+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+s+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}var Wo=new F;function d0(){Be.getLuminanceCoefficients(Wo);let s=Wo.x.toFixed(4),e=Wo.y.toFixed(4),t=Wo.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${s}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(`
-`)}function f0(s){return[s.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",s.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Or).join(`
-`)}function p0(s){let e=[];for(let t in s){let n=s[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(`
-`)}function m0(s,e){let t={},n=s.getProgramParameter(e,s.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){let r=s.getActiveAttrib(e,i),a=r.name,o=1;r.type===s.FLOAT_MAT2&&(o=2),r.type===s.FLOAT_MAT3&&(o=3),r.type===s.FLOAT_MAT4&&(o=4),t[a]={type:r.type,location:s.getAttribLocation(e,a),locationSize:o}}return t}function Or(s){return s!==""}function xd(s,e){let t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return s.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function _d(s,e){return s.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}var g0=/^[ \t]*#include +<([\w\d./]+)>/gm;function Ul(s){return s.replace(g0,x0)}var b0=new Map;function x0(s,e){let t=Oe[e];if(t===void 0){let n=b0.get(e);if(n!==void 0)t=Oe[n],_e('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return Ul(t)}var _0=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function vd(s){return s.replace(_0,v0)}function v0(s,e,t,n){let i="";for(let r=parseInt(e);r<parseInt(t);r++)i+=n.replace(/\[\s*i\s*\]/g,"[ "+r+" ]").replace(/UNROLLED_LOOP_INDEX/g,r);return i}function yd(s){let e=`precision ${s.precision} float;
+`+S0(s.getShaderSource(e),o)}else return r}function T0(s,e){let t=A0(e);return[`vec4 ${s}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(`
+`)}var w0={[hl]:"Linear",[ul]:"Reinhard",[dl]:"Cineon",[wr]:"ACESFilmic",[pl]:"AgX",[ml]:"Neutral",[fl]:"Custom"};function E0(s,e){let t=w0[e];return t===void 0?(_e("WebGLProgram: Unsupported toneMapping:",e),"vec3 "+s+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+s+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}var Yo=new F;function R0(){Be.getLuminanceCoefficients(Yo);let s=Yo.x.toFixed(4),e=Yo.y.toFixed(4),t=Yo.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${s}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(`
+`)}function C0(s){return[s.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",s.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(zr).join(`
+`)}function P0(s){let e=[];for(let t in s){let n=s[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(`
+`)}function I0(s,e){let t={},n=s.getProgramParameter(e,s.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){let r=s.getActiveAttrib(e,i),a=r.name,o=1;r.type===s.FLOAT_MAT2&&(o=2),r.type===s.FLOAT_MAT3&&(o=3),r.type===s.FLOAT_MAT4&&(o=4),t[a]={type:r.type,location:s.getAttribLocation(e,a),locationSize:o}}return t}function zr(s){return s!==""}function Id(s,e){let t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return s.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function Ld(s,e){return s.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}var L0=/^[ \t]*#include +<([\w\d./]+)>/gm;function ql(s){return s.replace(L0,F0)}var D0=new Map;function F0(s,e){let t=Oe[e];if(t===void 0){let n=D0.get(e);if(n!==void 0)t=Oe[n],_e('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return ql(t)}var N0=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Dd(s){return s.replace(N0,U0)}function U0(s,e,t,n){let i="";for(let r=parseInt(e);r<parseInt(t);r++)i+=n.replace(/\[\s*i\s*\]/g,"[ "+r+" ]").replace(/UNROLLED_LOOP_INDEX/g,r);return i}function Fd(s){let e=`precision ${s.precision} float;
precision ${s.precision} int;
precision ${s.precision} sampler2D;
precision ${s.precision} samplerCube;
@@ -4030,30 +4030,30 @@ void main() {
`;return s.precision==="highp"?e+=`
#define HIGH_PRECISION`:s.precision==="mediump"?e+=`
#define MEDIUM_PRECISION`:s.precision==="lowp"&&(e+=`
-#define LOW_PRECISION`),e}var y0={[Mr]:"SHADOWMAP_TYPE_PCF",[As]:"SHADOWMAP_TYPE_VSM"};function M0(s){return y0[s.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}var S0={[pi]:"ENVMAP_TYPE_CUBE",[zi]:"ENVMAP_TYPE_CUBE",[Ar]:"ENVMAP_TYPE_CUBE_UV"};function A0(s){return s.envMap===!1?"ENVMAP_TYPE_CUBE":S0[s.envMapMode]||"ENVMAP_TYPE_CUBE"}var T0={[zi]:"ENVMAP_MODE_REFRACTION"};function w0(s){return s.envMap===!1?"ENVMAP_MODE_REFLECTION":T0[s.envMapMode]||"ENVMAP_MODE_REFLECTION"}var E0={[$a]:"ENVMAP_BLENDING_MULTIPLY",[Uu]:"ENVMAP_BLENDING_MIX",[Ou]:"ENVMAP_BLENDING_ADD"};function R0(s){return s.envMap===!1?"ENVMAP_BLENDING_NONE":E0[s.combine]||"ENVMAP_BLENDING_NONE"}function C0(s){let e=s.envMapCubeUVHeight;if(e===null)return null;let t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),112)),texelHeight:n,maxMip:t}}function P0(s,e,t,n){let i=s.getContext(),r=t.defines,a=t.vertexShader,o=t.fragmentShader,c=M0(t),l=A0(t),h=w0(t),u=R0(t),d=C0(t),f=f0(t),g=p0(r),_=i.createProgram(),m,p,v=t.glslVersion?"#version "+t.glslVersion+`
-`:"";t.isRawShaderMaterial?(m=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(Or).join(`
+#define LOW_PRECISION`),e}var O0={[Tr]:"SHADOWMAP_TYPE_PCF",[Es]:"SHADOWMAP_TYPE_VSM"};function k0(s){return O0[s.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}var B0={[gi]:"ENVMAP_TYPE_CUBE",[Vi]:"ENVMAP_TYPE_CUBE",[Er]:"ENVMAP_TYPE_CUBE_UV"};function z0(s){return s.envMap===!1?"ENVMAP_TYPE_CUBE":B0[s.envMapMode]||"ENVMAP_TYPE_CUBE"}var G0={[Vi]:"ENVMAP_MODE_REFRACTION"};function V0(s){return s.envMap===!1?"ENVMAP_MODE_REFLECTION":G0[s.envMapMode]||"ENVMAP_MODE_REFLECTION"}var H0={[io]:"ENVMAP_BLENDING_MULTIPLY",[Yu]:"ENVMAP_BLENDING_MIX",[Ju]:"ENVMAP_BLENDING_ADD"};function W0(s){return s.envMap===!1?"ENVMAP_BLENDING_NONE":H0[s.combine]||"ENVMAP_BLENDING_NONE"}function q0(s){let e=s.envMapCubeUVHeight;if(e===null)return null;let t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),112)),texelHeight:n,maxMip:t}}function X0(s,e,t,n){let i=s.getContext(),r=t.defines,a=t.vertexShader,o=t.fragmentShader,c=k0(t),l=z0(t),h=V0(t),u=W0(t),d=q0(t),f=C0(t),g=P0(r),_=i.createProgram(),m,p,v=t.glslVersion?"#version "+t.glslVersion+`
+`:"";t.isRawShaderMaterial?(m=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(zr).join(`
`),m.length>0&&(m+=`
-`),p=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(Or).join(`
+`),p=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(zr).join(`
`),p.length>0&&(p+=`
-`)):(m=[yd(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexNormals?"#define HAS_NORMAL":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
-`].filter(Or).join(`
-`),p=[yd(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+l:"",t.envMap?"#define "+h:"",t.envMap?"#define "+u:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.packedNormalMap?"#define USE_PACKED_NORMALMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas||t.batchingColor?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.numLightProbeGrids>0?"#define USE_LIGHT_PROBES_GRID":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==bn?"#define TONE_MAPPING":"",t.toneMapping!==bn?Oe.tonemapping_pars_fragment:"",t.toneMapping!==bn?u0("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Oe.colorspace_pars_fragment,l0("linearToOutputTexel",t.outputColorSpace),d0(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
-`].filter(Or).join(`
-`)),a=Ul(a),a=xd(a,t),a=_d(a,t),o=Ul(o),o=xd(o,t),o=_d(o,t),a=vd(a),o=vd(o),t.isRawShaderMaterial!==!0&&(v=`#version 300 es
+`)):(m=[Fd(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexNormals?"#define HAS_NORMAL":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
+`].filter(zr).join(`
+`),p=[Fd(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+l:"",t.envMap?"#define "+h:"",t.envMap?"#define "+u:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.packedNormalMap?"#define USE_PACKED_NORMALMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas||t.batchingColor?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.numLightProbeGrids>0?"#define USE_LIGHT_PROBES_GRID":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==xn?"#define TONE_MAPPING":"",t.toneMapping!==xn?Oe.tonemapping_pars_fragment:"",t.toneMapping!==xn?E0("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Oe.colorspace_pars_fragment,T0("linearToOutputTexel",t.outputColorSpace),R0(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
+`].filter(zr).join(`
+`)),a=ql(a),a=Id(a,t),a=Ld(a,t),o=ql(o),o=Id(o,t),o=Ld(o,t),a=Dd(a),o=Dd(o),t.isRawShaderMaterial!==!0&&(v=`#version 300 es
`,m=[f,"#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
-`+m,p=["#define varying in",t.glslVersion===ml?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===ml?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
+`+m,p=["#define varying in",t.glslVersion===Al?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Al?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
`)+`
-`+p);let S=v+m+a,M=v+p+o,E=md(i,i.VERTEX_SHADER,S),T=md(i,i.FRAGMENT_SHADER,M);i.attachShader(_,E),i.attachShader(_,T),t.index0AttributeName!==void 0?i.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(_,0,"position"),i.linkProgram(_);function C(R){if(s.debug.checkShaderErrors){let O=i.getProgramInfoLog(_)||"",H=i.getShaderInfoLog(E)||"",q=i.getShaderInfoLog(T)||"",N=O.trim(),z=H.trim(),V=q.trim(),$=!0,Q=!0;if(i.getProgramParameter(_,i.LINK_STATUS)===!1)if($=!1,typeof s.debug.onShaderError=="function")s.debug.onShaderError(i,_,E,T);else{let le=bd(i,E,"vertex"),xe=bd(i,T,"fragment");we("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(_,i.VALIDATE_STATUS)+`
+`+p);let S=v+m+a,M=v+p+o,E=Rd(i,i.VERTEX_SHADER,S),T=Rd(i,i.FRAGMENT_SHADER,M);i.attachShader(_,E),i.attachShader(_,T),t.index0AttributeName!==void 0?i.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(_,0,"position"),i.linkProgram(_);function C(R){if(s.debug.checkShaderErrors){let O=i.getProgramInfoLog(_)||"",H=i.getShaderInfoLog(E)||"",q=i.getShaderInfoLog(T)||"",N=O.trim(),z=H.trim(),V=q.trim(),Z=!0,Q=!0;if(i.getProgramParameter(_,i.LINK_STATUS)===!1)if(Z=!1,typeof s.debug.onShaderError=="function")s.debug.onShaderError(i,_,E,T);else{let le=Pd(i,E,"vertex"),xe=Pd(i,T,"fragment");we("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(_,i.VALIDATE_STATUS)+`
Material Name: `+R.name+`
Material Type: `+R.type+`
Program Info Log: `+N+`
`+le+`
-`+xe)}else N!==""?_e("WebGLProgram: Program Info Log:",N):(z===""||V==="")&&(Q=!1);Q&&(R.diagnostics={runnable:$,programLog:N,vertexShader:{log:z,prefix:m},fragmentShader:{log:V,prefix:p}})}i.deleteShader(E),i.deleteShader(T),x=new Ps(i,_),w=m0(i,_)}let x;this.getUniforms=function(){return x===void 0&&C(this),x};let w;this.getAttributes=function(){return w===void 0&&C(this),w};let L=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return L===!1&&(L=i.getProgramParameter(_,r0)),L},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=a0++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=E,this.fragmentShader=T,this}var I0=0,Ol=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(r)===!1&&(a.add(r),r.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return n===void 0&&(n=new kl(e),t.set(e,n)),n}},kl=class{constructor(e){this.id=I0++,this.code=e,this.usedTimes=0}};function L0(s){return s===gi||s===Cr||s===Pr}function D0(s,e,t,n,i,r){let a=new er,o=new Ol,c=new Set,l=[],h=new Map,u=n.logarithmicDepthBuffer,d=n.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function g(x){return c.add(x),x===0?"uv":`uv${x}`}function _(x,w,L,R,O,H){let q=R.fog,N=O.geometry,z=x.isMeshStandardMaterial||x.isMeshLambertMaterial||x.isMeshPhongMaterial?R.environment:null,V=x.isMeshStandardMaterial||x.isMeshLambertMaterial&&!x.envMap||x.isMeshPhongMaterial&&!x.envMap,$=e.get(x.envMap||z,V),Q=$&&$.mapping===Ar?$.image.height:null,le=f[x.type];x.precision!==null&&(d=n.getMaxPrecision(x.precision),d!==x.precision&&_e("WebGLProgram.getParameters:",x.precision,"not supported, using",d,"instead."));let xe=N.morphAttributes.position||N.morphAttributes.normal||N.morphAttributes.color,Se=xe!==void 0?xe.length:0,Xe=0;N.morphAttributes.position!==void 0&&(Xe=1),N.morphAttributes.normal!==void 0&&(Xe=2),N.morphAttributes.color!==void 0&&(Xe=3);let Ze,Fe,J,de;if(le){let Le=Un[le];Ze=Le.vertexShader,Fe=Le.fragmentShader}else Ze=x.vertexShader,Fe=x.fragmentShader,o.update(x),J=o.getVertexShaderID(x),de=o.getFragmentShaderID(x);let ie=s.getRenderTarget(),Ee=s.state.buffers.depth.getReversed(),Ie=O.isInstancedMesh===!0,Re=O.isBatchedMesh===!0,ht=!!x.map,We=!!x.matcap,$e=!!$,ot=!!x.aoMap,Ge=!!x.lightMap,At=!!x.bumpMap,ut=!!x.normalMap,Xt=!!x.displacementMap,I=!!x.emissiveMap,Tt=!!x.metalnessMap,qe=!!x.roughnessMap,rt=x.anisotropy>0,oe=x.clearcoat>0,dt=x.dispersion>0,A=x.iridescence>0,b=x.sheen>0,U=x.transmission>0,j=rt&&!!x.anisotropyMap,Z=oe&&!!x.clearcoatMap,ee=oe&&!!x.clearcoatNormalMap,ae=oe&&!!x.clearcoatRoughnessMap,W=A&&!!x.iridescenceMap,K=A&&!!x.iridescenceThicknessMap,fe=b&&!!x.sheenColorMap,ge=b&&!!x.sheenRoughnessMap,se=!!x.specularMap,te=!!x.specularColorMap,Ce=!!x.specularIntensityMap,Ne=U&&!!x.transmissionMap,Ke=U&&!!x.thicknessMap,P=!!x.gradientMap,ne=!!x.alphaMap,X=x.alphaTest>0,pe=!!x.alphaHash,re=!!x.extensions,Y=bn;x.toneMapped&&(ie===null||ie.isXRRenderTarget===!0)&&(Y=s.toneMapping);let ye={shaderID:le,shaderType:x.type,shaderName:x.name,vertexShader:Ze,fragmentShader:Fe,defines:x.defines,customVertexShaderID:J,customFragmentShaderID:de,isRawShaderMaterial:x.isRawShaderMaterial===!0,glslVersion:x.glslVersion,precision:d,batching:Re,batchingColor:Re&&O._colorsTexture!==null,instancing:Ie,instancingColor:Ie&&O.instanceColor!==null,instancingMorph:Ie&&O.morphTexture!==null,outputColorSpace:ie===null?s.outputColorSpace:ie.isXRRenderTarget===!0?ie.texture.colorSpace:Be.workingColorSpace,alphaToCoverage:!!x.alphaToCoverage,map:ht,matcap:We,envMap:$e,envMapMode:$e&&$.mapping,envMapCubeUVHeight:Q,aoMap:ot,lightMap:Ge,bumpMap:At,normalMap:ut,displacementMap:Xt,emissiveMap:I,normalMapObjectSpace:ut&&x.normalMapType===Hu,normalMapTangentSpace:ut&&x.normalMapType===Dr,packedNormalMap:ut&&x.normalMapType===Dr&&L0(x.normalMap.format),metalnessMap:Tt,roughnessMap:qe,anisotropy:rt,anisotropyMap:j,clearcoat:oe,clearcoatMap:Z,clearcoatNormalMap:ee,clearcoatRoughnessMap:ae,dispersion:dt,iridescence:A,iridescenceMap:W,iridescenceThicknessMap:K,sheen:b,sheenColorMap:fe,sheenRoughnessMap:ge,specularMap:se,specularColorMap:te,specularIntensityMap:Ce,transmission:U,transmissionMap:Ne,thicknessMap:Ke,gradientMap:P,opaque:x.transparent===!1&&x.blending===Ri&&x.alphaToCoverage===!1,alphaMap:ne,alphaTest:X,alphaHash:pe,combine:x.combine,mapUv:ht&&g(x.map.channel),aoMapUv:ot&&g(x.aoMap.channel),lightMapUv:Ge&&g(x.lightMap.channel),bumpMapUv:At&&g(x.bumpMap.channel),normalMapUv:ut&&g(x.normalMap.channel),displacementMapUv:Xt&&g(x.displacementMap.channel),emissiveMapUv:I&&g(x.emissiveMap.channel),metalnessMapUv:Tt&&g(x.metalnessMap.channel),roughnessMapUv:qe&&g(x.roughnessMap.channel),anisotropyMapUv:j&&g(x.anisotropyMap.channel),clearcoatMapUv:Z&&g(x.clearcoatMap.channel),clearcoatNormalMapUv:ee&&g(x.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ae&&g(x.clearcoatRoughnessMap.channel),iridescenceMapUv:W&&g(x.iridescenceMap.channel),iridescenceThicknessMapUv:K&&g(x.iridescenceThicknessMap.channel),sheenColorMapUv:fe&&g(x.sheenColorMap.channel),sheenRoughnessMapUv:ge&&g(x.sheenRoughnessMap.channel),specularMapUv:se&&g(x.specularMap.channel),specularColorMapUv:te&&g(x.specularColorMap.channel),specularIntensityMapUv:Ce&&g(x.specularIntensityMap.channel),transmissionMapUv:Ne&&g(x.transmissionMap.channel),thicknessMapUv:Ke&&g(x.thicknessMap.channel),alphaMapUv:ne&&g(x.alphaMap.channel),vertexTangents:!!N.attributes.tangent&&(ut||rt),vertexNormals:!!N.attributes.normal,vertexColors:x.vertexColors,vertexAlphas:x.vertexColors===!0&&!!N.attributes.color&&N.attributes.color.itemSize===4,pointsUvs:O.isPoints===!0&&!!N.attributes.uv&&(ht||ne),fog:!!q,useFog:x.fog===!0,fogExp2:!!q&&q.isFogExp2,flatShading:x.wireframe===!1&&(x.flatShading===!0||N.attributes.normal===void 0&&ut===!1&&(x.isMeshLambertMaterial||x.isMeshPhongMaterial||x.isMeshStandardMaterial||x.isMeshPhysicalMaterial)),sizeAttenuation:x.sizeAttenuation===!0,logarithmicDepthBuffer:u,reversedDepthBuffer:Ee,skinning:O.isSkinnedMesh===!0,morphTargets:N.morphAttributes.position!==void 0,morphNormals:N.morphAttributes.normal!==void 0,morphColors:N.morphAttributes.color!==void 0,morphTargetsCount:Se,morphTextureStride:Xe,numDirLights:w.directional.length,numPointLights:w.point.length,numSpotLights:w.spot.length,numSpotLightMaps:w.spotLightMap.length,numRectAreaLights:w.rectArea.length,numHemiLights:w.hemi.length,numDirLightShadows:w.directionalShadowMap.length,numPointLightShadows:w.pointShadowMap.length,numSpotLightShadows:w.spotShadowMap.length,numSpotLightShadowsWithMaps:w.numSpotLightShadowsWithMaps,numLightProbes:w.numLightProbes,numLightProbeGrids:H.length,numClippingPlanes:r.numPlanes,numClipIntersection:r.numIntersection,dithering:x.dithering,shadowMapEnabled:s.shadowMap.enabled&&L.length>0,shadowMapType:s.shadowMap.type,toneMapping:Y,decodeVideoTexture:ht&&x.map.isVideoTexture===!0&&Be.getTransfer(x.map.colorSpace)===Je,decodeVideoTextureEmissive:I&&x.emissiveMap.isVideoTexture===!0&&Be.getTransfer(x.emissiveMap.colorSpace)===Je,premultipliedAlpha:x.premultipliedAlpha,doubleSided:x.side===sn,flipSided:x.side===Pt,useDepthPacking:x.depthPacking>=0,depthPacking:x.depthPacking||0,index0AttributeName:x.index0AttributeName,extensionClipCullDistance:re&&x.extensions.clipCullDistance===!0&&t.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(re&&x.extensions.multiDraw===!0||Re)&&t.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:t.has("KHR_parallel_shader_compile"),customProgramCacheKey:x.customProgramCacheKey()};return ye.vertexUv1s=c.has(1),ye.vertexUv2s=c.has(2),ye.vertexUv3s=c.has(3),c.clear(),ye}function m(x){let w=[];if(x.shaderID?w.push(x.shaderID):(w.push(x.customVertexShaderID),w.push(x.customFragmentShaderID)),x.defines!==void 0)for(let L in x.defines)w.push(L),w.push(x.defines[L]);return x.isRawShaderMaterial===!1&&(p(w,x),v(w,x),w.push(s.outputColorSpace)),w.push(x.customProgramCacheKey),w.join()}function p(x,w){x.push(w.precision),x.push(w.outputColorSpace),x.push(w.envMapMode),x.push(w.envMapCubeUVHeight),x.push(w.mapUv),x.push(w.alphaMapUv),x.push(w.lightMapUv),x.push(w.aoMapUv),x.push(w.bumpMapUv),x.push(w.normalMapUv),x.push(w.displacementMapUv),x.push(w.emissiveMapUv),x.push(w.metalnessMapUv),x.push(w.roughnessMapUv),x.push(w.anisotropyMapUv),x.push(w.clearcoatMapUv),x.push(w.clearcoatNormalMapUv),x.push(w.clearcoatRoughnessMapUv),x.push(w.iridescenceMapUv),x.push(w.iridescenceThicknessMapUv),x.push(w.sheenColorMapUv),x.push(w.sheenRoughnessMapUv),x.push(w.specularMapUv),x.push(w.specularColorMapUv),x.push(w.specularIntensityMapUv),x.push(w.transmissionMapUv),x.push(w.thicknessMapUv),x.push(w.combine),x.push(w.fogExp2),x.push(w.sizeAttenuation),x.push(w.morphTargetsCount),x.push(w.morphAttributeCount),x.push(w.numDirLights),x.push(w.numPointLights),x.push(w.numSpotLights),x.push(w.numSpotLightMaps),x.push(w.numHemiLights),x.push(w.numRectAreaLights),x.push(w.numDirLightShadows),x.push(w.numPointLightShadows),x.push(w.numSpotLightShadows),x.push(w.numSpotLightShadowsWithMaps),x.push(w.numLightProbes),x.push(w.shadowMapType),x.push(w.toneMapping),x.push(w.numClippingPlanes),x.push(w.numClipIntersection),x.push(w.depthPacking)}function v(x,w){a.disableAll(),w.instancing&&a.enable(0),w.instancingColor&&a.enable(1),w.instancingMorph&&a.enable(2),w.matcap&&a.enable(3),w.envMap&&a.enable(4),w.normalMapObjectSpace&&a.enable(5),w.normalMapTangentSpace&&a.enable(6),w.clearcoat&&a.enable(7),w.iridescence&&a.enable(8),w.alphaTest&&a.enable(9),w.vertexColors&&a.enable(10),w.vertexAlphas&&a.enable(11),w.vertexUv1s&&a.enable(12),w.vertexUv2s&&a.enable(13),w.vertexUv3s&&a.enable(14),w.vertexTangents&&a.enable(15),w.anisotropy&&a.enable(16),w.alphaHash&&a.enable(17),w.batching&&a.enable(18),w.dispersion&&a.enable(19),w.batchingColor&&a.enable(20),w.gradientMap&&a.enable(21),w.packedNormalMap&&a.enable(22),w.vertexNormals&&a.enable(23),x.push(a.mask),a.disableAll(),w.fog&&a.enable(0),w.useFog&&a.enable(1),w.flatShading&&a.enable(2),w.logarithmicDepthBuffer&&a.enable(3),w.reversedDepthBuffer&&a.enable(4),w.skinning&&a.enable(5),w.morphTargets&&a.enable(6),w.morphNormals&&a.enable(7),w.morphColors&&a.enable(8),w.premultipliedAlpha&&a.enable(9),w.shadowMapEnabled&&a.enable(10),w.doubleSided&&a.enable(11),w.flipSided&&a.enable(12),w.useDepthPacking&&a.enable(13),w.dithering&&a.enable(14),w.transmission&&a.enable(15),w.sheen&&a.enable(16),w.opaque&&a.enable(17),w.pointsUvs&&a.enable(18),w.decodeVideoTexture&&a.enable(19),w.decodeVideoTextureEmissive&&a.enable(20),w.alphaToCoverage&&a.enable(21),w.numLightProbeGrids>0&&a.enable(22),x.push(a.mask)}function S(x){let w=f[x.type],L;if(w){let R=Un[w];L=td.clone(R.uniforms)}else L=x.uniforms;return L}function M(x,w){let L=h.get(w);return L!==void 0?++L.usedTimes:(L=new P0(s,w,x,i),l.push(L),h.set(w,L)),L}function E(x){if(--x.usedTimes===0){let w=l.indexOf(x);l[w]=l[l.length-1],l.pop(),h.delete(x.cacheKey),x.destroy()}}function T(x){o.remove(x)}function C(){o.dispose()}return{getParameters:_,getProgramCacheKey:m,getUniforms:S,acquireProgram:M,releaseProgram:E,releaseShaderCache:T,programs:l,dispose:C}}function F0(){let s=new WeakMap;function e(a){return s.has(a)}function t(a){let o=s.get(a);return o===void 0&&(o={},s.set(a,o)),o}function n(a){s.delete(a)}function i(a,o,c){s.get(a)[o]=c}function r(){s=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:r}}function N0(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.material.id!==e.material.id?s.material.id-e.material.id:s.materialVariant!==e.materialVariant?s.materialVariant-e.materialVariant:s.z!==e.z?s.z-e.z:s.id-e.id}function Md(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.z!==e.z?e.z-s.z:s.id-e.id}function Sd(){let s=[],e=0,t=[],n=[],i=[];function r(){e=0,t.length=0,n.length=0,i.length=0}function a(d){let f=0;return d.isInstancedMesh&&(f+=2),d.isSkinnedMesh&&(f+=1),f}function o(d,f,g,_,m,p){let v=s[e];return v===void 0?(v={id:d.id,object:d,geometry:f,material:g,materialVariant:a(d),groupOrder:_,renderOrder:d.renderOrder,z:m,group:p},s[e]=v):(v.id=d.id,v.object=d,v.geometry=f,v.material=g,v.materialVariant=a(d),v.groupOrder=_,v.renderOrder=d.renderOrder,v.z=m,v.group=p),e++,v}function c(d,f,g,_,m,p){let v=o(d,f,g,_,m,p);g.transmission>0?n.push(v):g.transparent===!0?i.push(v):t.push(v)}function l(d,f,g,_,m,p){let v=o(d,f,g,_,m,p);g.transmission>0?n.unshift(v):g.transparent===!0?i.unshift(v):t.unshift(v)}function h(d,f){t.length>1&&t.sort(d||N0),n.length>1&&n.sort(f||Md),i.length>1&&i.sort(f||Md)}function u(){for(let d=e,f=s.length;d<f;d++){let g=s[d];if(g.id===null)break;g.id=null,g.object=null,g.geometry=null,g.material=null,g.group=null}}return{opaque:t,transmissive:n,transparent:i,init:r,push:c,unshift:l,finish:u,sort:h}}function U0(){let s=new WeakMap;function e(n,i){let r=s.get(n),a;return r===void 0?(a=new Sd,s.set(n,[a])):i>=r.length?(a=new Sd,r.push(a)):a=r[i],a}function t(){s=new WeakMap}return{get:e,dispose:t}}function O0(){let s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new F,color:new Te};break;case"SpotLight":t={position:new F,direction:new F,color:new Te,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new F,color:new Te,distance:0,decay:0};break;case"HemisphereLight":t={direction:new F,skyColor:new Te,groundColor:new Te};break;case"RectAreaLight":t={color:new Te,position:new F,halfWidth:new F,halfHeight:new F};break}return s[e.id]=t,t}}}function k0(){let s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new He};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new He};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new He,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}var B0=0;function z0(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function G0(s){let e=new O0,t=k0(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let l=0;l<9;l++)n.probe.push(new F);let i=new F,r=new Ue,a=new Ue;function o(l){let h=0,u=0,d=0;for(let w=0;w<9;w++)n.probe[w].set(0,0,0);let f=0,g=0,_=0,m=0,p=0,v=0,S=0,M=0,E=0,T=0,C=0;l.sort(z0);for(let w=0,L=l.length;w<L;w++){let R=l[w],O=R.color,H=R.intensity,q=R.distance,N=null;if(R.shadow&&R.shadow.map&&(R.shadow.map.texture.format===gi?N=R.shadow.map.texture:N=R.shadow.map.depthTexture||R.shadow.map.texture),R.isAmbientLight)h+=O.r*H,u+=O.g*H,d+=O.b*H;else if(R.isLightProbe){for(let z=0;z<9;z++)n.probe[z].addScaledVector(R.sh.coefficients[z],H);C++}else if(R.isDirectionalLight){let z=e.get(R);if(z.color.copy(R.color).multiplyScalar(R.intensity),R.castShadow){let V=R.shadow,$=t.get(R);$.shadowIntensity=V.intensity,$.shadowBias=V.bias,$.shadowNormalBias=V.normalBias,$.shadowRadius=V.radius,$.shadowMapSize=V.mapSize,n.directionalShadow[f]=$,n.directionalShadowMap[f]=N,n.directionalShadowMatrix[f]=R.shadow.matrix,v++}n.directional[f]=z,f++}else if(R.isSpotLight){let z=e.get(R);z.position.setFromMatrixPosition(R.matrixWorld),z.color.copy(O).multiplyScalar(H),z.distance=q,z.coneCos=Math.cos(R.angle),z.penumbraCos=Math.cos(R.angle*(1-R.penumbra)),z.decay=R.decay,n.spot[_]=z;let V=R.shadow;if(R.map&&(n.spotLightMap[E]=R.map,E++,V.updateMatrices(R),R.castShadow&&T++),n.spotLightMatrix[_]=V.matrix,R.castShadow){let $=t.get(R);$.shadowIntensity=V.intensity,$.shadowBias=V.bias,$.shadowNormalBias=V.normalBias,$.shadowRadius=V.radius,$.shadowMapSize=V.mapSize,n.spotShadow[_]=$,n.spotShadowMap[_]=N,M++}_++}else if(R.isRectAreaLight){let z=e.get(R);z.color.copy(O).multiplyScalar(H),z.halfWidth.set(R.width*.5,0,0),z.halfHeight.set(0,R.height*.5,0),n.rectArea[m]=z,m++}else if(R.isPointLight){let z=e.get(R);if(z.color.copy(R.color).multiplyScalar(R.intensity),z.distance=R.distance,z.decay=R.decay,R.castShadow){let V=R.shadow,$=t.get(R);$.shadowIntensity=V.intensity,$.shadowBias=V.bias,$.shadowNormalBias=V.normalBias,$.shadowRadius=V.radius,$.shadowMapSize=V.mapSize,$.shadowCameraNear=V.camera.near,$.shadowCameraFar=V.camera.far,n.pointShadow[g]=$,n.pointShadowMap[g]=N,n.pointShadowMatrix[g]=R.shadow.matrix,S++}n.point[g]=z,g++}else if(R.isHemisphereLight){let z=e.get(R);z.skyColor.copy(R.color).multiplyScalar(H),z.groundColor.copy(R.groundColor).multiplyScalar(H),n.hemi[p]=z,p++}}m>0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=ce.LTC_FLOAT_1,n.rectAreaLTC2=ce.LTC_FLOAT_2):(n.rectAreaLTC1=ce.LTC_HALF_1,n.rectAreaLTC2=ce.LTC_HALF_2)),n.ambient[0]=h,n.ambient[1]=u,n.ambient[2]=d;let x=n.hash;(x.directionalLength!==f||x.pointLength!==g||x.spotLength!==_||x.rectAreaLength!==m||x.hemiLength!==p||x.numDirectionalShadows!==v||x.numPointShadows!==S||x.numSpotShadows!==M||x.numSpotMaps!==E||x.numLightProbes!==C)&&(n.directional.length=f,n.spot.length=_,n.rectArea.length=m,n.point.length=g,n.hemi.length=p,n.directionalShadow.length=v,n.directionalShadowMap.length=v,n.pointShadow.length=S,n.pointShadowMap.length=S,n.spotShadow.length=M,n.spotShadowMap.length=M,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=S,n.spotLightMatrix.length=M+E-T,n.spotLightMap.length=E,n.numSpotLightShadowsWithMaps=T,n.numLightProbes=C,x.directionalLength=f,x.pointLength=g,x.spotLength=_,x.rectAreaLength=m,x.hemiLength=p,x.numDirectionalShadows=v,x.numPointShadows=S,x.numSpotShadows=M,x.numSpotMaps=E,x.numLightProbes=C,n.version=B0++)}function c(l,h){let u=0,d=0,f=0,g=0,_=0,m=h.matrixWorldInverse;for(let p=0,v=l.length;p<v;p++){let S=l[p];if(S.isDirectionalLight){let M=n.directional[u];M.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(m),u++}else if(S.isSpotLight){let M=n.spot[f];M.position.setFromMatrixPosition(S.matrixWorld),M.position.applyMatrix4(m),M.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(m),f++}else if(S.isRectAreaLight){let M=n.rectArea[g];M.position.setFromMatrixPosition(S.matrixWorld),M.position.applyMatrix4(m),a.identity(),r.copy(S.matrixWorld),r.premultiply(m),a.extractRotation(r),M.halfWidth.set(S.width*.5,0,0),M.halfHeight.set(0,S.height*.5,0),M.halfWidth.applyMatrix4(a),M.halfHeight.applyMatrix4(a),g++}else if(S.isPointLight){let M=n.point[d];M.position.setFromMatrixPosition(S.matrixWorld),M.position.applyMatrix4(m),d++}else if(S.isHemisphereLight){let M=n.hemi[_];M.direction.setFromMatrixPosition(S.matrixWorld),M.direction.transformDirection(m),_++}}}return{setup:o,setupView:c,state:n}}function Ad(s){let e=new G0(s),t=[],n=[],i=[];function r(d){u.camera=d,t.length=0,n.length=0,i.length=0}function a(d){t.push(d)}function o(d){n.push(d)}function c(d){i.push(d)}function l(){e.setup(t)}function h(d){e.setupView(t,d)}let u={lightsArray:t,shadowsArray:n,lightProbeGridArray:i,camera:null,lights:e,transmissionRenderTarget:{},textureUnits:0};return{init:r,state:u,setupLights:l,setupLightsView:h,pushLight:a,pushShadow:o,pushLightProbeGrid:c}}function V0(s){let e=new WeakMap;function t(i,r=0){let a=e.get(i),o;return a===void 0?(o=new Ad(s),e.set(i,[o])):r>=a.length?(o=new Ad(s),a.push(o)):o=a[r],o}function n(){e=new WeakMap}return{get:t,dispose:n}}var H0=`void main() {
+`+xe)}else N!==""?_e("WebGLProgram: Program Info Log:",N):(z===""||V==="")&&(Q=!1);Q&&(R.diagnostics={runnable:Z,programLog:N,vertexShader:{log:z,prefix:m},fragmentShader:{log:V,prefix:p}})}i.deleteShader(E),i.deleteShader(T),x=new Ds(i,_),w=I0(i,_)}let x;this.getUniforms=function(){return x===void 0&&C(this),x};let w;this.getAttributes=function(){return w===void 0&&C(this),w};let L=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return L===!1&&(L=i.getProgramParameter(_,y0)),L},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=M0++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=E,this.fragmentShader=T,this}var j0=0,Xl=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(r)===!1&&(a.add(r),r.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return n===void 0&&(n=new jl(e),t.set(e,n)),n}},jl=class{constructor(e){this.id=j0++,this.code=e,this.usedTimes=0}};function K0(s){return s===xi||s===Lr||s===Dr}function Y0(s,e,t,n,i,r){let a=new ir,o=new Xl,c=new Set,l=[],h=new Map,u=n.logarithmicDepthBuffer,d=n.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function g(x){return c.add(x),x===0?"uv":`uv${x}`}function _(x,w,L,R,O,H){let q=R.fog,N=O.geometry,z=x.isMeshStandardMaterial||x.isMeshLambertMaterial||x.isMeshPhongMaterial?R.environment:null,V=x.isMeshStandardMaterial||x.isMeshLambertMaterial&&!x.envMap||x.isMeshPhongMaterial&&!x.envMap,Z=e.get(x.envMap||z,V),Q=Z&&Z.mapping===Er?Z.image.height:null,le=f[x.type];x.precision!==null&&(d=n.getMaxPrecision(x.precision),d!==x.precision&&_e("WebGLProgram.getParameters:",x.precision,"not supported, using",d,"instead."));let xe=N.morphAttributes.position||N.morphAttributes.normal||N.morphAttributes.color,Se=xe!==void 0?xe.length:0,Xe=0;N.morphAttributes.position!==void 0&&(Xe=1),N.morphAttributes.normal!==void 0&&(Xe=2),N.morphAttributes.color!==void 0&&(Xe=3);let $e,Fe,Y,de;if(le){let Le=kn[le];$e=Le.vertexShader,Fe=Le.fragmentShader}else $e=x.vertexShader,Fe=x.fragmentShader,o.update(x),Y=o.getVertexShaderID(x),de=o.getFragmentShaderID(x);let ie=s.getRenderTarget(),Ee=s.state.buffers.depth.getReversed(),Ie=O.isInstancedMesh===!0,Re=O.isBatchedMesh===!0,ht=!!x.map,We=!!x.matcap,Ze=!!Z,ot=!!x.aoMap,Ge=!!x.lightMap,At=!!x.bumpMap,ut=!!x.normalMap,Xt=!!x.displacementMap,I=!!x.emissiveMap,Tt=!!x.metalnessMap,qe=!!x.roughnessMap,rt=x.anisotropy>0,oe=x.clearcoat>0,dt=x.dispersion>0,A=x.iridescence>0,b=x.sheen>0,U=x.transmission>0,j=rt&&!!x.anisotropyMap,$=oe&&!!x.clearcoatMap,ee=oe&&!!x.clearcoatNormalMap,ae=oe&&!!x.clearcoatRoughnessMap,W=A&&!!x.iridescenceMap,K=A&&!!x.iridescenceThicknessMap,fe=b&&!!x.sheenColorMap,ge=b&&!!x.sheenRoughnessMap,se=!!x.specularMap,te=!!x.specularColorMap,Ce=!!x.specularIntensityMap,Ne=U&&!!x.transmissionMap,Ke=U&&!!x.thicknessMap,P=!!x.gradientMap,ne=!!x.alphaMap,X=x.alphaTest>0,pe=!!x.alphaHash,re=!!x.extensions,J=xn;x.toneMapped&&(ie===null||ie.isXRRenderTarget===!0)&&(J=s.toneMapping);let ye={shaderID:le,shaderType:x.type,shaderName:x.name,vertexShader:$e,fragmentShader:Fe,defines:x.defines,customVertexShaderID:Y,customFragmentShaderID:de,isRawShaderMaterial:x.isRawShaderMaterial===!0,glslVersion:x.glslVersion,precision:d,batching:Re,batchingColor:Re&&O._colorsTexture!==null,instancing:Ie,instancingColor:Ie&&O.instanceColor!==null,instancingMorph:Ie&&O.morphTexture!==null,outputColorSpace:ie===null?s.outputColorSpace:ie.isXRRenderTarget===!0?ie.texture.colorSpace:Be.workingColorSpace,alphaToCoverage:!!x.alphaToCoverage,map:ht,matcap:We,envMap:Ze,envMapMode:Ze&&Z.mapping,envMapCubeUVHeight:Q,aoMap:ot,lightMap:Ge,bumpMap:At,normalMap:ut,displacementMap:Xt,emissiveMap:I,normalMapObjectSpace:ut&&x.normalMapType===nd,normalMapTangentSpace:ut&&x.normalMapType===Ur,packedNormalMap:ut&&x.normalMapType===Ur&&K0(x.normalMap.format),metalnessMap:Tt,roughnessMap:qe,anisotropy:rt,anisotropyMap:j,clearcoat:oe,clearcoatMap:$,clearcoatNormalMap:ee,clearcoatRoughnessMap:ae,dispersion:dt,iridescence:A,iridescenceMap:W,iridescenceThicknessMap:K,sheen:b,sheenColorMap:fe,sheenRoughnessMap:ge,specularMap:se,specularColorMap:te,specularIntensityMap:Ce,transmission:U,transmissionMap:Ne,thicknessMap:Ke,gradientMap:P,opaque:x.transparent===!1&&x.blending===Pi&&x.alphaToCoverage===!1,alphaMap:ne,alphaTest:X,alphaHash:pe,combine:x.combine,mapUv:ht&&g(x.map.channel),aoMapUv:ot&&g(x.aoMap.channel),lightMapUv:Ge&&g(x.lightMap.channel),bumpMapUv:At&&g(x.bumpMap.channel),normalMapUv:ut&&g(x.normalMap.channel),displacementMapUv:Xt&&g(x.displacementMap.channel),emissiveMapUv:I&&g(x.emissiveMap.channel),metalnessMapUv:Tt&&g(x.metalnessMap.channel),roughnessMapUv:qe&&g(x.roughnessMap.channel),anisotropyMapUv:j&&g(x.anisotropyMap.channel),clearcoatMapUv:$&&g(x.clearcoatMap.channel),clearcoatNormalMapUv:ee&&g(x.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ae&&g(x.clearcoatRoughnessMap.channel),iridescenceMapUv:W&&g(x.iridescenceMap.channel),iridescenceThicknessMapUv:K&&g(x.iridescenceThicknessMap.channel),sheenColorMapUv:fe&&g(x.sheenColorMap.channel),sheenRoughnessMapUv:ge&&g(x.sheenRoughnessMap.channel),specularMapUv:se&&g(x.specularMap.channel),specularColorMapUv:te&&g(x.specularColorMap.channel),specularIntensityMapUv:Ce&&g(x.specularIntensityMap.channel),transmissionMapUv:Ne&&g(x.transmissionMap.channel),thicknessMapUv:Ke&&g(x.thicknessMap.channel),alphaMapUv:ne&&g(x.alphaMap.channel),vertexTangents:!!N.attributes.tangent&&(ut||rt),vertexNormals:!!N.attributes.normal,vertexColors:x.vertexColors,vertexAlphas:x.vertexColors===!0&&!!N.attributes.color&&N.attributes.color.itemSize===4,pointsUvs:O.isPoints===!0&&!!N.attributes.uv&&(ht||ne),fog:!!q,useFog:x.fog===!0,fogExp2:!!q&&q.isFogExp2,flatShading:x.wireframe===!1&&(x.flatShading===!0||N.attributes.normal===void 0&&ut===!1&&(x.isMeshLambertMaterial||x.isMeshPhongMaterial||x.isMeshStandardMaterial||x.isMeshPhysicalMaterial)),sizeAttenuation:x.sizeAttenuation===!0,logarithmicDepthBuffer:u,reversedDepthBuffer:Ee,skinning:O.isSkinnedMesh===!0,morphTargets:N.morphAttributes.position!==void 0,morphNormals:N.morphAttributes.normal!==void 0,morphColors:N.morphAttributes.color!==void 0,morphTargetsCount:Se,morphTextureStride:Xe,numDirLights:w.directional.length,numPointLights:w.point.length,numSpotLights:w.spot.length,numSpotLightMaps:w.spotLightMap.length,numRectAreaLights:w.rectArea.length,numHemiLights:w.hemi.length,numDirLightShadows:w.directionalShadowMap.length,numPointLightShadows:w.pointShadowMap.length,numSpotLightShadows:w.spotShadowMap.length,numSpotLightShadowsWithMaps:w.numSpotLightShadowsWithMaps,numLightProbes:w.numLightProbes,numLightProbeGrids:H.length,numClippingPlanes:r.numPlanes,numClipIntersection:r.numIntersection,dithering:x.dithering,shadowMapEnabled:s.shadowMap.enabled&&L.length>0,shadowMapType:s.shadowMap.type,toneMapping:J,decodeVideoTexture:ht&&x.map.isVideoTexture===!0&&Be.getTransfer(x.map.colorSpace)===Ye,decodeVideoTextureEmissive:I&&x.emissiveMap.isVideoTexture===!0&&Be.getTransfer(x.emissiveMap.colorSpace)===Ye,premultipliedAlpha:x.premultipliedAlpha,doubleSided:x.side===rn,flipSided:x.side===Pt,useDepthPacking:x.depthPacking>=0,depthPacking:x.depthPacking||0,index0AttributeName:x.index0AttributeName,extensionClipCullDistance:re&&x.extensions.clipCullDistance===!0&&t.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(re&&x.extensions.multiDraw===!0||Re)&&t.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:t.has("KHR_parallel_shader_compile"),customProgramCacheKey:x.customProgramCacheKey()};return ye.vertexUv1s=c.has(1),ye.vertexUv2s=c.has(2),ye.vertexUv3s=c.has(3),c.clear(),ye}function m(x){let w=[];if(x.shaderID?w.push(x.shaderID):(w.push(x.customVertexShaderID),w.push(x.customFragmentShaderID)),x.defines!==void 0)for(let L in x.defines)w.push(L),w.push(x.defines[L]);return x.isRawShaderMaterial===!1&&(p(w,x),v(w,x),w.push(s.outputColorSpace)),w.push(x.customProgramCacheKey),w.join()}function p(x,w){x.push(w.precision),x.push(w.outputColorSpace),x.push(w.envMapMode),x.push(w.envMapCubeUVHeight),x.push(w.mapUv),x.push(w.alphaMapUv),x.push(w.lightMapUv),x.push(w.aoMapUv),x.push(w.bumpMapUv),x.push(w.normalMapUv),x.push(w.displacementMapUv),x.push(w.emissiveMapUv),x.push(w.metalnessMapUv),x.push(w.roughnessMapUv),x.push(w.anisotropyMapUv),x.push(w.clearcoatMapUv),x.push(w.clearcoatNormalMapUv),x.push(w.clearcoatRoughnessMapUv),x.push(w.iridescenceMapUv),x.push(w.iridescenceThicknessMapUv),x.push(w.sheenColorMapUv),x.push(w.sheenRoughnessMapUv),x.push(w.specularMapUv),x.push(w.specularColorMapUv),x.push(w.specularIntensityMapUv),x.push(w.transmissionMapUv),x.push(w.thicknessMapUv),x.push(w.combine),x.push(w.fogExp2),x.push(w.sizeAttenuation),x.push(w.morphTargetsCount),x.push(w.morphAttributeCount),x.push(w.numDirLights),x.push(w.numPointLights),x.push(w.numSpotLights),x.push(w.numSpotLightMaps),x.push(w.numHemiLights),x.push(w.numRectAreaLights),x.push(w.numDirLightShadows),x.push(w.numPointLightShadows),x.push(w.numSpotLightShadows),x.push(w.numSpotLightShadowsWithMaps),x.push(w.numLightProbes),x.push(w.shadowMapType),x.push(w.toneMapping),x.push(w.numClippingPlanes),x.push(w.numClipIntersection),x.push(w.depthPacking)}function v(x,w){a.disableAll(),w.instancing&&a.enable(0),w.instancingColor&&a.enable(1),w.instancingMorph&&a.enable(2),w.matcap&&a.enable(3),w.envMap&&a.enable(4),w.normalMapObjectSpace&&a.enable(5),w.normalMapTangentSpace&&a.enable(6),w.clearcoat&&a.enable(7),w.iridescence&&a.enable(8),w.alphaTest&&a.enable(9),w.vertexColors&&a.enable(10),w.vertexAlphas&&a.enable(11),w.vertexUv1s&&a.enable(12),w.vertexUv2s&&a.enable(13),w.vertexUv3s&&a.enable(14),w.vertexTangents&&a.enable(15),w.anisotropy&&a.enable(16),w.alphaHash&&a.enable(17),w.batching&&a.enable(18),w.dispersion&&a.enable(19),w.batchingColor&&a.enable(20),w.gradientMap&&a.enable(21),w.packedNormalMap&&a.enable(22),w.vertexNormals&&a.enable(23),x.push(a.mask),a.disableAll(),w.fog&&a.enable(0),w.useFog&&a.enable(1),w.flatShading&&a.enable(2),w.logarithmicDepthBuffer&&a.enable(3),w.reversedDepthBuffer&&a.enable(4),w.skinning&&a.enable(5),w.morphTargets&&a.enable(6),w.morphNormals&&a.enable(7),w.morphColors&&a.enable(8),w.premultipliedAlpha&&a.enable(9),w.shadowMapEnabled&&a.enable(10),w.doubleSided&&a.enable(11),w.flipSided&&a.enable(12),w.useDepthPacking&&a.enable(13),w.dithering&&a.enable(14),w.transmission&&a.enable(15),w.sheen&&a.enable(16),w.opaque&&a.enable(17),w.pointsUvs&&a.enable(18),w.decodeVideoTexture&&a.enable(19),w.decodeVideoTextureEmissive&&a.enable(20),w.alphaToCoverage&&a.enable(21),w.numLightProbeGrids>0&&a.enable(22),x.push(a.mask)}function S(x){let w=f[x.type],L;if(w){let R=kn[w];L=pd.clone(R.uniforms)}else L=x.uniforms;return L}function M(x,w){let L=h.get(w);return L!==void 0?++L.usedTimes:(L=new X0(s,w,x,i),l.push(L),h.set(w,L)),L}function E(x){if(--x.usedTimes===0){let w=l.indexOf(x);l[w]=l[l.length-1],l.pop(),h.delete(x.cacheKey),x.destroy()}}function T(x){o.remove(x)}function C(){o.dispose()}return{getParameters:_,getProgramCacheKey:m,getUniforms:S,acquireProgram:M,releaseProgram:E,releaseShaderCache:T,programs:l,dispose:C}}function J0(){let s=new WeakMap;function e(a){return s.has(a)}function t(a){let o=s.get(a);return o===void 0&&(o={},s.set(a,o)),o}function n(a){s.delete(a)}function i(a,o,c){s.get(a)[o]=c}function r(){s=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:r}}function $0(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.material.id!==e.material.id?s.material.id-e.material.id:s.materialVariant!==e.materialVariant?s.materialVariant-e.materialVariant:s.z!==e.z?s.z-e.z:s.id-e.id}function Nd(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.z!==e.z?e.z-s.z:s.id-e.id}function Ud(){let s=[],e=0,t=[],n=[],i=[];function r(){e=0,t.length=0,n.length=0,i.length=0}function a(d){let f=0;return d.isInstancedMesh&&(f+=2),d.isSkinnedMesh&&(f+=1),f}function o(d,f,g,_,m,p){let v=s[e];return v===void 0?(v={id:d.id,object:d,geometry:f,material:g,materialVariant:a(d),groupOrder:_,renderOrder:d.renderOrder,z:m,group:p},s[e]=v):(v.id=d.id,v.object=d,v.geometry=f,v.material=g,v.materialVariant=a(d),v.groupOrder=_,v.renderOrder=d.renderOrder,v.z=m,v.group=p),e++,v}function c(d,f,g,_,m,p){let v=o(d,f,g,_,m,p);g.transmission>0?n.push(v):g.transparent===!0?i.push(v):t.push(v)}function l(d,f,g,_,m,p){let v=o(d,f,g,_,m,p);g.transmission>0?n.unshift(v):g.transparent===!0?i.unshift(v):t.unshift(v)}function h(d,f){t.length>1&&t.sort(d||$0),n.length>1&&n.sort(f||Nd),i.length>1&&i.sort(f||Nd)}function u(){for(let d=e,f=s.length;d<f;d++){let g=s[d];if(g.id===null)break;g.id=null,g.object=null,g.geometry=null,g.material=null,g.group=null}}return{opaque:t,transmissive:n,transparent:i,init:r,push:c,unshift:l,finish:u,sort:h}}function Z0(){let s=new WeakMap;function e(n,i){let r=s.get(n),a;return r===void 0?(a=new Ud,s.set(n,[a])):i>=r.length?(a=new Ud,r.push(a)):a=r[i],a}function t(){s=new WeakMap}return{get:e,dispose:t}}function Q0(){let s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new F,color:new Te};break;case"SpotLight":t={position:new F,direction:new F,color:new Te,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new F,color:new Te,distance:0,decay:0};break;case"HemisphereLight":t={direction:new F,skyColor:new Te,groundColor:new Te};break;case"RectAreaLight":t={color:new Te,position:new F,halfWidth:new F,halfHeight:new F};break}return s[e.id]=t,t}}}function ex(){let s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new He};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new He};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new He,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}var tx=0;function nx(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function ix(s){let e=new Q0,t=ex(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let l=0;l<9;l++)n.probe.push(new F);let i=new F,r=new Ue,a=new Ue;function o(l){let h=0,u=0,d=0;for(let w=0;w<9;w++)n.probe[w].set(0,0,0);let f=0,g=0,_=0,m=0,p=0,v=0,S=0,M=0,E=0,T=0,C=0;l.sort(nx);for(let w=0,L=l.length;w<L;w++){let R=l[w],O=R.color,H=R.intensity,q=R.distance,N=null;if(R.shadow&&R.shadow.map&&(R.shadow.map.texture.format===xi?N=R.shadow.map.texture:N=R.shadow.map.depthTexture||R.shadow.map.texture),R.isAmbientLight)h+=O.r*H,u+=O.g*H,d+=O.b*H;else if(R.isLightProbe){for(let z=0;z<9;z++)n.probe[z].addScaledVector(R.sh.coefficients[z],H);C++}else if(R.isDirectionalLight){let z=e.get(R);if(z.color.copy(R.color).multiplyScalar(R.intensity),R.castShadow){let V=R.shadow,Z=t.get(R);Z.shadowIntensity=V.intensity,Z.shadowBias=V.bias,Z.shadowNormalBias=V.normalBias,Z.shadowRadius=V.radius,Z.shadowMapSize=V.mapSize,n.directionalShadow[f]=Z,n.directionalShadowMap[f]=N,n.directionalShadowMatrix[f]=R.shadow.matrix,v++}n.directional[f]=z,f++}else if(R.isSpotLight){let z=e.get(R);z.position.setFromMatrixPosition(R.matrixWorld),z.color.copy(O).multiplyScalar(H),z.distance=q,z.coneCos=Math.cos(R.angle),z.penumbraCos=Math.cos(R.angle*(1-R.penumbra)),z.decay=R.decay,n.spot[_]=z;let V=R.shadow;if(R.map&&(n.spotLightMap[E]=R.map,E++,V.updateMatrices(R),R.castShadow&&T++),n.spotLightMatrix[_]=V.matrix,R.castShadow){let Z=t.get(R);Z.shadowIntensity=V.intensity,Z.shadowBias=V.bias,Z.shadowNormalBias=V.normalBias,Z.shadowRadius=V.radius,Z.shadowMapSize=V.mapSize,n.spotShadow[_]=Z,n.spotShadowMap[_]=N,M++}_++}else if(R.isRectAreaLight){let z=e.get(R);z.color.copy(O).multiplyScalar(H),z.halfWidth.set(R.width*.5,0,0),z.halfHeight.set(0,R.height*.5,0),n.rectArea[m]=z,m++}else if(R.isPointLight){let z=e.get(R);if(z.color.copy(R.color).multiplyScalar(R.intensity),z.distance=R.distance,z.decay=R.decay,R.castShadow){let V=R.shadow,Z=t.get(R);Z.shadowIntensity=V.intensity,Z.shadowBias=V.bias,Z.shadowNormalBias=V.normalBias,Z.shadowRadius=V.radius,Z.shadowMapSize=V.mapSize,Z.shadowCameraNear=V.camera.near,Z.shadowCameraFar=V.camera.far,n.pointShadow[g]=Z,n.pointShadowMap[g]=N,n.pointShadowMatrix[g]=R.shadow.matrix,S++}n.point[g]=z,g++}else if(R.isHemisphereLight){let z=e.get(R);z.skyColor.copy(R.color).multiplyScalar(H),z.groundColor.copy(R.groundColor).multiplyScalar(H),n.hemi[p]=z,p++}}m>0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=ce.LTC_FLOAT_1,n.rectAreaLTC2=ce.LTC_FLOAT_2):(n.rectAreaLTC1=ce.LTC_HALF_1,n.rectAreaLTC2=ce.LTC_HALF_2)),n.ambient[0]=h,n.ambient[1]=u,n.ambient[2]=d;let x=n.hash;(x.directionalLength!==f||x.pointLength!==g||x.spotLength!==_||x.rectAreaLength!==m||x.hemiLength!==p||x.numDirectionalShadows!==v||x.numPointShadows!==S||x.numSpotShadows!==M||x.numSpotMaps!==E||x.numLightProbes!==C)&&(n.directional.length=f,n.spot.length=_,n.rectArea.length=m,n.point.length=g,n.hemi.length=p,n.directionalShadow.length=v,n.directionalShadowMap.length=v,n.pointShadow.length=S,n.pointShadowMap.length=S,n.spotShadow.length=M,n.spotShadowMap.length=M,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=S,n.spotLightMatrix.length=M+E-T,n.spotLightMap.length=E,n.numSpotLightShadowsWithMaps=T,n.numLightProbes=C,x.directionalLength=f,x.pointLength=g,x.spotLength=_,x.rectAreaLength=m,x.hemiLength=p,x.numDirectionalShadows=v,x.numPointShadows=S,x.numSpotShadows=M,x.numSpotMaps=E,x.numLightProbes=C,n.version=tx++)}function c(l,h){let u=0,d=0,f=0,g=0,_=0,m=h.matrixWorldInverse;for(let p=0,v=l.length;p<v;p++){let S=l[p];if(S.isDirectionalLight){let M=n.directional[u];M.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(m),u++}else if(S.isSpotLight){let M=n.spot[f];M.position.setFromMatrixPosition(S.matrixWorld),M.position.applyMatrix4(m),M.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(m),f++}else if(S.isRectAreaLight){let M=n.rectArea[g];M.position.setFromMatrixPosition(S.matrixWorld),M.position.applyMatrix4(m),a.identity(),r.copy(S.matrixWorld),r.premultiply(m),a.extractRotation(r),M.halfWidth.set(S.width*.5,0,0),M.halfHeight.set(0,S.height*.5,0),M.halfWidth.applyMatrix4(a),M.halfHeight.applyMatrix4(a),g++}else if(S.isPointLight){let M=n.point[d];M.position.setFromMatrixPosition(S.matrixWorld),M.position.applyMatrix4(m),d++}else if(S.isHemisphereLight){let M=n.hemi[_];M.direction.setFromMatrixPosition(S.matrixWorld),M.direction.transformDirection(m),_++}}}return{setup:o,setupView:c,state:n}}function Od(s){let e=new ix(s),t=[],n=[],i=[];function r(d){u.camera=d,t.length=0,n.length=0,i.length=0}function a(d){t.push(d)}function o(d){n.push(d)}function c(d){i.push(d)}function l(){e.setup(t)}function h(d){e.setupView(t,d)}let u={lightsArray:t,shadowsArray:n,lightProbeGridArray:i,camera:null,lights:e,transmissionRenderTarget:{},textureUnits:0};return{init:r,state:u,setupLights:l,setupLightsView:h,pushLight:a,pushShadow:o,pushLightProbeGrid:c}}function sx(s){let e=new WeakMap;function t(i,r=0){let a=e.get(i),o;return a===void 0?(o=new Od(s),e.set(i,[o])):r>=a.length?(o=new Od(s),a.push(o)):o=a[r],o}function n(){e=new WeakMap}return{get:t,dispose:n}}var rx=`void main() {
gl_Position = vec4( position, 1.0 );
-}`,W0=`uniform sampler2D shadow_pass;
+}`,ax=`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
void main() {
@@ -4078,12 +4078,12 @@ void main() {
squared_mean = squared_mean / samples;
float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );
gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );
-}`,q0=[new F(1,0,0),new F(-1,0,0),new F(0,1,0),new F(0,-1,0),new F(0,0,1),new F(0,0,-1)],X0=[new F(0,-1,0),new F(0,-1,0),new F(0,0,1),new F(0,0,-1),new F(0,-1,0),new F(0,-1,0)],Td=new Ue,Ur=new F,Il=new F;function j0(s,e,t){let n=new vs,i=new He,r=new He,a=new nt,o=new Ba,c=new za,l={},h=t.maxTextureSize,u={[pn]:Pt,[Pt]:pn,[sn]:sn},d=new Zt({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new He},radius:{value:4}},vertexShader:H0,fragmentShader:W0}),f=d.clone();f.defines.HORIZONTAL_PASS=1;let g=new zt;g.setAttribute("position",new St(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let _=new lt(g,d),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Mr;let p=this.type;this.render=function(T,C,x){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||T.length===0)return;this.type===bu&&(_e("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),this.type=Mr);let w=s.getRenderTarget(),L=s.getActiveCubeFace(),R=s.getActiveMipmapLevel(),O=s.state;O.setBlending(Dn),O.buffers.depth.getReversed()===!0?O.buffers.color.setClear(0,0,0,0):O.buffers.color.setClear(1,1,1,1),O.buffers.depth.setTest(!0),O.setScissorTest(!1);let H=p!==this.type;H&&C.traverse(function(q){q.material&&(Array.isArray(q.material)?q.material.forEach(N=>N.needsUpdate=!0):q.material.needsUpdate=!0)});for(let q=0,N=T.length;q<N;q++){let z=T[q],V=z.shadow;if(V===void 0){_e("WebGLShadowMap:",z,"has no shadow.");continue}if(V.autoUpdate===!1&&V.needsUpdate===!1)continue;i.copy(V.mapSize);let $=V.getFrameExtents();i.multiply($),r.copy(V.mapSize),(i.x>h||i.y>h)&&(i.x>h&&(r.x=Math.floor(h/$.x),i.x=r.x*$.x,V.mapSize.x=r.x),i.y>h&&(r.y=Math.floor(h/$.y),i.y=r.y*$.y,V.mapSize.y=r.y));let Q=s.state.buffers.depth.getReversed();if(V.camera._reversedDepth=Q,V.map===null||H===!0){if(V.map!==null&&(V.map.depthTexture!==null&&(V.map.depthTexture.dispose(),V.map.depthTexture=null),V.map.dispose()),this.type===As){if(z.isPointLight){_e("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}V.map=new Yt(i.x,i.y,{format:gi,type:Fn,minFilter:_t,magFilter:_t,generateMipmaps:!1}),V.map.texture.name=z.name+".shadowMap",V.map.depthTexture=new jn(i.x,i.y,$t),V.map.depthTexture.name=z.name+".shadowMapDepth",V.map.depthTexture.format=Tn,V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=xt,V.map.depthTexture.magFilter=xt}else z.isPointLight?(V.map=new qo(i.x),V.map.depthTexture=new Oa(i.x,_n)):(V.map=new Yt(i.x,i.y),V.map.depthTexture=new jn(i.x,i.y,_n)),V.map.depthTexture.name=z.name+".shadowMap",V.map.depthTexture.format=Tn,this.type===Mr?(V.map.depthTexture.compareFunction=Q?Vo:Go,V.map.depthTexture.minFilter=_t,V.map.depthTexture.magFilter=_t):(V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=xt,V.map.depthTexture.magFilter=xt);V.camera.updateProjectionMatrix()}let le=V.map.isWebGLCubeRenderTarget?6:1;for(let xe=0;xe<le;xe++){if(V.map.isWebGLCubeRenderTarget)s.setRenderTarget(V.map,xe),s.clear();else{xe===0&&(s.setRenderTarget(V.map),s.clear());let Se=V.getViewport(xe);a.set(r.x*Se.x,r.y*Se.y,r.x*Se.z,r.y*Se.w),O.viewport(a)}if(z.isPointLight){let Se=V.camera,Xe=V.matrix,Ze=z.distance||Se.far;Ze!==Se.far&&(Se.far=Ze,Se.updateProjectionMatrix()),Ur.setFromMatrixPosition(z.matrixWorld),Se.position.copy(Ur),Il.copy(Se.position),Il.add(q0[xe]),Se.up.copy(X0[xe]),Se.lookAt(Il),Se.updateMatrixWorld(),Xe.makeTranslation(-Ur.x,-Ur.y,-Ur.z),Td.multiplyMatrices(Se.projectionMatrix,Se.matrixWorldInverse),V._frustum.setFromProjectionMatrix(Td,Se.coordinateSystem,Se.reversedDepth)}else V.updateMatrices(z);n=V.getFrustum(),M(C,x,V.camera,z,this.type)}V.isPointLightShadow!==!0&&this.type===As&&v(V,x),V.needsUpdate=!1}p=this.type,m.needsUpdate=!1,s.setRenderTarget(w,L,R)};function v(T,C){let x=e.update(_);d.defines.VSM_SAMPLES!==T.blurSamples&&(d.defines.VSM_SAMPLES=T.blurSamples,f.defines.VSM_SAMPLES=T.blurSamples,d.needsUpdate=!0,f.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new Yt(i.x,i.y,{format:gi,type:Fn})),d.uniforms.shadow_pass.value=T.map.depthTexture,d.uniforms.resolution.value=T.mapSize,d.uniforms.radius.value=T.radius,s.setRenderTarget(T.mapPass),s.clear(),s.renderBufferDirect(C,null,x,d,_,null),f.uniforms.shadow_pass.value=T.mapPass.texture,f.uniforms.resolution.value=T.mapSize,f.uniforms.radius.value=T.radius,s.setRenderTarget(T.map),s.clear(),s.renderBufferDirect(C,null,x,f,_,null)}function S(T,C,x,w){let L=null,R=x.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(R!==void 0)L=R;else if(L=x.isPointLight===!0?c:o,s.localClippingEnabled&&C.clipShadows===!0&&Array.isArray(C.clippingPlanes)&&C.clippingPlanes.length!==0||C.displacementMap&&C.displacementScale!==0||C.alphaMap&&C.alphaTest>0||C.map&&C.alphaTest>0||C.alphaToCoverage===!0){let O=L.uuid,H=C.uuid,q=l[O];q===void 0&&(q={},l[O]=q);let N=q[H];N===void 0&&(N=L.clone(),q[H]=N,C.addEventListener("dispose",E)),L=N}if(L.visible=C.visible,L.wireframe=C.wireframe,w===As?L.side=C.shadowSide!==null?C.shadowSide:C.side:L.side=C.shadowSide!==null?C.shadowSide:u[C.side],L.alphaMap=C.alphaMap,L.alphaTest=C.alphaToCoverage===!0?.5:C.alphaTest,L.map=C.map,L.clipShadows=C.clipShadows,L.clippingPlanes=C.clippingPlanes,L.clipIntersection=C.clipIntersection,L.displacementMap=C.displacementMap,L.displacementScale=C.displacementScale,L.displacementBias=C.displacementBias,L.wireframeLinewidth=C.wireframeLinewidth,L.linewidth=C.linewidth,x.isPointLight===!0&&L.isMeshDistanceMaterial===!0){let O=s.properties.get(L);O.light=x}return L}function M(T,C,x,w,L){if(T.visible===!1)return;if(T.layers.test(C.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&L===As)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(x.matrixWorldInverse,T.matrixWorld);let H=e.update(T),q=T.material;if(Array.isArray(q)){let N=H.groups;for(let z=0,V=N.length;z<V;z++){let $=N[z],Q=q[$.materialIndex];if(Q&&Q.visible){let le=S(T,Q,w,L);T.onBeforeShadow(s,T,C,x,H,le,$),s.renderBufferDirect(x,null,H,le,T,$),T.onAfterShadow(s,T,C,x,H,le,$)}}}else if(q.visible){let N=S(T,q,w,L);T.onBeforeShadow(s,T,C,x,H,N,null),s.renderBufferDirect(x,null,H,N,T,null),T.onAfterShadow(s,T,C,x,H,N,null)}}let O=T.children;for(let H=0,q=O.length;H<q;H++)M(O[H],C,x,w,L)}function E(T){T.target.removeEventListener("dispose",E);for(let x in l){let w=l[x],L=T.target.uuid;L in w&&(w[L].dispose(),delete w[L])}}}function K0(s,e){function t(){let P=!1,ne=new nt,X=null,pe=new nt(0,0,0,0);return{setMask:function(re){X!==re&&!P&&(s.colorMask(re,re,re,re),X=re)},setLocked:function(re){P=re},setClear:function(re,Y,ye,Le,pt){pt===!0&&(re*=Le,Y*=Le,ye*=Le),ne.set(re,Y,ye,Le),pe.equals(ne)===!1&&(s.clearColor(re,Y,ye,Le),pe.copy(ne))},reset:function(){P=!1,X=null,pe.set(-1,0,0,0)}}}function n(){let P=!1,ne=!1,X=null,pe=null,re=null;return{setReversed:function(Y){if(ne!==Y){let ye=e.get("EXT_clip_control");Y?ye.clipControlEXT(ye.LOWER_LEFT_EXT,ye.ZERO_TO_ONE_EXT):ye.clipControlEXT(ye.LOWER_LEFT_EXT,ye.NEGATIVE_ONE_TO_ONE_EXT),ne=Y;let Le=re;re=null,this.setClear(Le)}},getReversed:function(){return ne},setTest:function(Y){Y?ie(s.DEPTH_TEST):Ee(s.DEPTH_TEST)},setMask:function(Y){X!==Y&&!P&&(s.depthMask(Y),X=Y)},setFunc:function(Y){if(ne&&(Y=Qu[Y]),pe!==Y){switch(Y){case Sa:s.depthFunc(s.NEVER);break;case Aa:s.depthFunc(s.ALWAYS);break;case Ta:s.depthFunc(s.LESS);break;case Ci:s.depthFunc(s.LEQUAL);break;case wa:s.depthFunc(s.EQUAL);break;case Ea:s.depthFunc(s.GEQUAL);break;case Ra:s.depthFunc(s.GREATER);break;case Ca:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}pe=Y}},setLocked:function(Y){P=Y},setClear:function(Y){re!==Y&&(re=Y,ne&&(Y=1-Y),s.clearDepth(Y))},reset:function(){P=!1,X=null,pe=null,re=null,ne=!1}}}function i(){let P=!1,ne=null,X=null,pe=null,re=null,Y=null,ye=null,Le=null,pt=null;return{setTest:function(Qe){P||(Qe?ie(s.STENCIL_TEST):Ee(s.STENCIL_TEST))},setMask:function(Qe){ne!==Qe&&!P&&(s.stencilMask(Qe),ne=Qe)},setFunc:function(Qe,Bn,vn){(X!==Qe||pe!==Bn||re!==vn)&&(s.stencilFunc(Qe,Bn,vn),X=Qe,pe=Bn,re=vn)},setOp:function(Qe,Bn,vn){(Y!==Qe||ye!==Bn||Le!==vn)&&(s.stencilOp(Qe,Bn,vn),Y=Qe,ye=Bn,Le=vn)},setLocked:function(Qe){P=Qe},setClear:function(Qe){pt!==Qe&&(s.clearStencil(Qe),pt=Qe)},reset:function(){P=!1,ne=null,X=null,pe=null,re=null,Y=null,ye=null,Le=null,pt=null}}}let r=new t,a=new n,o=new i,c=new WeakMap,l=new WeakMap,h={},u={},d={},f=new WeakMap,g=[],_=null,m=!1,p=null,v=null,S=null,M=null,E=null,T=null,C=null,x=new Te(0,0,0),w=0,L=!1,R=null,O=null,H=null,q=null,N=null,z=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS),V=!1,$=0,Q=s.getParameter(s.VERSION);Q.indexOf("WebGL")!==-1?($=parseFloat(/^WebGL (\d)/.exec(Q)[1]),V=$>=1):Q.indexOf("OpenGL ES")!==-1&&($=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),V=$>=2);let le=null,xe={},Se=s.getParameter(s.SCISSOR_BOX),Xe=s.getParameter(s.VIEWPORT),Ze=new nt().fromArray(Se),Fe=new nt().fromArray(Xe);function J(P,ne,X,pe){let re=new Uint8Array(4),Y=s.createTexture();s.bindTexture(P,Y),s.texParameteri(P,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(P,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let ye=0;ye<X;ye++)P===s.TEXTURE_3D||P===s.TEXTURE_2D_ARRAY?s.texImage3D(ne,0,s.RGBA,1,1,pe,0,s.RGBA,s.UNSIGNED_BYTE,re):s.texImage2D(ne+ye,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,re);return Y}let de={};de[s.TEXTURE_2D]=J(s.TEXTURE_2D,s.TEXTURE_2D,1),de[s.TEXTURE_CUBE_MAP]=J(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),de[s.TEXTURE_2D_ARRAY]=J(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),de[s.TEXTURE_3D]=J(s.TEXTURE_3D,s.TEXTURE_3D,1,1),r.setClear(0,0,0,1),a.setClear(1),o.setClear(0),ie(s.DEPTH_TEST),a.setFunc(Ci),At(!1),ut(Zc),ie(s.CULL_FACE),ot(Dn);function ie(P){h[P]!==!0&&(s.enable(P),h[P]=!0)}function Ee(P){h[P]!==!1&&(s.disable(P),h[P]=!1)}function Ie(P,ne){return d[P]!==ne?(s.bindFramebuffer(P,ne),d[P]=ne,P===s.DRAW_FRAMEBUFFER&&(d[s.FRAMEBUFFER]=ne),P===s.FRAMEBUFFER&&(d[s.DRAW_FRAMEBUFFER]=ne),!0):!1}function Re(P,ne){let X=g,pe=!1;if(P){X=f.get(ne),X===void 0&&(X=[],f.set(ne,X));let re=P.textures;if(X.length!==re.length||X[0]!==s.COLOR_ATTACHMENT0){for(let Y=0,ye=re.length;Y<ye;Y++)X[Y]=s.COLOR_ATTACHMENT0+Y;X.length=re.length,pe=!0}}else X[0]!==s.BACK&&(X[0]=s.BACK,pe=!0);pe&&s.drawBuffers(X)}function ht(P){return _!==P?(s.useProgram(P),_=P,!0):!1}let We={[ci]:s.FUNC_ADD,[_u]:s.FUNC_SUBTRACT,[vu]:s.FUNC_REVERSE_SUBTRACT};We[yu]=s.MIN,We[Mu]=s.MAX;let $e={[Su]:s.ZERO,[Au]:s.ONE,[Tu]:s.SRC_COLOR,[ya]:s.SRC_ALPHA,[Iu]:s.SRC_ALPHA_SATURATE,[Cu]:s.DST_COLOR,[Eu]:s.DST_ALPHA,[wu]:s.ONE_MINUS_SRC_COLOR,[Ma]:s.ONE_MINUS_SRC_ALPHA,[Pu]:s.ONE_MINUS_DST_COLOR,[Ru]:s.ONE_MINUS_DST_ALPHA,[Lu]:s.CONSTANT_COLOR,[Du]:s.ONE_MINUS_CONSTANT_COLOR,[Fu]:s.CONSTANT_ALPHA,[Nu]:s.ONE_MINUS_CONSTANT_ALPHA};function ot(P,ne,X,pe,re,Y,ye,Le,pt,Qe){if(P===Dn){m===!0&&(Ee(s.BLEND),m=!1);return}if(m===!1&&(ie(s.BLEND),m=!0),P!==xu){if(P!==p||Qe!==L){if((v!==ci||E!==ci)&&(s.blendEquation(s.FUNC_ADD),v=ci,E=ci),Qe)switch(P){case Ri:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case $c:s.blendFunc(s.ONE,s.ONE);break;case Qc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case el:s.blendFuncSeparate(s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ZERO,s.ONE);break;default:we("WebGLState: Invalid blending: ",P);break}else switch(P){case Ri:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case $c:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE,s.ONE,s.ONE);break;case Qc:we("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case el:we("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:we("WebGLState: Invalid blending: ",P);break}S=null,M=null,T=null,C=null,x.set(0,0,0),w=0,p=P,L=Qe}return}re=re||ne,Y=Y||X,ye=ye||pe,(ne!==v||re!==E)&&(s.blendEquationSeparate(We[ne],We[re]),v=ne,E=re),(X!==S||pe!==M||Y!==T||ye!==C)&&(s.blendFuncSeparate($e[X],$e[pe],$e[Y],$e[ye]),S=X,M=pe,T=Y,C=ye),(Le.equals(x)===!1||pt!==w)&&(s.blendColor(Le.r,Le.g,Le.b,pt),x.copy(Le),w=pt),p=P,L=!1}function Ge(P,ne){P.side===sn?Ee(s.CULL_FACE):ie(s.CULL_FACE);let X=P.side===Pt;ne&&(X=!X),At(X),P.blending===Ri&&P.transparent===!1?ot(Dn):ot(P.blending,P.blendEquation,P.blendSrc,P.blendDst,P.blendEquationAlpha,P.blendSrcAlpha,P.blendDstAlpha,P.blendColor,P.blendAlpha,P.premultipliedAlpha),a.setFunc(P.depthFunc),a.setTest(P.depthTest),a.setMask(P.depthWrite),r.setMask(P.colorWrite);let pe=P.stencilWrite;o.setTest(pe),pe&&(o.setMask(P.stencilWriteMask),o.setFunc(P.stencilFunc,P.stencilRef,P.stencilFuncMask),o.setOp(P.stencilFail,P.stencilZFail,P.stencilZPass)),I(P.polygonOffset,P.polygonOffsetFactor,P.polygonOffsetUnits),P.alphaToCoverage===!0?ie(s.SAMPLE_ALPHA_TO_COVERAGE):Ee(s.SAMPLE_ALPHA_TO_COVERAGE)}function At(P){R!==P&&(P?s.frontFace(s.CW):s.frontFace(s.CCW),R=P)}function ut(P){P!==mu?(ie(s.CULL_FACE),P!==O&&(P===Zc?s.cullFace(s.BACK):P===gu?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):Ee(s.CULL_FACE),O=P}function Xt(P){P!==H&&(V&&s.lineWidth(P),H=P)}function I(P,ne,X){P?(ie(s.POLYGON_OFFSET_FILL),(q!==ne||N!==X)&&(q=ne,N=X,a.getReversed()&&(ne=-ne),s.polygonOffset(ne,X))):Ee(s.POLYGON_OFFSET_FILL)}function Tt(P){P?ie(s.SCISSOR_TEST):Ee(s.SCISSOR_TEST)}function qe(P){P===void 0&&(P=s.TEXTURE0+z-1),le!==P&&(s.activeTexture(P),le=P)}function rt(P,ne,X){X===void 0&&(le===null?X=s.TEXTURE0+z-1:X=le);let pe=xe[X];pe===void 0&&(pe={type:void 0,texture:void 0},xe[X]=pe),(pe.type!==P||pe.texture!==ne)&&(le!==X&&(s.activeTexture(X),le=X),s.bindTexture(P,ne||de[P]),pe.type=P,pe.texture=ne)}function oe(){let P=xe[le];P!==void 0&&P.type!==void 0&&(s.bindTexture(P.type,null),P.type=void 0,P.texture=void 0)}function dt(){try{s.compressedTexImage2D(...arguments)}catch(P){we("WebGLState:",P)}}function A(){try{s.compressedTexImage3D(...arguments)}catch(P){we("WebGLState:",P)}}function b(){try{s.texSubImage2D(...arguments)}catch(P){we("WebGLState:",P)}}function U(){try{s.texSubImage3D(...arguments)}catch(P){we("WebGLState:",P)}}function j(){try{s.compressedTexSubImage2D(...arguments)}catch(P){we("WebGLState:",P)}}function Z(){try{s.compressedTexSubImage3D(...arguments)}catch(P){we("WebGLState:",P)}}function ee(){try{s.texStorage2D(...arguments)}catch(P){we("WebGLState:",P)}}function ae(){try{s.texStorage3D(...arguments)}catch(P){we("WebGLState:",P)}}function W(){try{s.texImage2D(...arguments)}catch(P){we("WebGLState:",P)}}function K(){try{s.texImage3D(...arguments)}catch(P){we("WebGLState:",P)}}function fe(P){return u[P]!==void 0?u[P]:s.getParameter(P)}function ge(P,ne){u[P]!==ne&&(s.pixelStorei(P,ne),u[P]=ne)}function se(P){Ze.equals(P)===!1&&(s.scissor(P.x,P.y,P.z,P.w),Ze.copy(P))}function te(P){Fe.equals(P)===!1&&(s.viewport(P.x,P.y,P.z,P.w),Fe.copy(P))}function Ce(P,ne){let X=l.get(ne);X===void 0&&(X=new WeakMap,l.set(ne,X));let pe=X.get(P);pe===void 0&&(pe=s.getUniformBlockIndex(ne,P.name),X.set(P,pe))}function Ne(P,ne){let pe=l.get(ne).get(P);c.get(ne)!==pe&&(s.uniformBlockBinding(ne,pe,P.__bindingPointIndex),c.set(ne,pe))}function Ke(){s.disable(s.BLEND),s.disable(s.CULL_FACE),s.disable(s.DEPTH_TEST),s.disable(s.POLYGON_OFFSET_FILL),s.disable(s.SCISSOR_TEST),s.disable(s.STENCIL_TEST),s.disable(s.SAMPLE_ALPHA_TO_COVERAGE),s.blendEquation(s.FUNC_ADD),s.blendFunc(s.ONE,s.ZERO),s.blendFuncSeparate(s.ONE,s.ZERO,s.ONE,s.ZERO),s.blendColor(0,0,0,0),s.colorMask(!0,!0,!0,!0),s.clearColor(0,0,0,0),s.depthMask(!0),s.depthFunc(s.LESS),a.setReversed(!1),s.clearDepth(1),s.stencilMask(4294967295),s.stencilFunc(s.ALWAYS,0,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.clearStencil(0),s.cullFace(s.BACK),s.frontFace(s.CCW),s.polygonOffset(0,0),s.activeTexture(s.TEXTURE0),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),s.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.useProgram(null),s.lineWidth(1),s.scissor(0,0,s.canvas.width,s.canvas.height),s.viewport(0,0,s.canvas.width,s.canvas.height),s.pixelStorei(s.PACK_ALIGNMENT,4),s.pixelStorei(s.UNPACK_ALIGNMENT,4),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.BROWSER_DEFAULT_WEBGL),s.pixelStorei(s.PACK_ROW_LENGTH,0),s.pixelStorei(s.PACK_SKIP_PIXELS,0),s.pixelStorei(s.PACK_SKIP_ROWS,0),s.pixelStorei(s.UNPACK_ROW_LENGTH,0),s.pixelStorei(s.UNPACK_IMAGE_HEIGHT,0),s.pixelStorei(s.UNPACK_SKIP_PIXELS,0),s.pixelStorei(s.UNPACK_SKIP_ROWS,0),s.pixelStorei(s.UNPACK_SKIP_IMAGES,0),h={},u={},le=null,xe={},d={},f=new WeakMap,g=[],_=null,m=!1,p=null,v=null,S=null,M=null,E=null,T=null,C=null,x=new Te(0,0,0),w=0,L=!1,R=null,O=null,H=null,q=null,N=null,Ze.set(0,0,s.canvas.width,s.canvas.height),Fe.set(0,0,s.canvas.width,s.canvas.height),r.reset(),a.reset(),o.reset()}return{buffers:{color:r,depth:a,stencil:o},enable:ie,disable:Ee,bindFramebuffer:Ie,drawBuffers:Re,useProgram:ht,setBlending:ot,setMaterial:Ge,setFlipSided:At,setCullFace:ut,setLineWidth:Xt,setPolygonOffset:I,setScissorTest:Tt,activeTexture:qe,bindTexture:rt,unbindTexture:oe,compressedTexImage2D:dt,compressedTexImage3D:A,texImage2D:W,texImage3D:K,pixelStorei:ge,getParameter:fe,updateUBOMapping:Ce,uniformBlockBinding:Ne,texStorage2D:ee,texStorage3D:ae,texSubImage2D:b,texSubImage3D:U,compressedTexSubImage2D:j,compressedTexSubImage3D:Z,scissor:se,viewport:te,reset:Ke}}function J0(s,e,t,n,i,r,a){let o=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,c=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),l=new He,h=new WeakMap,u=new Set,d,f=new WeakMap,g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(A,b){return g?new OffscreenCanvas(A,b):ds("canvas")}function m(A,b,U){let j=1,Z=dt(A);if((Z.width>U||Z.height>U)&&(j=U/Math.max(Z.width,Z.height)),j<1)if(typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&A instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&A instanceof ImageBitmap||typeof VideoFrame<"u"&&A instanceof VideoFrame){let ee=Math.floor(j*Z.width),ae=Math.floor(j*Z.height);d===void 0&&(d=_(ee,ae));let W=b?_(ee,ae):d;return W.width=ee,W.height=ae,W.getContext("2d").drawImage(A,0,0,ee,ae),_e("WebGLRenderer: Texture has been resized from ("+Z.width+"x"+Z.height+") to ("+ee+"x"+ae+")."),W}else return"data"in A&&_e("WebGLRenderer: Image in DataTexture is too big ("+Z.width+"x"+Z.height+")."),A;return A}function p(A){return A.generateMipmaps}function v(A){s.generateMipmap(A)}function S(A){return A.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:A.isWebGL3DRenderTarget?s.TEXTURE_3D:A.isWebGLArrayRenderTarget||A.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function M(A,b,U,j,Z,ee=!1){if(A!==null){if(s[A]!==void 0)return s[A];_e("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+A+"'")}let ae;j&&(ae=e.get("EXT_texture_norm16"),ae||_e("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));let W=b;if(b===s.RED&&(U===s.FLOAT&&(W=s.R32F),U===s.HALF_FLOAT&&(W=s.R16F),U===s.UNSIGNED_BYTE&&(W=s.R8),U===s.UNSIGNED_SHORT&&ae&&(W=ae.R16_EXT),U===s.SHORT&&ae&&(W=ae.R16_SNORM_EXT)),b===s.RED_INTEGER&&(U===s.UNSIGNED_BYTE&&(W=s.R8UI),U===s.UNSIGNED_SHORT&&(W=s.R16UI),U===s.UNSIGNED_INT&&(W=s.R32UI),U===s.BYTE&&(W=s.R8I),U===s.SHORT&&(W=s.R16I),U===s.INT&&(W=s.R32I)),b===s.RG&&(U===s.FLOAT&&(W=s.RG32F),U===s.HALF_FLOAT&&(W=s.RG16F),U===s.UNSIGNED_BYTE&&(W=s.RG8),U===s.UNSIGNED_SHORT&&ae&&(W=ae.RG16_EXT),U===s.SHORT&&ae&&(W=ae.RG16_SNORM_EXT)),b===s.RG_INTEGER&&(U===s.UNSIGNED_BYTE&&(W=s.RG8UI),U===s.UNSIGNED_SHORT&&(W=s.RG16UI),U===s.UNSIGNED_INT&&(W=s.RG32UI),U===s.BYTE&&(W=s.RG8I),U===s.SHORT&&(W=s.RG16I),U===s.INT&&(W=s.RG32I)),b===s.RGB_INTEGER&&(U===s.UNSIGNED_BYTE&&(W=s.RGB8UI),U===s.UNSIGNED_SHORT&&(W=s.RGB16UI),U===s.UNSIGNED_INT&&(W=s.RGB32UI),U===s.BYTE&&(W=s.RGB8I),U===s.SHORT&&(W=s.RGB16I),U===s.INT&&(W=s.RGB32I)),b===s.RGBA_INTEGER&&(U===s.UNSIGNED_BYTE&&(W=s.RGBA8UI),U===s.UNSIGNED_SHORT&&(W=s.RGBA16UI),U===s.UNSIGNED_INT&&(W=s.RGBA32UI),U===s.BYTE&&(W=s.RGBA8I),U===s.SHORT&&(W=s.RGBA16I),U===s.INT&&(W=s.RGBA32I)),b===s.RGB&&(U===s.UNSIGNED_SHORT&&ae&&(W=ae.RGB16_EXT),U===s.SHORT&&ae&&(W=ae.RGB16_SNORM_EXT),U===s.UNSIGNED_INT_5_9_9_9_REV&&(W=s.RGB9_E5),U===s.UNSIGNED_INT_10F_11F_11F_REV&&(W=s.R11F_G11F_B10F)),b===s.RGBA){let K=ee?Zs:Be.getTransfer(Z);U===s.FLOAT&&(W=s.RGBA32F),U===s.HALF_FLOAT&&(W=s.RGBA16F),U===s.UNSIGNED_BYTE&&(W=K===Je?s.SRGB8_ALPHA8:s.RGBA8),U===s.UNSIGNED_SHORT&&ae&&(W=ae.RGBA16_EXT),U===s.SHORT&&ae&&(W=ae.RGBA16_SNORM_EXT),U===s.UNSIGNED_SHORT_4_4_4_4&&(W=s.RGBA4),U===s.UNSIGNED_SHORT_5_5_5_1&&(W=s.RGB5_A1)}return(W===s.R16F||W===s.R32F||W===s.RG16F||W===s.RG32F||W===s.RGBA16F||W===s.RGBA32F)&&e.get("EXT_color_buffer_float"),W}function E(A,b){let U;return A?b===null||b===_n||b===Es?U=s.DEPTH24_STENCIL8:b===$t?U=s.DEPTH32F_STENCIL8:b===ws&&(U=s.DEPTH24_STENCIL8,_e("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):b===null||b===_n||b===Es?U=s.DEPTH_COMPONENT24:b===$t?U=s.DEPTH_COMPONENT32F:b===ws&&(U=s.DEPTH_COMPONENT16),U}function T(A,b){return p(A)===!0||A.isFramebufferTexture&&A.minFilter!==xt&&A.minFilter!==_t?Math.log2(Math.max(b.width,b.height))+1:A.mipmaps!==void 0&&A.mipmaps.length>0?A.mipmaps.length:A.isCompressedTexture&&Array.isArray(A.image)?b.mipmaps.length:1}function C(A){let b=A.target;b.removeEventListener("dispose",C),w(b),b.isVideoTexture&&h.delete(b),b.isHTMLTexture&&u.delete(b)}function x(A){let b=A.target;b.removeEventListener("dispose",x),R(b)}function w(A){let b=n.get(A);if(b.__webglInit===void 0)return;let U=A.source,j=f.get(U);if(j){let Z=j[b.__cacheKey];Z.usedTimes--,Z.usedTimes===0&&L(A),Object.keys(j).length===0&&f.delete(U)}n.remove(A)}function L(A){let b=n.get(A);s.deleteTexture(b.__webglTexture);let U=A.source,j=f.get(U);delete j[b.__cacheKey],a.memory.textures--}function R(A){let b=n.get(A);if(A.depthTexture&&(A.depthTexture.dispose(),n.remove(A.depthTexture)),A.isWebGLCubeRenderTarget)for(let j=0;j<6;j++){if(Array.isArray(b.__webglFramebuffer[j]))for(let Z=0;Z<b.__webglFramebuffer[j].length;Z++)s.deleteFramebuffer(b.__webglFramebuffer[j][Z]);else s.deleteFramebuffer(b.__webglFramebuffer[j]);b.__webglDepthbuffer&&s.deleteRenderbuffer(b.__webglDepthbuffer[j])}else{if(Array.isArray(b.__webglFramebuffer))for(let j=0;j<b.__webglFramebuffer.length;j++)s.deleteFramebuffer(b.__webglFramebuffer[j]);else s.deleteFramebuffer(b.__webglFramebuffer);if(b.__webglDepthbuffer&&s.deleteRenderbuffer(b.__webglDepthbuffer),b.__webglMultisampledFramebuffer&&s.deleteFramebuffer(b.__webglMultisampledFramebuffer),b.__webglColorRenderbuffer)for(let j=0;j<b.__webglColorRenderbuffer.length;j++)b.__webglColorRenderbuffer[j]&&s.deleteRenderbuffer(b.__webglColorRenderbuffer[j]);b.__webglDepthRenderbuffer&&s.deleteRenderbuffer(b.__webglDepthRenderbuffer)}let U=A.textures;for(let j=0,Z=U.length;j<Z;j++){let ee=n.get(U[j]);ee.__webglTexture&&(s.deleteTexture(ee.__webglTexture),a.memory.textures--),n.remove(U[j])}n.remove(A)}let O=0;function H(){O=0}function q(){return O}function N(A){O=A}function z(){let A=O;return A>=i.maxTextures&&_e("WebGLTextures: Trying to use "+A+" texture units while this GPU supports only "+i.maxTextures),O+=1,A}function V(A){let b=[];return b.push(A.wrapS),b.push(A.wrapT),b.push(A.wrapR||0),b.push(A.magFilter),b.push(A.minFilter),b.push(A.anisotropy),b.push(A.internalFormat),b.push(A.format),b.push(A.type),b.push(A.generateMipmaps),b.push(A.premultiplyAlpha),b.push(A.flipY),b.push(A.unpackAlignment),b.push(A.colorSpace),b.join()}function $(A,b){let U=n.get(A);if(A.isVideoTexture&&rt(A),A.isRenderTargetTexture===!1&&A.isExternalTexture!==!0&&A.version>0&&U.__version!==A.version){let j=A.image;if(j===null)_e("WebGLRenderer: Texture marked for update but no image data found.");else if(j.complete===!1)_e("WebGLRenderer: Texture marked for update but image is incomplete");else{Ee(U,A,b);return}}else A.isExternalTexture&&(U.__webglTexture=A.sourceTexture?A.sourceTexture:null);t.bindTexture(s.TEXTURE_2D,U.__webglTexture,s.TEXTURE0+b)}function Q(A,b){let U=n.get(A);if(A.isRenderTargetTexture===!1&&A.version>0&&U.__version!==A.version){Ee(U,A,b);return}else A.isExternalTexture&&(U.__webglTexture=A.sourceTexture?A.sourceTexture:null);t.bindTexture(s.TEXTURE_2D_ARRAY,U.__webglTexture,s.TEXTURE0+b)}function le(A,b){let U=n.get(A);if(A.isRenderTargetTexture===!1&&A.version>0&&U.__version!==A.version){Ee(U,A,b);return}t.bindTexture(s.TEXTURE_3D,U.__webglTexture,s.TEXTURE0+b)}function xe(A,b){let U=n.get(A);if(A.isCubeDepthTexture!==!0&&A.version>0&&U.__version!==A.version){Ie(U,A,b);return}t.bindTexture(s.TEXTURE_CUBE_MAP,U.__webglTexture,s.TEXTURE0+b)}let Se={[li]:s.REPEAT,[nn]:s.CLAMP_TO_EDGE,[hs]:s.MIRRORED_REPEAT},Xe={[xt]:s.NEAREST,[to]:s.NEAREST_MIPMAP_NEAREST,[Gi]:s.NEAREST_MIPMAP_LINEAR,[_t]:s.LINEAR,[Ts]:s.LINEAR_MIPMAP_NEAREST,[xn]:s.LINEAR_MIPMAP_LINEAR},Ze={[Wu]:s.NEVER,[Ju]:s.ALWAYS,[qu]:s.LESS,[Go]:s.LEQUAL,[Xu]:s.EQUAL,[Vo]:s.GEQUAL,[ju]:s.GREATER,[Ku]:s.NOTEQUAL};function Fe(A,b){if(b.type===$t&&e.has("OES_texture_float_linear")===!1&&(b.magFilter===_t||b.magFilter===Ts||b.magFilter===Gi||b.magFilter===xn||b.minFilter===_t||b.minFilter===Ts||b.minFilter===Gi||b.minFilter===xn)&&_e("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(A,s.TEXTURE_WRAP_S,Se[b.wrapS]),s.texParameteri(A,s.TEXTURE_WRAP_T,Se[b.wrapT]),(A===s.TEXTURE_3D||A===s.TEXTURE_2D_ARRAY)&&s.texParameteri(A,s.TEXTURE_WRAP_R,Se[b.wrapR]),s.texParameteri(A,s.TEXTURE_MAG_FILTER,Xe[b.magFilter]),s.texParameteri(A,s.TEXTURE_MIN_FILTER,Xe[b.minFilter]),b.compareFunction&&(s.texParameteri(A,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(A,s.TEXTURE_COMPARE_FUNC,Ze[b.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(b.magFilter===xt||b.minFilter!==Gi&&b.minFilter!==xn||b.type===$t&&e.has("OES_texture_float_linear")===!1)return;if(b.anisotropy>1||n.get(b).__currentAnisotropy){let U=e.get("EXT_texture_filter_anisotropic");s.texParameterf(A,U.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,i.getMaxAnisotropy())),n.get(b).__currentAnisotropy=b.anisotropy}}}function J(A,b){let U=!1;A.__webglInit===void 0&&(A.__webglInit=!0,b.addEventListener("dispose",C));let j=b.source,Z=f.get(j);Z===void 0&&(Z={},f.set(j,Z));let ee=V(b);if(ee!==A.__cacheKey){Z[ee]===void 0&&(Z[ee]={texture:s.createTexture(),usedTimes:0},a.memory.textures++,U=!0),Z[ee].usedTimes++;let ae=Z[A.__cacheKey];ae!==void 0&&(Z[A.__cacheKey].usedTimes--,ae.usedTimes===0&&L(b)),A.__cacheKey=ee,A.__webglTexture=Z[ee].texture}return U}function de(A,b,U){return Math.floor(Math.floor(A/U)/b)}function ie(A,b,U,j){let ee=A.updateRanges;if(ee.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,b.width,b.height,U,j,b.data);else{ee.sort((ge,se)=>ge.start-se.start);let ae=0;for(let ge=1;ge<ee.length;ge++){let se=ee[ae],te=ee[ge],Ce=se.start+se.count,Ne=de(te.start,b.width,4),Ke=de(se.start,b.width,4);te.start<=Ce+1&&Ne===Ke&&de(te.start+te.count-1,b.width,4)===Ne?se.count=Math.max(se.count,te.start+te.count-se.start):(++ae,ee[ae]=te)}ee.length=ae+1;let W=t.getParameter(s.UNPACK_ROW_LENGTH),K=t.getParameter(s.UNPACK_SKIP_PIXELS),fe=t.getParameter(s.UNPACK_SKIP_ROWS);t.pixelStorei(s.UNPACK_ROW_LENGTH,b.width);for(let ge=0,se=ee.length;ge<se;ge++){let te=ee[ge],Ce=Math.floor(te.start/4),Ne=Math.ceil(te.count/4),Ke=Ce%b.width,P=Math.floor(Ce/b.width),ne=Ne,X=1;t.pixelStorei(s.UNPACK_SKIP_PIXELS,Ke),t.pixelStorei(s.UNPACK_SKIP_ROWS,P),t.texSubImage2D(s.TEXTURE_2D,0,Ke,P,ne,X,U,j,b.data)}A.clearUpdateRanges(),t.pixelStorei(s.UNPACK_ROW_LENGTH,W),t.pixelStorei(s.UNPACK_SKIP_PIXELS,K),t.pixelStorei(s.UNPACK_SKIP_ROWS,fe)}}function Ee(A,b,U){let j=s.TEXTURE_2D;(b.isDataArrayTexture||b.isCompressedArrayTexture)&&(j=s.TEXTURE_2D_ARRAY),b.isData3DTexture&&(j=s.TEXTURE_3D);let Z=J(A,b),ee=b.source;t.bindTexture(j,A.__webglTexture,s.TEXTURE0+U);let ae=n.get(ee);if(ee.version!==ae.__version||Z===!0){if(t.activeTexture(s.TEXTURE0+U),(typeof ImageBitmap<"u"&&b.image instanceof ImageBitmap)===!1){let X=Be.getPrimaries(Be.workingColorSpace),pe=b.colorSpace===Zn?null:Be.getPrimaries(b.colorSpace),re=b.colorSpace===Zn||X===pe?s.NONE:s.BROWSER_DEFAULT_WEBGL;t.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,b.flipY),t.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),t.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,re)}t.pixelStorei(s.UNPACK_ALIGNMENT,b.unpackAlignment);let K=m(b.image,!1,i.maxTextureSize);K=oe(b,K);let fe=r.convert(b.format,b.colorSpace),ge=r.convert(b.type),se=M(b.internalFormat,fe,ge,b.normalized,b.colorSpace,b.isVideoTexture);Fe(j,b);let te,Ce=b.mipmaps,Ne=b.isVideoTexture!==!0,Ke=ae.__version===void 0||Z===!0,P=ee.dataReady,ne=T(b,K);if(b.isDepthTexture)se=E(b.format===mi,b.type),Ke&&(Ne?t.texStorage2D(s.TEXTURE_2D,1,se,K.width,K.height):t.texImage2D(s.TEXTURE_2D,0,se,K.width,K.height,0,fe,ge,null));else if(b.isDataTexture)if(Ce.length>0){Ne&&Ke&&t.texStorage2D(s.TEXTURE_2D,ne,se,Ce[0].width,Ce[0].height);for(let X=0,pe=Ce.length;X<pe;X++)te=Ce[X],Ne?P&&t.texSubImage2D(s.TEXTURE_2D,X,0,0,te.width,te.height,fe,ge,te.data):t.texImage2D(s.TEXTURE_2D,X,se,te.width,te.height,0,fe,ge,te.data);b.generateMipmaps=!1}else Ne?(Ke&&t.texStorage2D(s.TEXTURE_2D,ne,se,K.width,K.height),P&&ie(b,K,fe,ge)):t.texImage2D(s.TEXTURE_2D,0,se,K.width,K.height,0,fe,ge,K.data);else if(b.isCompressedTexture)if(b.isCompressedArrayTexture){Ne&&Ke&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ne,se,Ce[0].width,Ce[0].height,K.depth);for(let X=0,pe=Ce.length;X<pe;X++)if(te=Ce[X],b.format!==Qt)if(fe!==null)if(Ne){if(P)if(b.layerUpdates.size>0){let re=vl(te.width,te.height,b.format,b.type);for(let Y of b.layerUpdates){let ye=te.data.subarray(Y*re/te.data.BYTES_PER_ELEMENT,(Y+1)*re/te.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,X,0,0,Y,te.width,te.height,1,fe,ye)}b.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,X,0,0,0,te.width,te.height,K.depth,fe,te.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,X,se,te.width,te.height,K.depth,0,te.data,0,0);else _e("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Ne?P&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,X,0,0,0,te.width,te.height,K.depth,fe,ge,te.data):t.texImage3D(s.TEXTURE_2D_ARRAY,X,se,te.width,te.height,K.depth,0,fe,ge,te.data)}else{Ne&&Ke&&t.texStorage2D(s.TEXTURE_2D,ne,se,Ce[0].width,Ce[0].height);for(let X=0,pe=Ce.length;X<pe;X++)te=Ce[X],b.format!==Qt?fe!==null?Ne?P&&t.compressedTexSubImage2D(s.TEXTURE_2D,X,0,0,te.width,te.height,fe,te.data):t.compressedTexImage2D(s.TEXTURE_2D,X,se,te.width,te.height,0,te.data):_e("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ne?P&&t.texSubImage2D(s.TEXTURE_2D,X,0,0,te.width,te.height,fe,ge,te.data):t.texImage2D(s.TEXTURE_2D,X,se,te.width,te.height,0,fe,ge,te.data)}else if(b.isDataArrayTexture)if(Ne){if(Ke&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ne,se,K.width,K.height,K.depth),P)if(b.layerUpdates.size>0){let X=vl(K.width,K.height,b.format,b.type);for(let pe of b.layerUpdates){let re=K.data.subarray(pe*X/K.data.BYTES_PER_ELEMENT,(pe+1)*X/K.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,pe,K.width,K.height,1,fe,ge,re)}b.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,K.width,K.height,K.depth,fe,ge,K.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,se,K.width,K.height,K.depth,0,fe,ge,K.data);else if(b.isData3DTexture)Ne?(Ke&&t.texStorage3D(s.TEXTURE_3D,ne,se,K.width,K.height,K.depth),P&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,K.width,K.height,K.depth,fe,ge,K.data)):t.texImage3D(s.TEXTURE_3D,0,se,K.width,K.height,K.depth,0,fe,ge,K.data);else if(b.isFramebufferTexture){if(Ke)if(Ne)t.texStorage2D(s.TEXTURE_2D,ne,se,K.width,K.height);else{let X=K.width,pe=K.height;for(let re=0;re<ne;re++)t.texImage2D(s.TEXTURE_2D,re,se,X,pe,0,fe,ge,null),X>>=1,pe>>=1}}else if(b.isHTMLTexture){if("texElementImage2D"in s){let X=s.canvas;if(X.hasAttribute("layoutsubtree")||X.setAttribute("layoutsubtree","true"),K.parentNode!==X){X.appendChild(K),u.add(b),X.onpaint=Le=>{let pt=Le.changedElements;for(let Qe of u)pt.includes(Qe.image)&&(Qe.needsUpdate=!0)},X.requestPaint();return}let pe=0,re=s.RGBA,Y=s.RGBA,ye=s.UNSIGNED_BYTE;s.texElementImage2D(s.TEXTURE_2D,pe,re,Y,ye,K),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE)}}else if(Ce.length>0){if(Ne&&Ke){let X=dt(Ce[0]);t.texStorage2D(s.TEXTURE_2D,ne,se,X.width,X.height)}for(let X=0,pe=Ce.length;X<pe;X++)te=Ce[X],Ne?P&&t.texSubImage2D(s.TEXTURE_2D,X,0,0,fe,ge,te):t.texImage2D(s.TEXTURE_2D,X,se,fe,ge,te);b.generateMipmaps=!1}else if(Ne){if(Ke){let X=dt(K);t.texStorage2D(s.TEXTURE_2D,ne,se,X.width,X.height)}P&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,fe,ge,K)}else t.texImage2D(s.TEXTURE_2D,0,se,fe,ge,K);p(b)&&v(j),ae.__version=ee.version,b.onUpdate&&b.onUpdate(b)}A.__version=b.version}function Ie(A,b,U){if(b.image.length!==6)return;let j=J(A,b),Z=b.source;t.bindTexture(s.TEXTURE_CUBE_MAP,A.__webglTexture,s.TEXTURE0+U);let ee=n.get(Z);if(Z.version!==ee.__version||j===!0){t.activeTexture(s.TEXTURE0+U);let ae=Be.getPrimaries(Be.workingColorSpace),W=b.colorSpace===Zn?null:Be.getPrimaries(b.colorSpace),K=b.colorSpace===Zn||ae===W?s.NONE:s.BROWSER_DEFAULT_WEBGL;t.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,b.flipY),t.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),t.pixelStorei(s.UNPACK_ALIGNMENT,b.unpackAlignment),t.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,K);let fe=b.isCompressedTexture||b.image[0].isCompressedTexture,ge=b.image[0]&&b.image[0].isDataTexture,se=[];for(let Y=0;Y<6;Y++)!fe&&!ge?se[Y]=m(b.image[Y],!0,i.maxCubemapSize):se[Y]=ge?b.image[Y].image:b.image[Y],se[Y]=oe(b,se[Y]);let te=se[0],Ce=r.convert(b.format,b.colorSpace),Ne=r.convert(b.type),Ke=M(b.internalFormat,Ce,Ne,b.normalized,b.colorSpace),P=b.isVideoTexture!==!0,ne=ee.__version===void 0||j===!0,X=Z.dataReady,pe=T(b,te);Fe(s.TEXTURE_CUBE_MAP,b);let re;if(fe){P&&ne&&t.texStorage2D(s.TEXTURE_CUBE_MAP,pe,Ke,te.width,te.height);for(let Y=0;Y<6;Y++){re=se[Y].mipmaps;for(let ye=0;ye<re.length;ye++){let Le=re[ye];b.format!==Qt?Ce!==null?P?X&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,ye,0,0,Le.width,Le.height,Ce,Le.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,ye,Ke,Le.width,Le.height,0,Le.data):_e("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,ye,0,0,Le.width,Le.height,Ce,Ne,Le.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,ye,Ke,Le.width,Le.height,0,Ce,Ne,Le.data)}}}else{if(re=b.mipmaps,P&&ne){re.length>0&&pe++;let Y=dt(se[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,pe,Ke,Y.width,Y.height)}for(let Y=0;Y<6;Y++)if(ge){P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,0,0,0,se[Y].width,se[Y].height,Ce,Ne,se[Y].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,0,Ke,se[Y].width,se[Y].height,0,Ce,Ne,se[Y].data);for(let ye=0;ye<re.length;ye++){let pt=re[ye].image[Y].image;P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,ye+1,0,0,pt.width,pt.height,Ce,Ne,pt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,ye+1,Ke,pt.width,pt.height,0,Ce,Ne,pt.data)}}else{P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,0,0,0,Ce,Ne,se[Y]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,0,Ke,Ce,Ne,se[Y]);for(let ye=0;ye<re.length;ye++){let Le=re[ye];P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,ye+1,0,0,Ce,Ne,Le.image[Y]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Y,ye+1,Ke,Ce,Ne,Le.image[Y])}}}p(b)&&v(s.TEXTURE_CUBE_MAP),ee.__version=Z.version,b.onUpdate&&b.onUpdate(b)}A.__version=b.version}function Re(A,b,U,j,Z,ee){let ae=r.convert(U.format,U.colorSpace),W=r.convert(U.type),K=M(U.internalFormat,ae,W,U.normalized,U.colorSpace),fe=n.get(b),ge=n.get(U);if(ge.__renderTarget=b,!fe.__hasExternalTextures){let se=Math.max(1,b.width>>ee),te=Math.max(1,b.height>>ee);Z===s.TEXTURE_3D||Z===s.TEXTURE_2D_ARRAY?t.texImage3D(Z,ee,K,se,te,b.depth,0,ae,W,null):t.texImage2D(Z,ee,K,se,te,0,ae,W,null)}t.bindFramebuffer(s.FRAMEBUFFER,A),qe(b)?o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,j,Z,ge.__webglTexture,0,Tt(b)):(Z===s.TEXTURE_2D||Z>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&Z<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,j,Z,ge.__webglTexture,ee),t.bindFramebuffer(s.FRAMEBUFFER,null)}function ht(A,b,U){if(s.bindRenderbuffer(s.RENDERBUFFER,A),b.depthBuffer){let j=b.depthTexture,Z=j&&j.isDepthTexture?j.type:null,ee=E(b.stencilBuffer,Z),ae=b.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;qe(b)?o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Tt(b),ee,b.width,b.height):U?s.renderbufferStorageMultisample(s.RENDERBUFFER,Tt(b),ee,b.width,b.height):s.renderbufferStorage(s.RENDERBUFFER,ee,b.width,b.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,ae,s.RENDERBUFFER,A)}else{let j=b.textures;for(let Z=0;Z<j.length;Z++){let ee=j[Z],ae=r.convert(ee.format,ee.colorSpace),W=r.convert(ee.type),K=M(ee.internalFormat,ae,W,ee.normalized,ee.colorSpace);qe(b)?o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Tt(b),K,b.width,b.height):U?s.renderbufferStorageMultisample(s.RENDERBUFFER,Tt(b),K,b.width,b.height):s.renderbufferStorage(s.RENDERBUFFER,K,b.width,b.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function We(A,b,U){let j=b.isWebGLCubeRenderTarget===!0;if(t.bindFramebuffer(s.FRAMEBUFFER,A),!(b.depthTexture&&b.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");let Z=n.get(b.depthTexture);if(Z.__renderTarget=b,(!Z.__webglTexture||b.depthTexture.image.width!==b.width||b.depthTexture.image.height!==b.height)&&(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0),j){if(Z.__webglInit===void 0&&(Z.__webglInit=!0,b.depthTexture.addEventListener("dispose",C)),Z.__webglTexture===void 0){Z.__webglTexture=s.createTexture(),t.bindTexture(s.TEXTURE_CUBE_MAP,Z.__webglTexture),Fe(s.TEXTURE_CUBE_MAP,b.depthTexture);let fe=r.convert(b.depthTexture.format),ge=r.convert(b.depthTexture.type),se;b.depthTexture.format===Tn?se=s.DEPTH_COMPONENT24:b.depthTexture.format===mi&&(se=s.DEPTH24_STENCIL8);for(let te=0;te<6;te++)s.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+te,0,se,b.width,b.height,0,fe,ge,null)}}else $(b.depthTexture,0);let ee=Z.__webglTexture,ae=Tt(b),W=j?s.TEXTURE_CUBE_MAP_POSITIVE_X+U:s.TEXTURE_2D,K=b.depthTexture.format===mi?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;if(b.depthTexture.format===Tn)qe(b)?o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,K,W,ee,0,ae):s.framebufferTexture2D(s.FRAMEBUFFER,K,W,ee,0);else if(b.depthTexture.format===mi)qe(b)?o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,K,W,ee,0,ae):s.framebufferTexture2D(s.FRAMEBUFFER,K,W,ee,0);else throw new Error("Unknown depthTexture format")}function $e(A){let b=n.get(A),U=A.isWebGLCubeRenderTarget===!0;if(b.__boundDepthTexture!==A.depthTexture){let j=A.depthTexture;if(b.__depthDisposeCallback&&b.__depthDisposeCallback(),j){let Z=()=>{delete b.__boundDepthTexture,delete b.__depthDisposeCallback,j.removeEventListener("dispose",Z)};j.addEventListener("dispose",Z),b.__depthDisposeCallback=Z}b.__boundDepthTexture=j}if(A.depthTexture&&!b.__autoAllocateDepthBuffer)if(U)for(let j=0;j<6;j++)We(b.__webglFramebuffer[j],A,j);else{let j=A.texture.mipmaps;j&&j.length>0?We(b.__webglFramebuffer[0],A,0):We(b.__webglFramebuffer,A,0)}else if(U){b.__webglDepthbuffer=[];for(let j=0;j<6;j++)if(t.bindFramebuffer(s.FRAMEBUFFER,b.__webglFramebuffer[j]),b.__webglDepthbuffer[j]===void 0)b.__webglDepthbuffer[j]=s.createRenderbuffer(),ht(b.__webglDepthbuffer[j],A,!1);else{let Z=A.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ee=b.__webglDepthbuffer[j];s.bindRenderbuffer(s.RENDERBUFFER,ee),s.framebufferRenderbuffer(s.FRAMEBUFFER,Z,s.RENDERBUFFER,ee)}}else{let j=A.texture.mipmaps;if(j&&j.length>0?t.bindFramebuffer(s.FRAMEBUFFER,b.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,b.__webglFramebuffer),b.__webglDepthbuffer===void 0)b.__webglDepthbuffer=s.createRenderbuffer(),ht(b.__webglDepthbuffer,A,!1);else{let Z=A.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ee=b.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,ee),s.framebufferRenderbuffer(s.FRAMEBUFFER,Z,s.RENDERBUFFER,ee)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function ot(A,b,U){let j=n.get(A);b!==void 0&&Re(j.__webglFramebuffer,A,A.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),U!==void 0&&$e(A)}function Ge(A){let b=A.texture,U=n.get(A),j=n.get(b);A.addEventListener("dispose",x);let Z=A.textures,ee=A.isWebGLCubeRenderTarget===!0,ae=Z.length>1;if(ae||(j.__webglTexture===void 0&&(j.__webglTexture=s.createTexture()),j.__version=b.version,a.memory.textures++),ee){U.__webglFramebuffer=[];for(let W=0;W<6;W++)if(b.mipmaps&&b.mipmaps.length>0){U.__webglFramebuffer[W]=[];for(let K=0;K<b.mipmaps.length;K++)U.__webglFramebuffer[W][K]=s.createFramebuffer()}else U.__webglFramebuffer[W]=s.createFramebuffer()}else{if(b.mipmaps&&b.mipmaps.length>0){U.__webglFramebuffer=[];for(let W=0;W<b.mipmaps.length;W++)U.__webglFramebuffer[W]=s.createFramebuffer()}else U.__webglFramebuffer=s.createFramebuffer();if(ae)for(let W=0,K=Z.length;W<K;W++){let fe=n.get(Z[W]);fe.__webglTexture===void 0&&(fe.__webglTexture=s.createTexture(),a.memory.textures++)}if(A.samples>0&&qe(A)===!1){U.__webglMultisampledFramebuffer=s.createFramebuffer(),U.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,U.__webglMultisampledFramebuffer);for(let W=0;W<Z.length;W++){let K=Z[W];U.__webglColorRenderbuffer[W]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,U.__webglColorRenderbuffer[W]);let fe=r.convert(K.format,K.colorSpace),ge=r.convert(K.type),se=M(K.internalFormat,fe,ge,K.normalized,K.colorSpace,A.isXRRenderTarget===!0),te=Tt(A);s.renderbufferStorageMultisample(s.RENDERBUFFER,te,se,A.width,A.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+W,s.RENDERBUFFER,U.__webglColorRenderbuffer[W])}s.bindRenderbuffer(s.RENDERBUFFER,null),A.depthBuffer&&(U.__webglDepthRenderbuffer=s.createRenderbuffer(),ht(U.__webglDepthRenderbuffer,A,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(ee){t.bindTexture(s.TEXTURE_CUBE_MAP,j.__webglTexture),Fe(s.TEXTURE_CUBE_MAP,b);for(let W=0;W<6;W++)if(b.mipmaps&&b.mipmaps.length>0)for(let K=0;K<b.mipmaps.length;K++)Re(U.__webglFramebuffer[W][K],A,b,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+W,K);else Re(U.__webglFramebuffer[W],A,b,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+W,0);p(b)&&v(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(ae){for(let W=0,K=Z.length;W<K;W++){let fe=Z[W],ge=n.get(fe),se=s.TEXTURE_2D;(A.isWebGL3DRenderTarget||A.isWebGLArrayRenderTarget)&&(se=A.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(se,ge.__webglTexture),Fe(se,fe),Re(U.__webglFramebuffer,A,fe,s.COLOR_ATTACHMENT0+W,se,0),p(fe)&&v(se)}t.unbindTexture()}else{let W=s.TEXTURE_2D;if((A.isWebGL3DRenderTarget||A.isWebGLArrayRenderTarget)&&(W=A.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(W,j.__webglTexture),Fe(W,b),b.mipmaps&&b.mipmaps.length>0)for(let K=0;K<b.mipmaps.length;K++)Re(U.__webglFramebuffer[K],A,b,s.COLOR_ATTACHMENT0,W,K);else Re(U.__webglFramebuffer,A,b,s.COLOR_ATTACHMENT0,W,0);p(b)&&v(W),t.unbindTexture()}A.depthBuffer&&$e(A)}function At(A){let b=A.textures;for(let U=0,j=b.length;U<j;U++){let Z=b[U];if(p(Z)){let ee=S(A),ae=n.get(Z).__webglTexture;t.bindTexture(ee,ae),v(ee),t.unbindTexture()}}}let ut=[],Xt=[];function I(A){if(A.samples>0){if(qe(A)===!1){let b=A.textures,U=A.width,j=A.height,Z=s.COLOR_BUFFER_BIT,ee=A.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ae=n.get(A),W=b.length>1;if(W)for(let fe=0;fe<b.length;fe++)t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+fe,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+fe,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,ae.__webglMultisampledFramebuffer);let K=A.texture.mipmaps;K&&K.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,ae.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,ae.__webglFramebuffer);for(let fe=0;fe<b.length;fe++){if(A.resolveDepthBuffer&&(A.depthBuffer&&(Z|=s.DEPTH_BUFFER_BIT),A.stencilBuffer&&A.resolveStencilBuffer&&(Z|=s.STENCIL_BUFFER_BIT)),W){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,ae.__webglColorRenderbuffer[fe]);let ge=n.get(b[fe]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,ge,0)}s.blitFramebuffer(0,0,U,j,0,0,U,j,Z,s.NEAREST),c===!0&&(ut.length=0,Xt.length=0,ut.push(s.COLOR_ATTACHMENT0+fe),A.depthBuffer&&A.resolveDepthBuffer===!1&&(ut.push(ee),Xt.push(ee),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,Xt)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,ut))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),W)for(let fe=0;fe<b.length;fe++){t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+fe,s.RENDERBUFFER,ae.__webglColorRenderbuffer[fe]);let ge=n.get(b[fe]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+fe,s.TEXTURE_2D,ge,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,ae.__webglMultisampledFramebuffer)}else if(A.depthBuffer&&A.resolveDepthBuffer===!1&&c){let b=A.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[b])}}}function Tt(A){return Math.min(i.maxSamples,A.samples)}function qe(A){let b=n.get(A);return A.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&b.__useRenderToTexture!==!1}function rt(A){let b=a.render.frame;h.get(A)!==b&&(h.set(A,b),A.update())}function oe(A,b){let U=A.colorSpace,j=A.format,Z=A.type;return A.isCompressedTexture===!0||A.isVideoTexture===!0||U!==kt&&U!==Zn&&(Be.getTransfer(U)===Je?(j!==Qt||Z!==qt)&&_e("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):we("WebGLTextures: Unsupported texture color space:",U)),b}function dt(A){return typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement?(l.width=A.naturalWidth||A.width,l.height=A.naturalHeight||A.height):typeof VideoFrame<"u"&&A instanceof VideoFrame?(l.width=A.displayWidth,l.height=A.displayHeight):(l.width=A.width,l.height=A.height),l}this.allocateTextureUnit=z,this.resetTextureUnits=H,this.getTextureUnits=q,this.setTextureUnits=N,this.setTexture2D=$,this.setTexture2DArray=Q,this.setTexture3D=le,this.setTextureCube=xe,this.rebindTextures=ot,this.setupRenderTarget=Ge,this.updateRenderTargetMipmap=At,this.updateMultisampleRenderTarget=I,this.setupDepthRenderbuffer=$e,this.setupFrameBufferTexture=Re,this.useMultisampledRTT=qe,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function Y0(s,e){function t(n,i=Zn){let r,a=Be.getTransfer(i);if(n===qt)return s.UNSIGNED_BYTE;if(n===io)return s.UNSIGNED_SHORT_4_4_4_4;if(n===so)return s.UNSIGNED_SHORT_5_5_5_1;if(n===hl)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===ul)return s.UNSIGNED_INT_10F_11F_11F_REV;if(n===cl)return s.BYTE;if(n===ll)return s.SHORT;if(n===ws)return s.UNSIGNED_SHORT;if(n===no)return s.INT;if(n===_n)return s.UNSIGNED_INT;if(n===$t)return s.FLOAT;if(n===Fn)return s.HALF_FLOAT;if(n===dl)return s.ALPHA;if(n===fl)return s.RGB;if(n===Qt)return s.RGBA;if(n===Tn)return s.DEPTH_COMPONENT;if(n===mi)return s.DEPTH_STENCIL;if(n===ro)return s.RED;if(n===ao)return s.RED_INTEGER;if(n===gi)return s.RG;if(n===oo)return s.RG_INTEGER;if(n===co)return s.RGBA_INTEGER;if(n===Tr||n===wr||n===Er||n===Rr)if(a===Je)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(n===Tr)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===wr)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Er)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Rr)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(n===Tr)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===wr)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Er)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Rr)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===lo||n===ho||n===uo||n===fo)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(n===lo)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ho)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===uo)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===fo)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===po||n===mo||n===go||n===bo||n===xo||n===Cr||n===_o)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(n===po||n===mo)return a===Je?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===go)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC;if(n===bo)return r.COMPRESSED_R11_EAC;if(n===xo)return r.COMPRESSED_SIGNED_R11_EAC;if(n===Cr)return r.COMPRESSED_RG11_EAC;if(n===_o)return r.COMPRESSED_SIGNED_RG11_EAC}else return null;if(n===vo||n===yo||n===Mo||n===So||n===Ao||n===To||n===wo||n===Eo||n===Ro||n===Co||n===Po||n===Io||n===Lo||n===Do)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(n===vo)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===yo)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Mo)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===So)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===Ao)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===To)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===wo)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===Eo)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Ro)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Co)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Po)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===Io)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Lo)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Do)return a===Je?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===Fo||n===No||n===Uo)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(n===Fo)return a===Je?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===No)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Uo)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Oo||n===ko||n===Pr||n===Bo)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(n===Oo)return r.COMPRESSED_RED_RGTC1_EXT;if(n===ko)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Pr)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Bo)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===Es?s.UNSIGNED_INT_24_8:s[n]!==void 0?s[n]:null}return{convert:t}}var Z0=`
+}`,ox=[new F(1,0,0),new F(-1,0,0),new F(0,1,0),new F(0,-1,0),new F(0,0,1),new F(0,0,-1)],cx=[new F(0,-1,0),new F(0,-1,0),new F(0,0,1),new F(0,0,-1),new F(0,-1,0),new F(0,-1,0)],kd=new Ue,Br=new F,zl=new F;function lx(s,e,t){let n=new Ss,i=new He,r=new He,a=new nt,o=new Wa,c=new qa,l={},h=t.maxTextureSize,u={[mn]:Pt,[Pt]:mn,[rn]:rn},d=new $t({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new He},radius:{value:4}},vertexShader:rx,fragmentShader:ax}),f=d.clone();f.defines.HORIZONTAL_PASS=1;let g=new zt;g.setAttribute("position",new St(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let _=new lt(g,d),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Tr;let p=this.type;this.render=function(T,C,x){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||T.length===0)return;this.type===Pu&&(_e("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),this.type=Tr);let w=s.getRenderTarget(),L=s.getActiveCubeFace(),R=s.getActiveMipmapLevel(),O=s.state;O.setBlending(Nn),O.buffers.depth.getReversed()===!0?O.buffers.color.setClear(0,0,0,0):O.buffers.color.setClear(1,1,1,1),O.buffers.depth.setTest(!0),O.setScissorTest(!1);let H=p!==this.type;H&&C.traverse(function(q){q.material&&(Array.isArray(q.material)?q.material.forEach(N=>N.needsUpdate=!0):q.material.needsUpdate=!0)});for(let q=0,N=T.length;q<N;q++){let z=T[q],V=z.shadow;if(V===void 0){_e("WebGLShadowMap:",z,"has no shadow.");continue}if(V.autoUpdate===!1&&V.needsUpdate===!1)continue;i.copy(V.mapSize);let Z=V.getFrameExtents();i.multiply(Z),r.copy(V.mapSize),(i.x>h||i.y>h)&&(i.x>h&&(r.x=Math.floor(h/Z.x),i.x=r.x*Z.x,V.mapSize.x=r.x),i.y>h&&(r.y=Math.floor(h/Z.y),i.y=r.y*Z.y,V.mapSize.y=r.y));let Q=s.state.buffers.depth.getReversed();if(V.camera._reversedDepth=Q,V.map===null||H===!0){if(V.map!==null&&(V.map.depthTexture!==null&&(V.map.depthTexture.dispose(),V.map.depthTexture=null),V.map.dispose()),this.type===Es){if(z.isPointLight){_e("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}V.map=new Jt(i.x,i.y,{format:xi,type:Un,minFilter:_t,magFilter:_t,generateMipmaps:!1}),V.map.texture.name=z.name+".shadowMap",V.map.depthTexture=new Yn(i.x,i.y,Zt),V.map.depthTexture.name=z.name+".shadowMapDepth",V.map.depthTexture.format=En,V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=xt,V.map.depthTexture.magFilter=xt}else z.isPointLight?(V.map=new Jo(i.x),V.map.depthTexture=new Va(i.x,vn)):(V.map=new Jt(i.x,i.y),V.map.depthTexture=new Yn(i.x,i.y,vn)),V.map.depthTexture.name=z.name+".shadowMap",V.map.depthTexture.format=En,this.type===Tr?(V.map.depthTexture.compareFunction=Q?jo:Xo,V.map.depthTexture.minFilter=_t,V.map.depthTexture.magFilter=_t):(V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=xt,V.map.depthTexture.magFilter=xt);V.camera.updateProjectionMatrix()}let le=V.map.isWebGLCubeRenderTarget?6:1;for(let xe=0;xe<le;xe++){if(V.map.isWebGLCubeRenderTarget)s.setRenderTarget(V.map,xe),s.clear();else{xe===0&&(s.setRenderTarget(V.map),s.clear());let Se=V.getViewport(xe);a.set(r.x*Se.x,r.y*Se.y,r.x*Se.z,r.y*Se.w),O.viewport(a)}if(z.isPointLight){let Se=V.camera,Xe=V.matrix,$e=z.distance||Se.far;$e!==Se.far&&(Se.far=$e,Se.updateProjectionMatrix()),Br.setFromMatrixPosition(z.matrixWorld),Se.position.copy(Br),zl.copy(Se.position),zl.add(ox[xe]),Se.up.copy(cx[xe]),Se.lookAt(zl),Se.updateMatrixWorld(),Xe.makeTranslation(-Br.x,-Br.y,-Br.z),kd.multiplyMatrices(Se.projectionMatrix,Se.matrixWorldInverse),V._frustum.setFromProjectionMatrix(kd,Se.coordinateSystem,Se.reversedDepth)}else V.updateMatrices(z);n=V.getFrustum(),M(C,x,V.camera,z,this.type)}V.isPointLightShadow!==!0&&this.type===Es&&v(V,x),V.needsUpdate=!1}p=this.type,m.needsUpdate=!1,s.setRenderTarget(w,L,R)};function v(T,C){let x=e.update(_);d.defines.VSM_SAMPLES!==T.blurSamples&&(d.defines.VSM_SAMPLES=T.blurSamples,f.defines.VSM_SAMPLES=T.blurSamples,d.needsUpdate=!0,f.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new Jt(i.x,i.y,{format:xi,type:Un})),d.uniforms.shadow_pass.value=T.map.depthTexture,d.uniforms.resolution.value=T.mapSize,d.uniforms.radius.value=T.radius,s.setRenderTarget(T.mapPass),s.clear(),s.renderBufferDirect(C,null,x,d,_,null),f.uniforms.shadow_pass.value=T.mapPass.texture,f.uniforms.resolution.value=T.mapSize,f.uniforms.radius.value=T.radius,s.setRenderTarget(T.map),s.clear(),s.renderBufferDirect(C,null,x,f,_,null)}function S(T,C,x,w){let L=null,R=x.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(R!==void 0)L=R;else if(L=x.isPointLight===!0?c:o,s.localClippingEnabled&&C.clipShadows===!0&&Array.isArray(C.clippingPlanes)&&C.clippingPlanes.length!==0||C.displacementMap&&C.displacementScale!==0||C.alphaMap&&C.alphaTest>0||C.map&&C.alphaTest>0||C.alphaToCoverage===!0){let O=L.uuid,H=C.uuid,q=l[O];q===void 0&&(q={},l[O]=q);let N=q[H];N===void 0&&(N=L.clone(),q[H]=N,C.addEventListener("dispose",E)),L=N}if(L.visible=C.visible,L.wireframe=C.wireframe,w===Es?L.side=C.shadowSide!==null?C.shadowSide:C.side:L.side=C.shadowSide!==null?C.shadowSide:u[C.side],L.alphaMap=C.alphaMap,L.alphaTest=C.alphaToCoverage===!0?.5:C.alphaTest,L.map=C.map,L.clipShadows=C.clipShadows,L.clippingPlanes=C.clippingPlanes,L.clipIntersection=C.clipIntersection,L.displacementMap=C.displacementMap,L.displacementScale=C.displacementScale,L.displacementBias=C.displacementBias,L.wireframeLinewidth=C.wireframeLinewidth,L.linewidth=C.linewidth,x.isPointLight===!0&&L.isMeshDistanceMaterial===!0){let O=s.properties.get(L);O.light=x}return L}function M(T,C,x,w,L){if(T.visible===!1)return;if(T.layers.test(C.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&L===Es)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(x.matrixWorldInverse,T.matrixWorld);let H=e.update(T),q=T.material;if(Array.isArray(q)){let N=H.groups;for(let z=0,V=N.length;z<V;z++){let Z=N[z],Q=q[Z.materialIndex];if(Q&&Q.visible){let le=S(T,Q,w,L);T.onBeforeShadow(s,T,C,x,H,le,Z),s.renderBufferDirect(x,null,H,le,T,Z),T.onAfterShadow(s,T,C,x,H,le,Z)}}}else if(q.visible){let N=S(T,q,w,L);T.onBeforeShadow(s,T,C,x,H,N,null),s.renderBufferDirect(x,null,H,N,T,null),T.onAfterShadow(s,T,C,x,H,N,null)}}let O=T.children;for(let H=0,q=O.length;H<q;H++)M(O[H],C,x,w,L)}function E(T){T.target.removeEventListener("dispose",E);for(let x in l){let w=l[x],L=T.target.uuid;L in w&&(w[L].dispose(),delete w[L])}}}function hx(s,e){function t(){let P=!1,ne=new nt,X=null,pe=new nt(0,0,0,0);return{setMask:function(re){X!==re&&!P&&(s.colorMask(re,re,re,re),X=re)},setLocked:function(re){P=re},setClear:function(re,J,ye,Le,pt){pt===!0&&(re*=Le,J*=Le,ye*=Le),ne.set(re,J,ye,Le),pe.equals(ne)===!1&&(s.clearColor(re,J,ye,Le),pe.copy(ne))},reset:function(){P=!1,X=null,pe.set(-1,0,0,0)}}}function n(){let P=!1,ne=!1,X=null,pe=null,re=null;return{setReversed:function(J){if(ne!==J){let ye=e.get("EXT_clip_control");J?ye.clipControlEXT(ye.LOWER_LEFT_EXT,ye.ZERO_TO_ONE_EXT):ye.clipControlEXT(ye.LOWER_LEFT_EXT,ye.NEGATIVE_ONE_TO_ONE_EXT),ne=J;let Le=re;re=null,this.setClear(Le)}},getReversed:function(){return ne},setTest:function(J){J?ie(s.DEPTH_TEST):Ee(s.DEPTH_TEST)},setMask:function(J){X!==J&&!P&&(s.depthMask(J),X=J)},setFunc:function(J){if(ne&&(J=dd[J]),pe!==J){switch(J){case Ra:s.depthFunc(s.NEVER);break;case Ca:s.depthFunc(s.ALWAYS);break;case Pa:s.depthFunc(s.LESS);break;case Ii:s.depthFunc(s.LEQUAL);break;case Ia:s.depthFunc(s.EQUAL);break;case La:s.depthFunc(s.GEQUAL);break;case Da:s.depthFunc(s.GREATER);break;case Fa:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}pe=J}},setLocked:function(J){P=J},setClear:function(J){re!==J&&(re=J,ne&&(J=1-J),s.clearDepth(J))},reset:function(){P=!1,X=null,pe=null,re=null,ne=!1}}}function i(){let P=!1,ne=null,X=null,pe=null,re=null,J=null,ye=null,Le=null,pt=null;return{setTest:function(Qe){P||(Qe?ie(s.STENCIL_TEST):Ee(s.STENCIL_TEST))},setMask:function(Qe){ne!==Qe&&!P&&(s.stencilMask(Qe),ne=Qe)},setFunc:function(Qe,Gn,Mn){(X!==Qe||pe!==Gn||re!==Mn)&&(s.stencilFunc(Qe,Gn,Mn),X=Qe,pe=Gn,re=Mn)},setOp:function(Qe,Gn,Mn){(J!==Qe||ye!==Gn||Le!==Mn)&&(s.stencilOp(Qe,Gn,Mn),J=Qe,ye=Gn,Le=Mn)},setLocked:function(Qe){P=Qe},setClear:function(Qe){pt!==Qe&&(s.clearStencil(Qe),pt=Qe)},reset:function(){P=!1,ne=null,X=null,pe=null,re=null,J=null,ye=null,Le=null,pt=null}}}let r=new t,a=new n,o=new i,c=new WeakMap,l=new WeakMap,h={},u={},d={},f=new WeakMap,g=[],_=null,m=!1,p=null,v=null,S=null,M=null,E=null,T=null,C=null,x=new Te(0,0,0),w=0,L=!1,R=null,O=null,H=null,q=null,N=null,z=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS),V=!1,Z=0,Q=s.getParameter(s.VERSION);Q.indexOf("WebGL")!==-1?(Z=parseFloat(/^WebGL (\d)/.exec(Q)[1]),V=Z>=1):Q.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),V=Z>=2);let le=null,xe={},Se=s.getParameter(s.SCISSOR_BOX),Xe=s.getParameter(s.VIEWPORT),$e=new nt().fromArray(Se),Fe=new nt().fromArray(Xe);function Y(P,ne,X,pe){let re=new Uint8Array(4),J=s.createTexture();s.bindTexture(P,J),s.texParameteri(P,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(P,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let ye=0;ye<X;ye++)P===s.TEXTURE_3D||P===s.TEXTURE_2D_ARRAY?s.texImage3D(ne,0,s.RGBA,1,1,pe,0,s.RGBA,s.UNSIGNED_BYTE,re):s.texImage2D(ne+ye,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,re);return J}let de={};de[s.TEXTURE_2D]=Y(s.TEXTURE_2D,s.TEXTURE_2D,1),de[s.TEXTURE_CUBE_MAP]=Y(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),de[s.TEXTURE_2D_ARRAY]=Y(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),de[s.TEXTURE_3D]=Y(s.TEXTURE_3D,s.TEXTURE_3D,1,1),r.setClear(0,0,0,1),a.setClear(1),o.setClear(0),ie(s.DEPTH_TEST),a.setFunc(Ii),At(!1),ut(al),ie(s.CULL_FACE),ot(Nn);function ie(P){h[P]!==!0&&(s.enable(P),h[P]=!0)}function Ee(P){h[P]!==!1&&(s.disable(P),h[P]=!1)}function Ie(P,ne){return d[P]!==ne?(s.bindFramebuffer(P,ne),d[P]=ne,P===s.DRAW_FRAMEBUFFER&&(d[s.FRAMEBUFFER]=ne),P===s.FRAMEBUFFER&&(d[s.DRAW_FRAMEBUFFER]=ne),!0):!1}function Re(P,ne){let X=g,pe=!1;if(P){X=f.get(ne),X===void 0&&(X=[],f.set(ne,X));let re=P.textures;if(X.length!==re.length||X[0]!==s.COLOR_ATTACHMENT0){for(let J=0,ye=re.length;J<ye;J++)X[J]=s.COLOR_ATTACHMENT0+J;X.length=re.length,pe=!0}}else X[0]!==s.BACK&&(X[0]=s.BACK,pe=!0);pe&&s.drawBuffers(X)}function ht(P){return _!==P?(s.useProgram(P),_=P,!0):!1}let We={[hi]:s.FUNC_ADD,[Lu]:s.FUNC_SUBTRACT,[Du]:s.FUNC_REVERSE_SUBTRACT};We[Fu]=s.MIN,We[Nu]=s.MAX;let Ze={[Uu]:s.ZERO,[Ou]:s.ONE,[ku]:s.SRC_COLOR,[wa]:s.SRC_ALPHA,[Wu]:s.SRC_ALPHA_SATURATE,[Vu]:s.DST_COLOR,[zu]:s.DST_ALPHA,[Bu]:s.ONE_MINUS_SRC_COLOR,[Ea]:s.ONE_MINUS_SRC_ALPHA,[Hu]:s.ONE_MINUS_DST_COLOR,[Gu]:s.ONE_MINUS_DST_ALPHA,[qu]:s.CONSTANT_COLOR,[Xu]:s.ONE_MINUS_CONSTANT_COLOR,[ju]:s.CONSTANT_ALPHA,[Ku]:s.ONE_MINUS_CONSTANT_ALPHA};function ot(P,ne,X,pe,re,J,ye,Le,pt,Qe){if(P===Nn){m===!0&&(Ee(s.BLEND),m=!1);return}if(m===!1&&(ie(s.BLEND),m=!0),P!==Iu){if(P!==p||Qe!==L){if((v!==hi||E!==hi)&&(s.blendEquation(s.FUNC_ADD),v=hi,E=hi),Qe)switch(P){case Pi:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case ol:s.blendFunc(s.ONE,s.ONE);break;case cl:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case ll:s.blendFuncSeparate(s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ZERO,s.ONE);break;default:we("WebGLState: Invalid blending: ",P);break}else switch(P){case Pi:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case ol:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE,s.ONE,s.ONE);break;case cl:we("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case ll:we("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:we("WebGLState: Invalid blending: ",P);break}S=null,M=null,T=null,C=null,x.set(0,0,0),w=0,p=P,L=Qe}return}re=re||ne,J=J||X,ye=ye||pe,(ne!==v||re!==E)&&(s.blendEquationSeparate(We[ne],We[re]),v=ne,E=re),(X!==S||pe!==M||J!==T||ye!==C)&&(s.blendFuncSeparate(Ze[X],Ze[pe],Ze[J],Ze[ye]),S=X,M=pe,T=J,C=ye),(Le.equals(x)===!1||pt!==w)&&(s.blendColor(Le.r,Le.g,Le.b,pt),x.copy(Le),w=pt),p=P,L=!1}function Ge(P,ne){P.side===rn?Ee(s.CULL_FACE):ie(s.CULL_FACE);let X=P.side===Pt;ne&&(X=!X),At(X),P.blending===Pi&&P.transparent===!1?ot(Nn):ot(P.blending,P.blendEquation,P.blendSrc,P.blendDst,P.blendEquationAlpha,P.blendSrcAlpha,P.blendDstAlpha,P.blendColor,P.blendAlpha,P.premultipliedAlpha),a.setFunc(P.depthFunc),a.setTest(P.depthTest),a.setMask(P.depthWrite),r.setMask(P.colorWrite);let pe=P.stencilWrite;o.setTest(pe),pe&&(o.setMask(P.stencilWriteMask),o.setFunc(P.stencilFunc,P.stencilRef,P.stencilFuncMask),o.setOp(P.stencilFail,P.stencilZFail,P.stencilZPass)),I(P.polygonOffset,P.polygonOffsetFactor,P.polygonOffsetUnits),P.alphaToCoverage===!0?ie(s.SAMPLE_ALPHA_TO_COVERAGE):Ee(s.SAMPLE_ALPHA_TO_COVERAGE)}function At(P){R!==P&&(P?s.frontFace(s.CW):s.frontFace(s.CCW),R=P)}function ut(P){P!==Ru?(ie(s.CULL_FACE),P!==O&&(P===al?s.cullFace(s.BACK):P===Cu?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):Ee(s.CULL_FACE),O=P}function Xt(P){P!==H&&(V&&s.lineWidth(P),H=P)}function I(P,ne,X){P?(ie(s.POLYGON_OFFSET_FILL),(q!==ne||N!==X)&&(q=ne,N=X,a.getReversed()&&(ne=-ne),s.polygonOffset(ne,X))):Ee(s.POLYGON_OFFSET_FILL)}function Tt(P){P?ie(s.SCISSOR_TEST):Ee(s.SCISSOR_TEST)}function qe(P){P===void 0&&(P=s.TEXTURE0+z-1),le!==P&&(s.activeTexture(P),le=P)}function rt(P,ne,X){X===void 0&&(le===null?X=s.TEXTURE0+z-1:X=le);let pe=xe[X];pe===void 0&&(pe={type:void 0,texture:void 0},xe[X]=pe),(pe.type!==P||pe.texture!==ne)&&(le!==X&&(s.activeTexture(X),le=X),s.bindTexture(P,ne||de[P]),pe.type=P,pe.texture=ne)}function oe(){let P=xe[le];P!==void 0&&P.type!==void 0&&(s.bindTexture(P.type,null),P.type=void 0,P.texture=void 0)}function dt(){try{s.compressedTexImage2D(...arguments)}catch(P){we("WebGLState:",P)}}function A(){try{s.compressedTexImage3D(...arguments)}catch(P){we("WebGLState:",P)}}function b(){try{s.texSubImage2D(...arguments)}catch(P){we("WebGLState:",P)}}function U(){try{s.texSubImage3D(...arguments)}catch(P){we("WebGLState:",P)}}function j(){try{s.compressedTexSubImage2D(...arguments)}catch(P){we("WebGLState:",P)}}function $(){try{s.compressedTexSubImage3D(...arguments)}catch(P){we("WebGLState:",P)}}function ee(){try{s.texStorage2D(...arguments)}catch(P){we("WebGLState:",P)}}function ae(){try{s.texStorage3D(...arguments)}catch(P){we("WebGLState:",P)}}function W(){try{s.texImage2D(...arguments)}catch(P){we("WebGLState:",P)}}function K(){try{s.texImage3D(...arguments)}catch(P){we("WebGLState:",P)}}function fe(P){return u[P]!==void 0?u[P]:s.getParameter(P)}function ge(P,ne){u[P]!==ne&&(s.pixelStorei(P,ne),u[P]=ne)}function se(P){$e.equals(P)===!1&&(s.scissor(P.x,P.y,P.z,P.w),$e.copy(P))}function te(P){Fe.equals(P)===!1&&(s.viewport(P.x,P.y,P.z,P.w),Fe.copy(P))}function Ce(P,ne){let X=l.get(ne);X===void 0&&(X=new WeakMap,l.set(ne,X));let pe=X.get(P);pe===void 0&&(pe=s.getUniformBlockIndex(ne,P.name),X.set(P,pe))}function Ne(P,ne){let pe=l.get(ne).get(P);c.get(ne)!==pe&&(s.uniformBlockBinding(ne,pe,P.__bindingPointIndex),c.set(ne,pe))}function Ke(){s.disable(s.BLEND),s.disable(s.CULL_FACE),s.disable(s.DEPTH_TEST),s.disable(s.POLYGON_OFFSET_FILL),s.disable(s.SCISSOR_TEST),s.disable(s.STENCIL_TEST),s.disable(s.SAMPLE_ALPHA_TO_COVERAGE),s.blendEquation(s.FUNC_ADD),s.blendFunc(s.ONE,s.ZERO),s.blendFuncSeparate(s.ONE,s.ZERO,s.ONE,s.ZERO),s.blendColor(0,0,0,0),s.colorMask(!0,!0,!0,!0),s.clearColor(0,0,0,0),s.depthMask(!0),s.depthFunc(s.LESS),a.setReversed(!1),s.clearDepth(1),s.stencilMask(4294967295),s.stencilFunc(s.ALWAYS,0,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.clearStencil(0),s.cullFace(s.BACK),s.frontFace(s.CCW),s.polygonOffset(0,0),s.activeTexture(s.TEXTURE0),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),s.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.useProgram(null),s.lineWidth(1),s.scissor(0,0,s.canvas.width,s.canvas.height),s.viewport(0,0,s.canvas.width,s.canvas.height),s.pixelStorei(s.PACK_ALIGNMENT,4),s.pixelStorei(s.UNPACK_ALIGNMENT,4),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.BROWSER_DEFAULT_WEBGL),s.pixelStorei(s.PACK_ROW_LENGTH,0),s.pixelStorei(s.PACK_SKIP_PIXELS,0),s.pixelStorei(s.PACK_SKIP_ROWS,0),s.pixelStorei(s.UNPACK_ROW_LENGTH,0),s.pixelStorei(s.UNPACK_IMAGE_HEIGHT,0),s.pixelStorei(s.UNPACK_SKIP_PIXELS,0),s.pixelStorei(s.UNPACK_SKIP_ROWS,0),s.pixelStorei(s.UNPACK_SKIP_IMAGES,0),h={},u={},le=null,xe={},d={},f=new WeakMap,g=[],_=null,m=!1,p=null,v=null,S=null,M=null,E=null,T=null,C=null,x=new Te(0,0,0),w=0,L=!1,R=null,O=null,H=null,q=null,N=null,$e.set(0,0,s.canvas.width,s.canvas.height),Fe.set(0,0,s.canvas.width,s.canvas.height),r.reset(),a.reset(),o.reset()}return{buffers:{color:r,depth:a,stencil:o},enable:ie,disable:Ee,bindFramebuffer:Ie,drawBuffers:Re,useProgram:ht,setBlending:ot,setMaterial:Ge,setFlipSided:At,setCullFace:ut,setLineWidth:Xt,setPolygonOffset:I,setScissorTest:Tt,activeTexture:qe,bindTexture:rt,unbindTexture:oe,compressedTexImage2D:dt,compressedTexImage3D:A,texImage2D:W,texImage3D:K,pixelStorei:ge,getParameter:fe,updateUBOMapping:Ce,uniformBlockBinding:Ne,texStorage2D:ee,texStorage3D:ae,texSubImage2D:b,texSubImage3D:U,compressedTexSubImage2D:j,compressedTexSubImage3D:$,scissor:se,viewport:te,reset:Ke}}function ux(s,e,t,n,i,r,a){let o=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,c=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),l=new He,h=new WeakMap,u=new Set,d,f=new WeakMap,g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(A,b){return g?new OffscreenCanvas(A,b):ms("canvas")}function m(A,b,U){let j=1,$=dt(A);if(($.width>U||$.height>U)&&(j=U/Math.max($.width,$.height)),j<1)if(typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&A instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&A instanceof ImageBitmap||typeof VideoFrame<"u"&&A instanceof VideoFrame){let ee=Math.floor(j*$.width),ae=Math.floor(j*$.height);d===void 0&&(d=_(ee,ae));let W=b?_(ee,ae):d;return W.width=ee,W.height=ae,W.getContext("2d").drawImage(A,0,0,ee,ae),_e("WebGLRenderer: Texture has been resized from ("+$.width+"x"+$.height+") to ("+ee+"x"+ae+")."),W}else return"data"in A&&_e("WebGLRenderer: Image in DataTexture is too big ("+$.width+"x"+$.height+")."),A;return A}function p(A){return A.generateMipmaps}function v(A){s.generateMipmap(A)}function S(A){return A.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:A.isWebGL3DRenderTarget?s.TEXTURE_3D:A.isWebGLArrayRenderTarget||A.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function M(A,b,U,j,$,ee=!1){if(A!==null){if(s[A]!==void 0)return s[A];_e("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+A+"'")}let ae;j&&(ae=e.get("EXT_texture_norm16"),ae||_e("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));let W=b;if(b===s.RED&&(U===s.FLOAT&&(W=s.R32F),U===s.HALF_FLOAT&&(W=s.R16F),U===s.UNSIGNED_BYTE&&(W=s.R8),U===s.UNSIGNED_SHORT&&ae&&(W=ae.R16_EXT),U===s.SHORT&&ae&&(W=ae.R16_SNORM_EXT)),b===s.RED_INTEGER&&(U===s.UNSIGNED_BYTE&&(W=s.R8UI),U===s.UNSIGNED_SHORT&&(W=s.R16UI),U===s.UNSIGNED_INT&&(W=s.R32UI),U===s.BYTE&&(W=s.R8I),U===s.SHORT&&(W=s.R16I),U===s.INT&&(W=s.R32I)),b===s.RG&&(U===s.FLOAT&&(W=s.RG32F),U===s.HALF_FLOAT&&(W=s.RG16F),U===s.UNSIGNED_BYTE&&(W=s.RG8),U===s.UNSIGNED_SHORT&&ae&&(W=ae.RG16_EXT),U===s.SHORT&&ae&&(W=ae.RG16_SNORM_EXT)),b===s.RG_INTEGER&&(U===s.UNSIGNED_BYTE&&(W=s.RG8UI),U===s.UNSIGNED_SHORT&&(W=s.RG16UI),U===s.UNSIGNED_INT&&(W=s.RG32UI),U===s.BYTE&&(W=s.RG8I),U===s.SHORT&&(W=s.RG16I),U===s.INT&&(W=s.RG32I)),b===s.RGB_INTEGER&&(U===s.UNSIGNED_BYTE&&(W=s.RGB8UI),U===s.UNSIGNED_SHORT&&(W=s.RGB16UI),U===s.UNSIGNED_INT&&(W=s.RGB32UI),U===s.BYTE&&(W=s.RGB8I),U===s.SHORT&&(W=s.RGB16I),U===s.INT&&(W=s.RGB32I)),b===s.RGBA_INTEGER&&(U===s.UNSIGNED_BYTE&&(W=s.RGBA8UI),U===s.UNSIGNED_SHORT&&(W=s.RGBA16UI),U===s.UNSIGNED_INT&&(W=s.RGBA32UI),U===s.BYTE&&(W=s.RGBA8I),U===s.SHORT&&(W=s.RGBA16I),U===s.INT&&(W=s.RGBA32I)),b===s.RGB&&(U===s.UNSIGNED_SHORT&&ae&&(W=ae.RGB16_EXT),U===s.SHORT&&ae&&(W=ae.RGB16_SNORM_EXT),U===s.UNSIGNED_INT_5_9_9_9_REV&&(W=s.RGB9_E5),U===s.UNSIGNED_INT_10F_11F_11F_REV&&(W=s.R11F_G11F_B10F)),b===s.RGBA){let K=ee?er:Be.getTransfer($);U===s.FLOAT&&(W=s.RGBA32F),U===s.HALF_FLOAT&&(W=s.RGBA16F),U===s.UNSIGNED_BYTE&&(W=K===Ye?s.SRGB8_ALPHA8:s.RGBA8),U===s.UNSIGNED_SHORT&&ae&&(W=ae.RGBA16_EXT),U===s.SHORT&&ae&&(W=ae.RGBA16_SNORM_EXT),U===s.UNSIGNED_SHORT_4_4_4_4&&(W=s.RGBA4),U===s.UNSIGNED_SHORT_5_5_5_1&&(W=s.RGB5_A1)}return(W===s.R16F||W===s.R32F||W===s.RG16F||W===s.RG32F||W===s.RGBA16F||W===s.RGBA32F)&&e.get("EXT_color_buffer_float"),W}function E(A,b){let U;return A?b===null||b===vn||b===Ps?U=s.DEPTH24_STENCIL8:b===Zt?U=s.DEPTH32F_STENCIL8:b===Cs&&(U=s.DEPTH24_STENCIL8,_e("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):b===null||b===vn||b===Ps?U=s.DEPTH_COMPONENT24:b===Zt?U=s.DEPTH_COMPONENT32F:b===Cs&&(U=s.DEPTH_COMPONENT16),U}function T(A,b){return p(A)===!0||A.isFramebufferTexture&&A.minFilter!==xt&&A.minFilter!==_t?Math.log2(Math.max(b.width,b.height))+1:A.mipmaps!==void 0&&A.mipmaps.length>0?A.mipmaps.length:A.isCompressedTexture&&Array.isArray(A.image)?b.mipmaps.length:1}function C(A){let b=A.target;b.removeEventListener("dispose",C),w(b),b.isVideoTexture&&h.delete(b),b.isHTMLTexture&&u.delete(b)}function x(A){let b=A.target;b.removeEventListener("dispose",x),R(b)}function w(A){let b=n.get(A);if(b.__webglInit===void 0)return;let U=A.source,j=f.get(U);if(j){let $=j[b.__cacheKey];$.usedTimes--,$.usedTimes===0&&L(A),Object.keys(j).length===0&&f.delete(U)}n.remove(A)}function L(A){let b=n.get(A);s.deleteTexture(b.__webglTexture);let U=A.source,j=f.get(U);delete j[b.__cacheKey],a.memory.textures--}function R(A){let b=n.get(A);if(A.depthTexture&&(A.depthTexture.dispose(),n.remove(A.depthTexture)),A.isWebGLCubeRenderTarget)for(let j=0;j<6;j++){if(Array.isArray(b.__webglFramebuffer[j]))for(let $=0;$<b.__webglFramebuffer[j].length;$++)s.deleteFramebuffer(b.__webglFramebuffer[j][$]);else s.deleteFramebuffer(b.__webglFramebuffer[j]);b.__webglDepthbuffer&&s.deleteRenderbuffer(b.__webglDepthbuffer[j])}else{if(Array.isArray(b.__webglFramebuffer))for(let j=0;j<b.__webglFramebuffer.length;j++)s.deleteFramebuffer(b.__webglFramebuffer[j]);else s.deleteFramebuffer(b.__webglFramebuffer);if(b.__webglDepthbuffer&&s.deleteRenderbuffer(b.__webglDepthbuffer),b.__webglMultisampledFramebuffer&&s.deleteFramebuffer(b.__webglMultisampledFramebuffer),b.__webglColorRenderbuffer)for(let j=0;j<b.__webglColorRenderbuffer.length;j++)b.__webglColorRenderbuffer[j]&&s.deleteRenderbuffer(b.__webglColorRenderbuffer[j]);b.__webglDepthRenderbuffer&&s.deleteRenderbuffer(b.__webglDepthRenderbuffer)}let U=A.textures;for(let j=0,$=U.length;j<$;j++){let ee=n.get(U[j]);ee.__webglTexture&&(s.deleteTexture(ee.__webglTexture),a.memory.textures--),n.remove(U[j])}n.remove(A)}let O=0;function H(){O=0}function q(){return O}function N(A){O=A}function z(){let A=O;return A>=i.maxTextures&&_e("WebGLTextures: Trying to use "+A+" texture units while this GPU supports only "+i.maxTextures),O+=1,A}function V(A){let b=[];return b.push(A.wrapS),b.push(A.wrapT),b.push(A.wrapR||0),b.push(A.magFilter),b.push(A.minFilter),b.push(A.anisotropy),b.push(A.internalFormat),b.push(A.format),b.push(A.type),b.push(A.generateMipmaps),b.push(A.premultiplyAlpha),b.push(A.flipY),b.push(A.unpackAlignment),b.push(A.colorSpace),b.join()}function Z(A,b){let U=n.get(A);if(A.isVideoTexture&&rt(A),A.isRenderTargetTexture===!1&&A.isExternalTexture!==!0&&A.version>0&&U.__version!==A.version){let j=A.image;if(j===null)_e("WebGLRenderer: Texture marked for update but no image data found.");else if(j.complete===!1)_e("WebGLRenderer: Texture marked for update but image is incomplete");else{Ee(U,A,b);return}}else A.isExternalTexture&&(U.__webglTexture=A.sourceTexture?A.sourceTexture:null);t.bindTexture(s.TEXTURE_2D,U.__webglTexture,s.TEXTURE0+b)}function Q(A,b){let U=n.get(A);if(A.isRenderTargetTexture===!1&&A.version>0&&U.__version!==A.version){Ee(U,A,b);return}else A.isExternalTexture&&(U.__webglTexture=A.sourceTexture?A.sourceTexture:null);t.bindTexture(s.TEXTURE_2D_ARRAY,U.__webglTexture,s.TEXTURE0+b)}function le(A,b){let U=n.get(A);if(A.isRenderTargetTexture===!1&&A.version>0&&U.__version!==A.version){Ee(U,A,b);return}t.bindTexture(s.TEXTURE_3D,U.__webglTexture,s.TEXTURE0+b)}function xe(A,b){let U=n.get(A);if(A.isCubeDepthTexture!==!0&&A.version>0&&U.__version!==A.version){Ie(U,A,b);return}t.bindTexture(s.TEXTURE_CUBE_MAP,U.__webglTexture,s.TEXTURE0+b)}let Se={[ui]:s.REPEAT,[sn]:s.CLAMP_TO_EDGE,[fs]:s.MIRRORED_REPEAT},Xe={[xt]:s.NEAREST,[ao]:s.NEAREST_MIPMAP_NEAREST,[Hi]:s.NEAREST_MIPMAP_LINEAR,[_t]:s.LINEAR,[Rs]:s.LINEAR_MIPMAP_NEAREST,[_n]:s.LINEAR_MIPMAP_LINEAR},$e={[id]:s.NEVER,[cd]:s.ALWAYS,[sd]:s.LESS,[Xo]:s.LEQUAL,[rd]:s.EQUAL,[jo]:s.GEQUAL,[ad]:s.GREATER,[od]:s.NOTEQUAL};function Fe(A,b){if(b.type===Zt&&e.has("OES_texture_float_linear")===!1&&(b.magFilter===_t||b.magFilter===Rs||b.magFilter===Hi||b.magFilter===_n||b.minFilter===_t||b.minFilter===Rs||b.minFilter===Hi||b.minFilter===_n)&&_e("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(A,s.TEXTURE_WRAP_S,Se[b.wrapS]),s.texParameteri(A,s.TEXTURE_WRAP_T,Se[b.wrapT]),(A===s.TEXTURE_3D||A===s.TEXTURE_2D_ARRAY)&&s.texParameteri(A,s.TEXTURE_WRAP_R,Se[b.wrapR]),s.texParameteri(A,s.TEXTURE_MAG_FILTER,Xe[b.magFilter]),s.texParameteri(A,s.TEXTURE_MIN_FILTER,Xe[b.minFilter]),b.compareFunction&&(s.texParameteri(A,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(A,s.TEXTURE_COMPARE_FUNC,$e[b.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(b.magFilter===xt||b.minFilter!==Hi&&b.minFilter!==_n||b.type===Zt&&e.has("OES_texture_float_linear")===!1)return;if(b.anisotropy>1||n.get(b).__currentAnisotropy){let U=e.get("EXT_texture_filter_anisotropic");s.texParameterf(A,U.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,i.getMaxAnisotropy())),n.get(b).__currentAnisotropy=b.anisotropy}}}function Y(A,b){let U=!1;A.__webglInit===void 0&&(A.__webglInit=!0,b.addEventListener("dispose",C));let j=b.source,$=f.get(j);$===void 0&&($={},f.set(j,$));let ee=V(b);if(ee!==A.__cacheKey){$[ee]===void 0&&($[ee]={texture:s.createTexture(),usedTimes:0},a.memory.textures++,U=!0),$[ee].usedTimes++;let ae=$[A.__cacheKey];ae!==void 0&&($[A.__cacheKey].usedTimes--,ae.usedTimes===0&&L(b)),A.__cacheKey=ee,A.__webglTexture=$[ee].texture}return U}function de(A,b,U){return Math.floor(Math.floor(A/U)/b)}function ie(A,b,U,j){let ee=A.updateRanges;if(ee.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,b.width,b.height,U,j,b.data);else{ee.sort((ge,se)=>ge.start-se.start);let ae=0;for(let ge=1;ge<ee.length;ge++){let se=ee[ae],te=ee[ge],Ce=se.start+se.count,Ne=de(te.start,b.width,4),Ke=de(se.start,b.width,4);te.start<=Ce+1&&Ne===Ke&&de(te.start+te.count-1,b.width,4)===Ne?se.count=Math.max(se.count,te.start+te.count-se.start):(++ae,ee[ae]=te)}ee.length=ae+1;let W=t.getParameter(s.UNPACK_ROW_LENGTH),K=t.getParameter(s.UNPACK_SKIP_PIXELS),fe=t.getParameter(s.UNPACK_SKIP_ROWS);t.pixelStorei(s.UNPACK_ROW_LENGTH,b.width);for(let ge=0,se=ee.length;ge<se;ge++){let te=ee[ge],Ce=Math.floor(te.start/4),Ne=Math.ceil(te.count/4),Ke=Ce%b.width,P=Math.floor(Ce/b.width),ne=Ne,X=1;t.pixelStorei(s.UNPACK_SKIP_PIXELS,Ke),t.pixelStorei(s.UNPACK_SKIP_ROWS,P),t.texSubImage2D(s.TEXTURE_2D,0,Ke,P,ne,X,U,j,b.data)}A.clearUpdateRanges(),t.pixelStorei(s.UNPACK_ROW_LENGTH,W),t.pixelStorei(s.UNPACK_SKIP_PIXELS,K),t.pixelStorei(s.UNPACK_SKIP_ROWS,fe)}}function Ee(A,b,U){let j=s.TEXTURE_2D;(b.isDataArrayTexture||b.isCompressedArrayTexture)&&(j=s.TEXTURE_2D_ARRAY),b.isData3DTexture&&(j=s.TEXTURE_3D);let $=Y(A,b),ee=b.source;t.bindTexture(j,A.__webglTexture,s.TEXTURE0+U);let ae=n.get(ee);if(ee.version!==ae.__version||$===!0){if(t.activeTexture(s.TEXTURE0+U),(typeof ImageBitmap<"u"&&b.image instanceof ImageBitmap)===!1){let X=Be.getPrimaries(Be.workingColorSpace),pe=b.colorSpace===Qn?null:Be.getPrimaries(b.colorSpace),re=b.colorSpace===Qn||X===pe?s.NONE:s.BROWSER_DEFAULT_WEBGL;t.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,b.flipY),t.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),t.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,re)}t.pixelStorei(s.UNPACK_ALIGNMENT,b.unpackAlignment);let K=m(b.image,!1,i.maxTextureSize);K=oe(b,K);let fe=r.convert(b.format,b.colorSpace),ge=r.convert(b.type),se=M(b.internalFormat,fe,ge,b.normalized,b.colorSpace,b.isVideoTexture);Fe(j,b);let te,Ce=b.mipmaps,Ne=b.isVideoTexture!==!0,Ke=ae.__version===void 0||$===!0,P=ee.dataReady,ne=T(b,K);if(b.isDepthTexture)se=E(b.format===bi,b.type),Ke&&(Ne?t.texStorage2D(s.TEXTURE_2D,1,se,K.width,K.height):t.texImage2D(s.TEXTURE_2D,0,se,K.width,K.height,0,fe,ge,null));else if(b.isDataTexture)if(Ce.length>0){Ne&&Ke&&t.texStorage2D(s.TEXTURE_2D,ne,se,Ce[0].width,Ce[0].height);for(let X=0,pe=Ce.length;X<pe;X++)te=Ce[X],Ne?P&&t.texSubImage2D(s.TEXTURE_2D,X,0,0,te.width,te.height,fe,ge,te.data):t.texImage2D(s.TEXTURE_2D,X,se,te.width,te.height,0,fe,ge,te.data);b.generateMipmaps=!1}else Ne?(Ke&&t.texStorage2D(s.TEXTURE_2D,ne,se,K.width,K.height),P&&ie(b,K,fe,ge)):t.texImage2D(s.TEXTURE_2D,0,se,K.width,K.height,0,fe,ge,K.data);else if(b.isCompressedTexture)if(b.isCompressedArrayTexture){Ne&&Ke&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ne,se,Ce[0].width,Ce[0].height,K.depth);for(let X=0,pe=Ce.length;X<pe;X++)if(te=Ce[X],b.format!==Qt)if(fe!==null)if(Ne){if(P)if(b.layerUpdates.size>0){let re=Cl(te.width,te.height,b.format,b.type);for(let J of b.layerUpdates){let ye=te.data.subarray(J*re/te.data.BYTES_PER_ELEMENT,(J+1)*re/te.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,X,0,0,J,te.width,te.height,1,fe,ye)}b.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,X,0,0,0,te.width,te.height,K.depth,fe,te.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,X,se,te.width,te.height,K.depth,0,te.data,0,0);else _e("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Ne?P&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,X,0,0,0,te.width,te.height,K.depth,fe,ge,te.data):t.texImage3D(s.TEXTURE_2D_ARRAY,X,se,te.width,te.height,K.depth,0,fe,ge,te.data)}else{Ne&&Ke&&t.texStorage2D(s.TEXTURE_2D,ne,se,Ce[0].width,Ce[0].height);for(let X=0,pe=Ce.length;X<pe;X++)te=Ce[X],b.format!==Qt?fe!==null?Ne?P&&t.compressedTexSubImage2D(s.TEXTURE_2D,X,0,0,te.width,te.height,fe,te.data):t.compressedTexImage2D(s.TEXTURE_2D,X,se,te.width,te.height,0,te.data):_e("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ne?P&&t.texSubImage2D(s.TEXTURE_2D,X,0,0,te.width,te.height,fe,ge,te.data):t.texImage2D(s.TEXTURE_2D,X,se,te.width,te.height,0,fe,ge,te.data)}else if(b.isDataArrayTexture)if(Ne){if(Ke&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ne,se,K.width,K.height,K.depth),P)if(b.layerUpdates.size>0){let X=Cl(K.width,K.height,b.format,b.type);for(let pe of b.layerUpdates){let re=K.data.subarray(pe*X/K.data.BYTES_PER_ELEMENT,(pe+1)*X/K.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,pe,K.width,K.height,1,fe,ge,re)}b.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,K.width,K.height,K.depth,fe,ge,K.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,se,K.width,K.height,K.depth,0,fe,ge,K.data);else if(b.isData3DTexture)Ne?(Ke&&t.texStorage3D(s.TEXTURE_3D,ne,se,K.width,K.height,K.depth),P&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,K.width,K.height,K.depth,fe,ge,K.data)):t.texImage3D(s.TEXTURE_3D,0,se,K.width,K.height,K.depth,0,fe,ge,K.data);else if(b.isFramebufferTexture){if(Ke)if(Ne)t.texStorage2D(s.TEXTURE_2D,ne,se,K.width,K.height);else{let X=K.width,pe=K.height;for(let re=0;re<ne;re++)t.texImage2D(s.TEXTURE_2D,re,se,X,pe,0,fe,ge,null),X>>=1,pe>>=1}}else if(b.isHTMLTexture){if("texElementImage2D"in s){let X=s.canvas;if(X.hasAttribute("layoutsubtree")||X.setAttribute("layoutsubtree","true"),K.parentNode!==X){X.appendChild(K),u.add(b),X.onpaint=Le=>{let pt=Le.changedElements;for(let Qe of u)pt.includes(Qe.image)&&(Qe.needsUpdate=!0)},X.requestPaint();return}let pe=0,re=s.RGBA,J=s.RGBA,ye=s.UNSIGNED_BYTE;s.texElementImage2D(s.TEXTURE_2D,pe,re,J,ye,K),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE)}}else if(Ce.length>0){if(Ne&&Ke){let X=dt(Ce[0]);t.texStorage2D(s.TEXTURE_2D,ne,se,X.width,X.height)}for(let X=0,pe=Ce.length;X<pe;X++)te=Ce[X],Ne?P&&t.texSubImage2D(s.TEXTURE_2D,X,0,0,fe,ge,te):t.texImage2D(s.TEXTURE_2D,X,se,fe,ge,te);b.generateMipmaps=!1}else if(Ne){if(Ke){let X=dt(K);t.texStorage2D(s.TEXTURE_2D,ne,se,X.width,X.height)}P&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,fe,ge,K)}else t.texImage2D(s.TEXTURE_2D,0,se,fe,ge,K);p(b)&&v(j),ae.__version=ee.version,b.onUpdate&&b.onUpdate(b)}A.__version=b.version}function Ie(A,b,U){if(b.image.length!==6)return;let j=Y(A,b),$=b.source;t.bindTexture(s.TEXTURE_CUBE_MAP,A.__webglTexture,s.TEXTURE0+U);let ee=n.get($);if($.version!==ee.__version||j===!0){t.activeTexture(s.TEXTURE0+U);let ae=Be.getPrimaries(Be.workingColorSpace),W=b.colorSpace===Qn?null:Be.getPrimaries(b.colorSpace),K=b.colorSpace===Qn||ae===W?s.NONE:s.BROWSER_DEFAULT_WEBGL;t.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,b.flipY),t.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),t.pixelStorei(s.UNPACK_ALIGNMENT,b.unpackAlignment),t.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,K);let fe=b.isCompressedTexture||b.image[0].isCompressedTexture,ge=b.image[0]&&b.image[0].isDataTexture,se=[];for(let J=0;J<6;J++)!fe&&!ge?se[J]=m(b.image[J],!0,i.maxCubemapSize):se[J]=ge?b.image[J].image:b.image[J],se[J]=oe(b,se[J]);let te=se[0],Ce=r.convert(b.format,b.colorSpace),Ne=r.convert(b.type),Ke=M(b.internalFormat,Ce,Ne,b.normalized,b.colorSpace),P=b.isVideoTexture!==!0,ne=ee.__version===void 0||j===!0,X=$.dataReady,pe=T(b,te);Fe(s.TEXTURE_CUBE_MAP,b);let re;if(fe){P&&ne&&t.texStorage2D(s.TEXTURE_CUBE_MAP,pe,Ke,te.width,te.height);for(let J=0;J<6;J++){re=se[J].mipmaps;for(let ye=0;ye<re.length;ye++){let Le=re[ye];b.format!==Qt?Ce!==null?P?X&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,ye,0,0,Le.width,Le.height,Ce,Le.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,ye,Ke,Le.width,Le.height,0,Le.data):_e("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,ye,0,0,Le.width,Le.height,Ce,Ne,Le.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,ye,Ke,Le.width,Le.height,0,Ce,Ne,Le.data)}}}else{if(re=b.mipmaps,P&&ne){re.length>0&&pe++;let J=dt(se[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,pe,Ke,J.width,J.height)}for(let J=0;J<6;J++)if(ge){P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,0,0,0,se[J].width,se[J].height,Ce,Ne,se[J].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,0,Ke,se[J].width,se[J].height,0,Ce,Ne,se[J].data);for(let ye=0;ye<re.length;ye++){let pt=re[ye].image[J].image;P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,ye+1,0,0,pt.width,pt.height,Ce,Ne,pt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,ye+1,Ke,pt.width,pt.height,0,Ce,Ne,pt.data)}}else{P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,0,0,0,Ce,Ne,se[J]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,0,Ke,Ce,Ne,se[J]);for(let ye=0;ye<re.length;ye++){let Le=re[ye];P?X&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,ye+1,0,0,Ce,Ne,Le.image[J]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+J,ye+1,Ke,Ce,Ne,Le.image[J])}}}p(b)&&v(s.TEXTURE_CUBE_MAP),ee.__version=$.version,b.onUpdate&&b.onUpdate(b)}A.__version=b.version}function Re(A,b,U,j,$,ee){let ae=r.convert(U.format,U.colorSpace),W=r.convert(U.type),K=M(U.internalFormat,ae,W,U.normalized,U.colorSpace),fe=n.get(b),ge=n.get(U);if(ge.__renderTarget=b,!fe.__hasExternalTextures){let se=Math.max(1,b.width>>ee),te=Math.max(1,b.height>>ee);$===s.TEXTURE_3D||$===s.TEXTURE_2D_ARRAY?t.texImage3D($,ee,K,se,te,b.depth,0,ae,W,null):t.texImage2D($,ee,K,se,te,0,ae,W,null)}t.bindFramebuffer(s.FRAMEBUFFER,A),qe(b)?o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,j,$,ge.__webglTexture,0,Tt(b)):($===s.TEXTURE_2D||$>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&$<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,j,$,ge.__webglTexture,ee),t.bindFramebuffer(s.FRAMEBUFFER,null)}function ht(A,b,U){if(s.bindRenderbuffer(s.RENDERBUFFER,A),b.depthBuffer){let j=b.depthTexture,$=j&&j.isDepthTexture?j.type:null,ee=E(b.stencilBuffer,$),ae=b.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;qe(b)?o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Tt(b),ee,b.width,b.height):U?s.renderbufferStorageMultisample(s.RENDERBUFFER,Tt(b),ee,b.width,b.height):s.renderbufferStorage(s.RENDERBUFFER,ee,b.width,b.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,ae,s.RENDERBUFFER,A)}else{let j=b.textures;for(let $=0;$<j.length;$++){let ee=j[$],ae=r.convert(ee.format,ee.colorSpace),W=r.convert(ee.type),K=M(ee.internalFormat,ae,W,ee.normalized,ee.colorSpace);qe(b)?o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Tt(b),K,b.width,b.height):U?s.renderbufferStorageMultisample(s.RENDERBUFFER,Tt(b),K,b.width,b.height):s.renderbufferStorage(s.RENDERBUFFER,K,b.width,b.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function We(A,b,U){let j=b.isWebGLCubeRenderTarget===!0;if(t.bindFramebuffer(s.FRAMEBUFFER,A),!(b.depthTexture&&b.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");let $=n.get(b.depthTexture);if($.__renderTarget=b,(!$.__webglTexture||b.depthTexture.image.width!==b.width||b.depthTexture.image.height!==b.height)&&(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0),j){if($.__webglInit===void 0&&($.__webglInit=!0,b.depthTexture.addEventListener("dispose",C)),$.__webglTexture===void 0){$.__webglTexture=s.createTexture(),t.bindTexture(s.TEXTURE_CUBE_MAP,$.__webglTexture),Fe(s.TEXTURE_CUBE_MAP,b.depthTexture);let fe=r.convert(b.depthTexture.format),ge=r.convert(b.depthTexture.type),se;b.depthTexture.format===En?se=s.DEPTH_COMPONENT24:b.depthTexture.format===bi&&(se=s.DEPTH24_STENCIL8);for(let te=0;te<6;te++)s.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+te,0,se,b.width,b.height,0,fe,ge,null)}}else Z(b.depthTexture,0);let ee=$.__webglTexture,ae=Tt(b),W=j?s.TEXTURE_CUBE_MAP_POSITIVE_X+U:s.TEXTURE_2D,K=b.depthTexture.format===bi?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;if(b.depthTexture.format===En)qe(b)?o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,K,W,ee,0,ae):s.framebufferTexture2D(s.FRAMEBUFFER,K,W,ee,0);else if(b.depthTexture.format===bi)qe(b)?o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,K,W,ee,0,ae):s.framebufferTexture2D(s.FRAMEBUFFER,K,W,ee,0);else throw new Error("Unknown depthTexture format")}function Ze(A){let b=n.get(A),U=A.isWebGLCubeRenderTarget===!0;if(b.__boundDepthTexture!==A.depthTexture){let j=A.depthTexture;if(b.__depthDisposeCallback&&b.__depthDisposeCallback(),j){let $=()=>{delete b.__boundDepthTexture,delete b.__depthDisposeCallback,j.removeEventListener("dispose",$)};j.addEventListener("dispose",$),b.__depthDisposeCallback=$}b.__boundDepthTexture=j}if(A.depthTexture&&!b.__autoAllocateDepthBuffer)if(U)for(let j=0;j<6;j++)We(b.__webglFramebuffer[j],A,j);else{let j=A.texture.mipmaps;j&&j.length>0?We(b.__webglFramebuffer[0],A,0):We(b.__webglFramebuffer,A,0)}else if(U){b.__webglDepthbuffer=[];for(let j=0;j<6;j++)if(t.bindFramebuffer(s.FRAMEBUFFER,b.__webglFramebuffer[j]),b.__webglDepthbuffer[j]===void 0)b.__webglDepthbuffer[j]=s.createRenderbuffer(),ht(b.__webglDepthbuffer[j],A,!1);else{let $=A.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ee=b.__webglDepthbuffer[j];s.bindRenderbuffer(s.RENDERBUFFER,ee),s.framebufferRenderbuffer(s.FRAMEBUFFER,$,s.RENDERBUFFER,ee)}}else{let j=A.texture.mipmaps;if(j&&j.length>0?t.bindFramebuffer(s.FRAMEBUFFER,b.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,b.__webglFramebuffer),b.__webglDepthbuffer===void 0)b.__webglDepthbuffer=s.createRenderbuffer(),ht(b.__webglDepthbuffer,A,!1);else{let $=A.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ee=b.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,ee),s.framebufferRenderbuffer(s.FRAMEBUFFER,$,s.RENDERBUFFER,ee)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function ot(A,b,U){let j=n.get(A);b!==void 0&&Re(j.__webglFramebuffer,A,A.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),U!==void 0&&Ze(A)}function Ge(A){let b=A.texture,U=n.get(A),j=n.get(b);A.addEventListener("dispose",x);let $=A.textures,ee=A.isWebGLCubeRenderTarget===!0,ae=$.length>1;if(ae||(j.__webglTexture===void 0&&(j.__webglTexture=s.createTexture()),j.__version=b.version,a.memory.textures++),ee){U.__webglFramebuffer=[];for(let W=0;W<6;W++)if(b.mipmaps&&b.mipmaps.length>0){U.__webglFramebuffer[W]=[];for(let K=0;K<b.mipmaps.length;K++)U.__webglFramebuffer[W][K]=s.createFramebuffer()}else U.__webglFramebuffer[W]=s.createFramebuffer()}else{if(b.mipmaps&&b.mipmaps.length>0){U.__webglFramebuffer=[];for(let W=0;W<b.mipmaps.length;W++)U.__webglFramebuffer[W]=s.createFramebuffer()}else U.__webglFramebuffer=s.createFramebuffer();if(ae)for(let W=0,K=$.length;W<K;W++){let fe=n.get($[W]);fe.__webglTexture===void 0&&(fe.__webglTexture=s.createTexture(),a.memory.textures++)}if(A.samples>0&&qe(A)===!1){U.__webglMultisampledFramebuffer=s.createFramebuffer(),U.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,U.__webglMultisampledFramebuffer);for(let W=0;W<$.length;W++){let K=$[W];U.__webglColorRenderbuffer[W]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,U.__webglColorRenderbuffer[W]);let fe=r.convert(K.format,K.colorSpace),ge=r.convert(K.type),se=M(K.internalFormat,fe,ge,K.normalized,K.colorSpace,A.isXRRenderTarget===!0),te=Tt(A);s.renderbufferStorageMultisample(s.RENDERBUFFER,te,se,A.width,A.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+W,s.RENDERBUFFER,U.__webglColorRenderbuffer[W])}s.bindRenderbuffer(s.RENDERBUFFER,null),A.depthBuffer&&(U.__webglDepthRenderbuffer=s.createRenderbuffer(),ht(U.__webglDepthRenderbuffer,A,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(ee){t.bindTexture(s.TEXTURE_CUBE_MAP,j.__webglTexture),Fe(s.TEXTURE_CUBE_MAP,b);for(let W=0;W<6;W++)if(b.mipmaps&&b.mipmaps.length>0)for(let K=0;K<b.mipmaps.length;K++)Re(U.__webglFramebuffer[W][K],A,b,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+W,K);else Re(U.__webglFramebuffer[W],A,b,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+W,0);p(b)&&v(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(ae){for(let W=0,K=$.length;W<K;W++){let fe=$[W],ge=n.get(fe),se=s.TEXTURE_2D;(A.isWebGL3DRenderTarget||A.isWebGLArrayRenderTarget)&&(se=A.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(se,ge.__webglTexture),Fe(se,fe),Re(U.__webglFramebuffer,A,fe,s.COLOR_ATTACHMENT0+W,se,0),p(fe)&&v(se)}t.unbindTexture()}else{let W=s.TEXTURE_2D;if((A.isWebGL3DRenderTarget||A.isWebGLArrayRenderTarget)&&(W=A.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(W,j.__webglTexture),Fe(W,b),b.mipmaps&&b.mipmaps.length>0)for(let K=0;K<b.mipmaps.length;K++)Re(U.__webglFramebuffer[K],A,b,s.COLOR_ATTACHMENT0,W,K);else Re(U.__webglFramebuffer,A,b,s.COLOR_ATTACHMENT0,W,0);p(b)&&v(W),t.unbindTexture()}A.depthBuffer&&Ze(A)}function At(A){let b=A.textures;for(let U=0,j=b.length;U<j;U++){let $=b[U];if(p($)){let ee=S(A),ae=n.get($).__webglTexture;t.bindTexture(ee,ae),v(ee),t.unbindTexture()}}}let ut=[],Xt=[];function I(A){if(A.samples>0){if(qe(A)===!1){let b=A.textures,U=A.width,j=A.height,$=s.COLOR_BUFFER_BIT,ee=A.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ae=n.get(A),W=b.length>1;if(W)for(let fe=0;fe<b.length;fe++)t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+fe,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+fe,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,ae.__webglMultisampledFramebuffer);let K=A.texture.mipmaps;K&&K.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,ae.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,ae.__webglFramebuffer);for(let fe=0;fe<b.length;fe++){if(A.resolveDepthBuffer&&(A.depthBuffer&&($|=s.DEPTH_BUFFER_BIT),A.stencilBuffer&&A.resolveStencilBuffer&&($|=s.STENCIL_BUFFER_BIT)),W){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,ae.__webglColorRenderbuffer[fe]);let ge=n.get(b[fe]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,ge,0)}s.blitFramebuffer(0,0,U,j,0,0,U,j,$,s.NEAREST),c===!0&&(ut.length=0,Xt.length=0,ut.push(s.COLOR_ATTACHMENT0+fe),A.depthBuffer&&A.resolveDepthBuffer===!1&&(ut.push(ee),Xt.push(ee),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,Xt)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,ut))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),W)for(let fe=0;fe<b.length;fe++){t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+fe,s.RENDERBUFFER,ae.__webglColorRenderbuffer[fe]);let ge=n.get(b[fe]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+fe,s.TEXTURE_2D,ge,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,ae.__webglMultisampledFramebuffer)}else if(A.depthBuffer&&A.resolveDepthBuffer===!1&&c){let b=A.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[b])}}}function Tt(A){return Math.min(i.maxSamples,A.samples)}function qe(A){let b=n.get(A);return A.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&b.__useRenderToTexture!==!1}function rt(A){let b=a.render.frame;h.get(A)!==b&&(h.set(A,b),A.update())}function oe(A,b){let U=A.colorSpace,j=A.format,$=A.type;return A.isCompressedTexture===!0||A.isVideoTexture===!0||U!==kt&&U!==Qn&&(Be.getTransfer(U)===Ye?(j!==Qt||$!==qt)&&_e("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):we("WebGLTextures: Unsupported texture color space:",U)),b}function dt(A){return typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement?(l.width=A.naturalWidth||A.width,l.height=A.naturalHeight||A.height):typeof VideoFrame<"u"&&A instanceof VideoFrame?(l.width=A.displayWidth,l.height=A.displayHeight):(l.width=A.width,l.height=A.height),l}this.allocateTextureUnit=z,this.resetTextureUnits=H,this.getTextureUnits=q,this.setTextureUnits=N,this.setTexture2D=Z,this.setTexture2DArray=Q,this.setTexture3D=le,this.setTextureCube=xe,this.rebindTextures=ot,this.setupRenderTarget=Ge,this.updateRenderTargetMipmap=At,this.updateMultisampleRenderTarget=I,this.setupDepthRenderbuffer=Ze,this.setupFrameBufferTexture=Re,this.useMultisampledRTT=qe,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function dx(s,e){function t(n,i=Qn){let r,a=Be.getTransfer(i);if(n===qt)return s.UNSIGNED_BYTE;if(n===co)return s.UNSIGNED_SHORT_4_4_4_4;if(n===lo)return s.UNSIGNED_SHORT_5_5_5_1;if(n===_l)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===vl)return s.UNSIGNED_INT_10F_11F_11F_REV;if(n===bl)return s.BYTE;if(n===xl)return s.SHORT;if(n===Cs)return s.UNSIGNED_SHORT;if(n===oo)return s.INT;if(n===vn)return s.UNSIGNED_INT;if(n===Zt)return s.FLOAT;if(n===Un)return s.HALF_FLOAT;if(n===yl)return s.ALPHA;if(n===Ml)return s.RGB;if(n===Qt)return s.RGBA;if(n===En)return s.DEPTH_COMPONENT;if(n===bi)return s.DEPTH_STENCIL;if(n===ho)return s.RED;if(n===uo)return s.RED_INTEGER;if(n===xi)return s.RG;if(n===fo)return s.RG_INTEGER;if(n===po)return s.RGBA_INTEGER;if(n===Rr||n===Cr||n===Pr||n===Ir)if(a===Ye)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(n===Rr)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Cr)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Pr)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Ir)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(n===Rr)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Cr)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Pr)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Ir)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===mo||n===go||n===bo||n===xo)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(n===mo)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===go)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===bo)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===xo)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===_o||n===vo||n===yo||n===Mo||n===So||n===Lr||n===Ao)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(n===_o||n===vo)return a===Ye?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===yo)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC;if(n===Mo)return r.COMPRESSED_R11_EAC;if(n===So)return r.COMPRESSED_SIGNED_R11_EAC;if(n===Lr)return r.COMPRESSED_RG11_EAC;if(n===Ao)return r.COMPRESSED_SIGNED_RG11_EAC}else return null;if(n===To||n===wo||n===Eo||n===Ro||n===Co||n===Po||n===Io||n===Lo||n===Do||n===Fo||n===No||n===Uo||n===Oo||n===ko)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(n===To)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===wo)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Eo)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===Ro)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===Co)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===Po)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===Io)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===Lo)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Do)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Fo)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===No)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===Uo)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Oo)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===ko)return a===Ye?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===Bo||n===zo||n===Go)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(n===Bo)return a===Ye?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===zo)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Go)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Vo||n===Ho||n===Dr||n===Wo)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(n===Vo)return r.COMPRESSED_RED_RGTC1_EXT;if(n===Ho)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Dr)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Wo)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===Ps?s.UNSIGNED_INT_24_8:s[n]!==void 0?s[n]:null}return{convert:t}}var fx=`
void main() {
gl_Position = vec4( position, 1.0 );
-}`,$0=`
+}`,px=`
uniform sampler2DArray depthColor;
uniform float depthWidth;
uniform float depthHeight;
@@ -4102,14 +4102,14 @@ void main() {
}
-}`,Bl=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){let n=new lr(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new Zt({vertexShader:Z0,fragmentShader:$0,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new lt(new hr(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},zl=class extends mn{constructor(e,t){super();let n=this,i=null,r=1,a=null,o="local-floor",c=1,l=null,h=null,u=null,d=null,f=null,g=null,_=typeof XRWebGLBinding<"u",m=new Bl,p={},v=t.getContextAttributes(),S=null,M=null,E=[],T=[],C=new He,x=null,w=new Mt;w.viewport=new nt;let L=new Mt;L.viewport=new nt;let R=[w,L],O=new Ka,H=null,q=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(J){let de=E[J];return de===void 0&&(de=new ms,E[J]=de),de.getTargetRaySpace()},this.getControllerGrip=function(J){let de=E[J];return de===void 0&&(de=new ms,E[J]=de),de.getGripSpace()},this.getHand=function(J){let de=E[J];return de===void 0&&(de=new ms,E[J]=de),de.getHandSpace()};function N(J){let de=T.indexOf(J.inputSource);if(de===-1)return;let ie=E[de];ie!==void 0&&(ie.update(J.inputSource,J.frame,l||a),ie.dispatchEvent({type:J.type,data:J.inputSource}))}function z(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",z),i.removeEventListener("inputsourceschange",V);for(let J=0;J<E.length;J++){let de=T[J];de!==null&&(T[J]=null,E[J].disconnect(de))}H=null,q=null,m.reset();for(let J in p)delete p[J];e.setRenderTarget(S),f=null,d=null,u=null,i=null,M=null,Fe.stop(),n.isPresenting=!1,e.setPixelRatio(x),e.setSize(C.width,C.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(J){r=J,n.isPresenting===!0&&_e("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(J){o=J,n.isPresenting===!0&&_e("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(J){l=J},this.getBaseLayer=function(){return d!==null?d:f},this.getBinding=function(){return u===null&&_&&(u=new XRWebGLBinding(i,t)),u},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(J){if(i=J,i!==null){if(S=e.getRenderTarget(),i.addEventListener("select",N),i.addEventListener("selectstart",N),i.addEventListener("selectend",N),i.addEventListener("squeeze",N),i.addEventListener("squeezestart",N),i.addEventListener("squeezeend",N),i.addEventListener("end",z),i.addEventListener("inputsourceschange",V),v.xrCompatible!==!0&&await t.makeXRCompatible(),x=e.getPixelRatio(),e.getSize(C),_&&"createProjectionLayer"in XRWebGLBinding.prototype){let ie=null,Ee=null,Ie=null;v.depth&&(Ie=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ie=v.stencil?mi:Tn,Ee=v.stencil?Es:_n);let Re={colorFormat:t.RGBA8,depthFormat:Ie,scaleFactor:r};u=this.getBinding(),d=u.createProjectionLayer(Re),i.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),M=new Yt(d.textureWidth,d.textureHeight,{format:Qt,type:qt,depthTexture:new jn(d.textureWidth,d.textureHeight,Ee,void 0,void 0,void 0,void 0,void 0,void 0,ie),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1,resolveStencilBuffer:d.ignoreDepthValues===!1})}else{let ie={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:r};f=new XRWebGLLayer(i,t,ie),i.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),M=new Yt(f.framebufferWidth,f.framebufferHeight,{format:Qt,type:qt,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:f.ignoreDepthValues===!1,resolveStencilBuffer:f.ignoreDepthValues===!1})}M.isXRRenderTarget=!0,this.setFoveation(c),l=null,a=await i.requestReferenceSpace(o),Fe.setContext(i),Fe.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};function V(J){for(let de=0;de<J.removed.length;de++){let ie=J.removed[de],Ee=T.indexOf(ie);Ee>=0&&(T[Ee]=null,E[Ee].disconnect(ie))}for(let de=0;de<J.added.length;de++){let ie=J.added[de],Ee=T.indexOf(ie);if(Ee===-1){for(let Re=0;Re<E.length;Re++)if(Re>=T.length){T.push(ie),Ee=Re;break}else if(T[Re]===null){T[Re]=ie,Ee=Re;break}if(Ee===-1)break}let Ie=E[Ee];Ie&&Ie.connect(ie)}}let $=new F,Q=new F;function le(J,de,ie){$.setFromMatrixPosition(de.matrixWorld),Q.setFromMatrixPosition(ie.matrixWorld);let Ee=$.distanceTo(Q),Ie=de.projectionMatrix.elements,Re=ie.projectionMatrix.elements,ht=Ie[14]/(Ie[10]-1),We=Ie[14]/(Ie[10]+1),$e=(Ie[9]+1)/Ie[5],ot=(Ie[9]-1)/Ie[5],Ge=(Ie[8]-1)/Ie[0],At=(Re[8]+1)/Re[0],ut=ht*Ge,Xt=ht*At,I=Ee/(-Ge+At),Tt=I*-Ge;if(de.matrixWorld.decompose(J.position,J.quaternion,J.scale),J.translateX(Tt),J.translateZ(I),J.matrixWorld.compose(J.position,J.quaternion,J.scale),J.matrixWorldInverse.copy(J.matrixWorld).invert(),Ie[10]===-1)J.projectionMatrix.copy(de.projectionMatrix),J.projectionMatrixInverse.copy(de.projectionMatrixInverse);else{let qe=ht+I,rt=We+I,oe=ut-Tt,dt=Xt+(Ee-Tt),A=$e*We/rt*qe,b=ot*We/rt*qe;J.projectionMatrix.makePerspective(oe,dt,A,b,qe,rt),J.projectionMatrixInverse.copy(J.projectionMatrix).invert()}}function xe(J,de){de===null?J.matrixWorld.copy(J.matrix):J.matrixWorld.multiplyMatrices(de.matrixWorld,J.matrix),J.matrixWorldInverse.copy(J.matrixWorld).invert()}this.updateCamera=function(J){if(i===null)return;let de=J.near,ie=J.far;m.texture!==null&&(m.depthNear>0&&(de=m.depthNear),m.depthFar>0&&(ie=m.depthFar)),O.near=L.near=w.near=de,O.far=L.far=w.far=ie,(H!==O.near||q!==O.far)&&(i.updateRenderState({depthNear:O.near,depthFar:O.far}),H=O.near,q=O.far),O.layers.mask=J.layers.mask|6,w.layers.mask=O.layers.mask&-5,L.layers.mask=O.layers.mask&-3;let Ee=J.parent,Ie=O.cameras;xe(O,Ee);for(let Re=0;Re<Ie.length;Re++)xe(Ie[Re],Ee);Ie.length===2?le(O,w,L):O.projectionMatrix.copy(w.projectionMatrix),Se(J,O,Ee)};function Se(J,de,ie){ie===null?J.matrix.copy(de.matrixWorld):(J.matrix.copy(ie.matrixWorld),J.matrix.invert(),J.matrix.multiply(de.matrixWorld)),J.matrix.decompose(J.position,J.quaternion,J.scale),J.updateMatrixWorld(!0),J.projectionMatrix.copy(de.projectionMatrix),J.projectionMatrixInverse.copy(de.projectionMatrixInverse),J.isPerspectiveCamera&&(J.fov=Li*2*Math.atan(1/J.projectionMatrix.elements[5]),J.zoom=1)}this.getCamera=function(){return O},this.getFoveation=function(){if(!(d===null&&f===null))return c},this.setFoveation=function(J){c=J,d!==null&&(d.fixedFoveation=J),f!==null&&f.fixedFoveation!==void 0&&(f.fixedFoveation=J)},this.hasDepthSensing=function(){return m.texture!==null},this.getDepthSensingMesh=function(){return m.getMesh(O)},this.getCameraTexture=function(J){return p[J]};let Xe=null;function Ze(J,de){if(h=de.getViewerPose(l||a),g=de,h!==null){let ie=h.views;f!==null&&(e.setRenderTargetFramebuffer(M,f.framebuffer),e.setRenderTarget(M));let Ee=!1;ie.length!==O.cameras.length&&(O.cameras.length=0,Ee=!0);for(let We=0;We<ie.length;We++){let $e=ie[We],ot=null;if(f!==null)ot=f.getViewport($e);else{let At=u.getViewSubImage(d,$e);ot=At.viewport,We===0&&(e.setRenderTargetTextures(M,At.colorTexture,At.depthStencilTexture),e.setRenderTarget(M))}let Ge=R[We];Ge===void 0&&(Ge=new Mt,Ge.layers.enable(We),Ge.viewport=new nt,R[We]=Ge),Ge.matrix.fromArray($e.transform.matrix),Ge.matrix.decompose(Ge.position,Ge.quaternion,Ge.scale),Ge.projectionMatrix.fromArray($e.projectionMatrix),Ge.projectionMatrixInverse.copy(Ge.projectionMatrix).invert(),Ge.viewport.set(ot.x,ot.y,ot.width,ot.height),We===0&&(O.matrix.copy(Ge.matrix),O.matrix.decompose(O.position,O.quaternion,O.scale)),Ee===!0&&O.cameras.push(Ge)}let Ie=i.enabledFeatures;if(Ie&&Ie.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&_){u=n.getBinding();let We=u.getDepthInformation(ie[0]);We&&We.isValid&&We.texture&&m.init(We,i.renderState)}if(Ie&&Ie.includes("camera-access")&&_){e.state.unbindTexture(),u=n.getBinding();for(let We=0;We<ie.length;We++){let $e=ie[We].camera;if($e){let ot=p[$e];ot||(ot=new lr,p[$e]=ot);let Ge=u.getCameraImage($e);ot.sourceTexture=Ge}}}}for(let ie=0;ie<E.length;ie++){let Ee=T[ie],Ie=E[ie];Ee!==null&&Ie!==void 0&&Ie.update(Ee,de,l||a)}Xe&&Xe(J,de),de.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:de}),g=null}let Fe=new wd;Fe.setAnimationLoop(Ze),this.setAnimationLoop=function(J){Xe=J},this.dispose=function(){}}},Q0=new Ue,Ld=new Pe;Ld.set(-1,0,0,0,1,0,0,0,1);function ex(s,e){function t(m,p){m.matrixAutoUpdate===!0&&m.updateMatrix(),p.value.copy(m.matrix)}function n(m,p){p.color.getRGB(m.fogColor.value,bl(s)),p.isFog?(m.fogNear.value=p.near,m.fogFar.value=p.far):p.isFogExp2&&(m.fogDensity.value=p.density)}function i(m,p,v,S,M){p.isNodeMaterial?p.uniformsNeedUpdate=!1:p.isMeshBasicMaterial?r(m,p):p.isMeshLambertMaterial?(r(m,p),p.envMap&&(m.envMapIntensity.value=p.envMapIntensity)):p.isMeshToonMaterial?(r(m,p),u(m,p)):p.isMeshPhongMaterial?(r(m,p),h(m,p),p.envMap&&(m.envMapIntensity.value=p.envMapIntensity)):p.isMeshStandardMaterial?(r(m,p),d(m,p),p.isMeshPhysicalMaterial&&f(m,p,M)):p.isMeshMatcapMaterial?(r(m,p),g(m,p)):p.isMeshDepthMaterial?r(m,p):p.isMeshDistanceMaterial?(r(m,p),_(m,p)):p.isMeshNormalMaterial?r(m,p):p.isLineBasicMaterial?(a(m,p),p.isLineDashedMaterial&&o(m,p)):p.isPointsMaterial?c(m,p,v,S):p.isSpriteMaterial?l(m,p):p.isShadowMaterial?(m.color.value.copy(p.color),m.opacity.value=p.opacity):p.isShaderMaterial&&(p.uniformsNeedUpdate=!1)}function r(m,p){m.opacity.value=p.opacity,p.color&&m.diffuse.value.copy(p.color),p.emissive&&m.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity),p.map&&(m.map.value=p.map,t(p.map,m.mapTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.bumpMap&&(m.bumpMap.value=p.bumpMap,t(p.bumpMap,m.bumpMapTransform),m.bumpScale.value=p.bumpScale,p.side===Pt&&(m.bumpScale.value*=-1)),p.normalMap&&(m.normalMap.value=p.normalMap,t(p.normalMap,m.normalMapTransform),m.normalScale.value.copy(p.normalScale),p.side===Pt&&m.normalScale.value.negate()),p.displacementMap&&(m.displacementMap.value=p.displacementMap,t(p.displacementMap,m.displacementMapTransform),m.displacementScale.value=p.displacementScale,m.displacementBias.value=p.displacementBias),p.emissiveMap&&(m.emissiveMap.value=p.emissiveMap,t(p.emissiveMap,m.emissiveMapTransform)),p.specularMap&&(m.specularMap.value=p.specularMap,t(p.specularMap,m.specularMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest);let v=e.get(p),S=v.envMap,M=v.envMapRotation;S&&(m.envMap.value=S,m.envMapRotation.value.setFromMatrix4(Q0.makeRotationFromEuler(M)).transpose(),S.isCubeTexture&&S.isRenderTargetTexture===!1&&m.envMapRotation.value.premultiply(Ld),m.reflectivity.value=p.reflectivity,m.ior.value=p.ior,m.refractionRatio.value=p.refractionRatio),p.lightMap&&(m.lightMap.value=p.lightMap,m.lightMapIntensity.value=p.lightMapIntensity,t(p.lightMap,m.lightMapTransform)),p.aoMap&&(m.aoMap.value=p.aoMap,m.aoMapIntensity.value=p.aoMapIntensity,t(p.aoMap,m.aoMapTransform))}function a(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,p.map&&(m.map.value=p.map,t(p.map,m.mapTransform))}function o(m,p){m.dashSize.value=p.dashSize,m.totalSize.value=p.dashSize+p.gapSize,m.scale.value=p.scale}function c(m,p,v,S){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.size.value=p.size*v,m.scale.value=S*.5,p.map&&(m.map.value=p.map,t(p.map,m.uvTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function l(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.rotation.value=p.rotation,p.map&&(m.map.value=p.map,t(p.map,m.mapTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function h(m,p){m.specular.value.copy(p.specular),m.shininess.value=Math.max(p.shininess,1e-4)}function u(m,p){p.gradientMap&&(m.gradientMap.value=p.gradientMap)}function d(m,p){m.metalness.value=p.metalness,p.metalnessMap&&(m.metalnessMap.value=p.metalnessMap,t(p.metalnessMap,m.metalnessMapTransform)),m.roughness.value=p.roughness,p.roughnessMap&&(m.roughnessMap.value=p.roughnessMap,t(p.roughnessMap,m.roughnessMapTransform)),p.envMap&&(m.envMapIntensity.value=p.envMapIntensity)}function f(m,p,v){m.ior.value=p.ior,p.sheen>0&&(m.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen),m.sheenRoughness.value=p.sheenRoughness,p.sheenColorMap&&(m.sheenColorMap.value=p.sheenColorMap,t(p.sheenColorMap,m.sheenColorMapTransform)),p.sheenRoughnessMap&&(m.sheenRoughnessMap.value=p.sheenRoughnessMap,t(p.sheenRoughnessMap,m.sheenRoughnessMapTransform))),p.clearcoat>0&&(m.clearcoat.value=p.clearcoat,m.clearcoatRoughness.value=p.clearcoatRoughness,p.clearcoatMap&&(m.clearcoatMap.value=p.clearcoatMap,t(p.clearcoatMap,m.clearcoatMapTransform)),p.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=p.clearcoatRoughnessMap,t(p.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),p.clearcoatNormalMap&&(m.clearcoatNormalMap.value=p.clearcoatNormalMap,t(p.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(p.clearcoatNormalScale),p.side===Pt&&m.clearcoatNormalScale.value.negate())),p.dispersion>0&&(m.dispersion.value=p.dispersion),p.iridescence>0&&(m.iridescence.value=p.iridescence,m.iridescenceIOR.value=p.iridescenceIOR,m.iridescenceThicknessMinimum.value=p.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=p.iridescenceThicknessRange[1],p.iridescenceMap&&(m.iridescenceMap.value=p.iridescenceMap,t(p.iridescenceMap,m.iridescenceMapTransform)),p.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=p.iridescenceThicknessMap,t(p.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),p.transmission>0&&(m.transmission.value=p.transmission,m.transmissionSamplerMap.value=v.texture,m.transmissionSamplerSize.value.set(v.width,v.height),p.transmissionMap&&(m.transmissionMap.value=p.transmissionMap,t(p.transmissionMap,m.transmissionMapTransform)),m.thickness.value=p.thickness,p.thicknessMap&&(m.thicknessMap.value=p.thicknessMap,t(p.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=p.attenuationDistance,m.attenuationColor.value.copy(p.attenuationColor)),p.anisotropy>0&&(m.anisotropyVector.value.set(p.anisotropy*Math.cos(p.anisotropyRotation),p.anisotropy*Math.sin(p.anisotropyRotation)),p.anisotropyMap&&(m.anisotropyMap.value=p.anisotropyMap,t(p.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=p.specularIntensity,m.specularColor.value.copy(p.specularColor),p.specularColorMap&&(m.specularColorMap.value=p.specularColorMap,t(p.specularColorMap,m.specularColorMapTransform)),p.specularIntensityMap&&(m.specularIntensityMap.value=p.specularIntensityMap,t(p.specularIntensityMap,m.specularIntensityMapTransform))}function g(m,p){p.matcap&&(m.matcap.value=p.matcap)}function _(m,p){let v=e.get(p).light;m.referencePosition.value.setFromMatrixPosition(v.matrixWorld),m.nearDistance.value=v.shadow.camera.near,m.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function tx(s,e,t,n){let i={},r={},a=[],o=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function c(v,S){let M=S.program;n.uniformBlockBinding(v,M)}function l(v,S){let M=i[v.id];M===void 0&&(g(v),M=h(v),i[v.id]=M,v.addEventListener("dispose",m));let E=S.program;n.updateUBOMapping(v,E);let T=e.render.frame;r[v.id]!==T&&(d(v),r[v.id]=T)}function h(v){let S=u();v.__bindingPointIndex=S;let M=s.createBuffer(),E=v.__size,T=v.usage;return s.bindBuffer(s.UNIFORM_BUFFER,M),s.bufferData(s.UNIFORM_BUFFER,E,T),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,S,M),M}function u(){for(let v=0;v<o;v++)if(a.indexOf(v)===-1)return a.push(v),v;return we("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function d(v){let S=i[v.id],M=v.uniforms,E=v.__cache;s.bindBuffer(s.UNIFORM_BUFFER,S);for(let T=0,C=M.length;T<C;T++){let x=Array.isArray(M[T])?M[T]:[M[T]];for(let w=0,L=x.length;w<L;w++){let R=x[w];if(f(R,T,w,E)===!0){let O=R.__offset,H=Array.isArray(R.value)?R.value:[R.value],q=0;for(let N=0;N<H.length;N++){let z=H[N],V=_(z);typeof z=="number"||typeof z=="boolean"?(R.__data[0]=z,s.bufferSubData(s.UNIFORM_BUFFER,O+q,R.__data)):z.isMatrix3?(R.__data[0]=z.elements[0],R.__data[1]=z.elements[1],R.__data[2]=z.elements[2],R.__data[3]=0,R.__data[4]=z.elements[3],R.__data[5]=z.elements[4],R.__data[6]=z.elements[5],R.__data[7]=0,R.__data[8]=z.elements[6],R.__data[9]=z.elements[7],R.__data[10]=z.elements[8],R.__data[11]=0):ArrayBuffer.isView(z)?R.__data.set(new z.constructor(z.buffer,z.byteOffset,R.__data.length)):(z.toArray(R.__data,q),q+=V.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,O,R.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function f(v,S,M,E){let T=v.value,C=S+"_"+M;if(E[C]===void 0)return typeof T=="number"||typeof T=="boolean"?E[C]=T:ArrayBuffer.isView(T)?E[C]=T.slice():E[C]=T.clone(),!0;{let x=E[C];if(typeof T=="number"||typeof T=="boolean"){if(x!==T)return E[C]=T,!0}else{if(ArrayBuffer.isView(T))return!0;if(x.equals(T)===!1)return x.copy(T),!0}}return!1}function g(v){let S=v.uniforms,M=0,E=16;for(let C=0,x=S.length;C<x;C++){let w=Array.isArray(S[C])?S[C]:[S[C]];for(let L=0,R=w.length;L<R;L++){let O=w[L],H=Array.isArray(O.value)?O.value:[O.value];for(let q=0,N=H.length;q<N;q++){let z=H[q],V=_(z),$=M%E,Q=$%V.boundary,le=$+Q;M+=Q,le!==0&&E-le<V.storage&&(M+=E-le),O.__data=new Float32Array(V.storage/Float32Array.BYTES_PER_ELEMENT),O.__offset=M,M+=V.storage}}}let T=M%E;return T>0&&(M+=E-T),v.__size=M,v.__cache={},this}function _(v){let S={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(S.boundary=4,S.storage=4):v.isVector2?(S.boundary=8,S.storage=8):v.isVector3||v.isColor?(S.boundary=16,S.storage=12):v.isVector4?(S.boundary=16,S.storage=16):v.isMatrix3?(S.boundary=48,S.storage=48):v.isMatrix4?(S.boundary=64,S.storage=64):v.isTexture?_e("WebGLRenderer: Texture samplers can not be part of an uniforms group."):ArrayBuffer.isView(v)?(S.boundary=16,S.storage=v.byteLength):_e("WebGLRenderer: Unsupported uniform value type.",v),S}function m(v){let S=v.target;S.removeEventListener("dispose",m);let M=a.indexOf(S.__bindingPointIndex);a.splice(M,1),s.deleteBuffer(i[S.id]),delete i[S.id],delete r[S.id]}function p(){for(let v in i)s.deleteBuffer(i[v]);a=[],i={},r={}}return{bind:c,update:l,dispose:p}}var nx=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]),Nn=null;function ix(){return Nn===null&&(Nn=new _s(nx,16,16,gi,Fn),Nn.name="DFG_LUT",Nn.minFilter=_t,Nn.magFilter=_t,Nn.wrapS=nn,Nn.wrapT=nn,Nn.generateMipmaps=!1,Nn.needsUpdate=!0),Nn}var Xo=class{constructor(e={}){let{canvas:t=Yu(),context:n=null,depth:i=!0,stencil:r=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:l=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:u=!1,reversedDepthBuffer:d=!1,outputBufferType:f=qt}=e;this.isWebGLRenderer=!0;let g;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");g=n.getContextAttributes().alpha}else g=a;let _=f,m=new Set([co,oo,ao]),p=new Set([qt,_n,ws,Es,io,so]),v=new Uint32Array(4),S=new Int32Array(4),M=new F,E=null,T=null,C=[],x=[],w=null;this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=bn,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let L=this,R=!1,O=null;this._outputColorSpace=bt;let H=0,q=0,N=null,z=-1,V=null,$=new nt,Q=new nt,le=null,xe=new Te(0),Se=0,Xe=t.width,Ze=t.height,Fe=1,J=null,de=null,ie=new nt(0,0,Xe,Ze),Ee=new nt(0,0,Xe,Ze),Ie=!1,Re=new vs,ht=!1,We=!1,$e=new Ue,ot=new F,Ge=new nt,At={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},ut=!1;function Xt(){return N===null?Fe:1}let I=n;function Tt(y,D){return t.getContext(y,D)}try{let y={alpha:!0,depth:i,stencil:r,antialias:o,premultipliedAlpha:c,preserveDrawingBuffer:l,powerPreference:h,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${"184"}`),t.addEventListener("webglcontextlost",Y,!1),t.addEventListener("webglcontextrestored",ye,!1),t.addEventListener("webglcontextcreationerror",Le,!1),I===null){let D="webgl2";if(I=Tt(D,y),I===null)throw Tt(D)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(y){throw we("WebGLRenderer: "+y.message),y}let qe,rt,oe,dt,A,b,U,j,Z,ee,ae,W,K,fe,ge,se,te,Ce,Ne,Ke,P,ne,X;function pe(){qe=new hb(I),qe.init(),P=new Y0(I,qe),rt=new nb(I,qe,e,P),oe=new K0(I,qe),rt.reversedDepthBuffer&&d&&oe.buffers.depth.setReversed(!0),dt=new fb(I),A=new F0,b=new J0(I,qe,oe,A,rt,P,dt),U=new lb(L),j=new bp(I),ne=new eb(I,j),Z=new ub(I,j,dt,ne),ee=new mb(I,Z,j,ne,dt),Ce=new pb(I,rt,b),ge=new ib(A),ae=new D0(L,U,qe,rt,ne,ge),W=new ex(L,A),K=new U0,fe=new V0(qe),te=new Qg(L,U,oe,ee,g,c),se=new j0(L,ee,rt),X=new tx(I,dt,rt,oe),Ne=new tb(I,qe,dt),Ke=new db(I,qe,dt),dt.programs=ae.programs,L.capabilities=rt,L.extensions=qe,L.properties=A,L.renderLists=K,L.shadowMap=se,L.state=oe,L.info=dt}pe(),_!==qt&&(w=new bb(_,t.width,t.height,i,r));let re=new zl(L,I);this.xr=re,this.getContext=function(){return I},this.getContextAttributes=function(){return I.getContextAttributes()},this.forceContextLoss=function(){let y=qe.get("WEBGL_lose_context");y&&y.loseContext()},this.forceContextRestore=function(){let y=qe.get("WEBGL_lose_context");y&&y.restoreContext()},this.getPixelRatio=function(){return Fe},this.setPixelRatio=function(y){y!==void 0&&(Fe=y,this.setSize(Xe,Ze,!1))},this.getSize=function(y){return y.set(Xe,Ze)},this.setSize=function(y,D,G=!0){if(re.isPresenting){_e("WebGLRenderer: Can't change size while VR device is presenting.");return}Xe=y,Ze=D,t.width=Math.floor(y*Fe),t.height=Math.floor(D*Fe),G===!0&&(t.style.width=y+"px",t.style.height=D+"px"),w!==null&&w.setSize(t.width,t.height),this.setViewport(0,0,y,D)},this.getDrawingBufferSize=function(y){return y.set(Xe*Fe,Ze*Fe).floor()},this.setDrawingBufferSize=function(y,D,G){Xe=y,Ze=D,Fe=G,t.width=Math.floor(y*G),t.height=Math.floor(D*G),this.setViewport(0,0,y,D)},this.setEffects=function(y){if(_===qt){we("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(y){for(let D=0;D<y.length;D++)if(y[D].isOutputPass===!0){_e("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}w.setEffects(y||[])},this.getCurrentViewport=function(y){return y.copy($)},this.getViewport=function(y){return y.copy(ie)},this.setViewport=function(y,D,G,k){y.isVector4?ie.set(y.x,y.y,y.z,y.w):ie.set(y,D,G,k),oe.viewport($.copy(ie).multiplyScalar(Fe).round())},this.getScissor=function(y){return y.copy(Ee)},this.setScissor=function(y,D,G,k){y.isVector4?Ee.set(y.x,y.y,y.z,y.w):Ee.set(y,D,G,k),oe.scissor(Q.copy(Ee).multiplyScalar(Fe).round())},this.getScissorTest=function(){return Ie},this.setScissorTest=function(y){oe.setScissorTest(Ie=y)},this.setOpaqueSort=function(y){J=y},this.setTransparentSort=function(y){de=y},this.getClearColor=function(y){return y.copy(te.getClearColor())},this.setClearColor=function(){te.setClearColor(...arguments)},this.getClearAlpha=function(){return te.getClearAlpha()},this.setClearAlpha=function(){te.setClearAlpha(...arguments)},this.clear=function(y=!0,D=!0,G=!0){let k=0;if(y){let B=!1;if(N!==null){let ue=N.texture.format;B=m.has(ue)}if(B){let ue=N.texture.type,be=p.has(ue),he=te.getClearColor(),ve=te.getClearAlpha(),Me=he.r,De=he.g,ke=he.b;be?(v[0]=Me,v[1]=De,v[2]=ke,v[3]=ve,I.clearBufferuiv(I.COLOR,0,v)):(S[0]=Me,S[1]=De,S[2]=ke,S[3]=ve,I.clearBufferiv(I.COLOR,0,S))}else k|=I.COLOR_BUFFER_BIT}D&&(k|=I.DEPTH_BUFFER_BIT,this.state.buffers.depth.setMask(!0)),G&&(k|=I.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),k!==0&&I.clear(k)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.setNodesHandler=function(y){y.setRenderer(this),O=y},this.dispose=function(){t.removeEventListener("webglcontextlost",Y,!1),t.removeEventListener("webglcontextrestored",ye,!1),t.removeEventListener("webglcontextcreationerror",Le,!1),te.dispose(),K.dispose(),fe.dispose(),A.dispose(),U.dispose(),ee.dispose(),ne.dispose(),X.dispose(),ae.dispose(),re.dispose(),re.removeEventListener("sessionstart",Ah),re.removeEventListener("sessionend",Th),vi.stop()};function Y(y){y.preventDefault(),$s("WebGLRenderer: Context Lost."),R=!0}function ye(){$s("WebGLRenderer: Context Restored."),R=!1;let y=dt.autoReset,D=se.enabled,G=se.autoUpdate,k=se.needsUpdate,B=se.type;pe(),dt.autoReset=y,se.enabled=D,se.autoUpdate=G,se.needsUpdate=k,se.type=B}function Le(y){we("WebGLRenderer: A WebGL context could not be created. Reason: ",y.statusMessage)}function pt(y){let D=y.target;D.removeEventListener("dispose",pt),Qe(D)}function Qe(y){Bn(y),A.remove(y)}function Bn(y){let D=A.get(y).programs;D!==void 0&&(D.forEach(function(G){ae.releaseProgram(G)}),y.isShaderMaterial&&ae.releaseShaderCache(y))}this.renderBufferDirect=function(y,D,G,k,B,ue){D===null&&(D=At);let be=B.isMesh&&B.matrixWorld.determinant()<0,he=of(y,D,G,k,B);oe.setMaterial(k,be);let ve=G.index,Me=1;if(k.wireframe===!0){if(ve=Z.getWireframeAttribute(G),ve===void 0)return;Me=2}let De=G.drawRange,ke=G.attributes.position,Ae=De.start*Me,et=(De.start+De.count)*Me;ue!==null&&(Ae=Math.max(Ae,ue.start*Me),et=Math.min(et,(ue.start+ue.count)*Me)),ve!==null?(Ae=Math.max(Ae,0),et=Math.min(et,ve.count)):ke!=null&&(Ae=Math.max(Ae,0),et=Math.min(et,ke.count));let mt=et-Ae;if(mt<0||mt===1/0)return;ne.setup(B,k,he,G,ve);let ft,it=Ne;if(ve!==null&&(ft=j.get(ve),it=Ke,it.setIndex(ft)),B.isMesh)k.wireframe===!0?(oe.setLineWidth(k.wireframeLinewidth*Xt()),it.setMode(I.LINES)):it.setMode(I.TRIANGLES);else if(B.isLine){let It=k.linewidth;It===void 0&&(It=1),oe.setLineWidth(It*Xt()),B.isLineSegments?it.setMode(I.LINES):B.isLineLoop?it.setMode(I.LINE_LOOP):it.setMode(I.LINE_STRIP)}else B.isPoints?it.setMode(I.POINTS):B.isSprite&&it.setMode(I.TRIANGLES);if(B.isBatchedMesh)if(qe.get("WEBGL_multi_draw"))it.renderMultiDraw(B._multiDrawStarts,B._multiDrawCounts,B._multiDrawCount);else{let It=B._multiDrawStarts,me=B._multiDrawCounts,jt=B._multiDrawCount,je=ve?j.get(ve).bytesPerElement:1,en=A.get(k).currentProgram.getUniforms();for(let yn=0;yn<jt;yn++)en.setValue(I,"_gl_DrawID",yn),it.render(It[yn]/je,me[yn])}else if(B.isInstancedMesh)it.renderInstances(Ae,mt,B.count);else if(G.isInstancedBufferGeometry){let It=G._maxInstanceCount!==void 0?G._maxInstanceCount:1/0,me=Math.min(G.instanceCount,It);it.renderInstances(Ae,mt,me)}else it.render(Ae,mt)};function vn(y,D,G){y.transparent===!0&&y.side===sn&&y.forceSinglePass===!1?(y.side=Pt,y.needsUpdate=!0,jr(y,D,G),y.side=pn,y.needsUpdate=!0,jr(y,D,G),y.side=sn):jr(y,D,G)}this.compile=function(y,D,G=null){G===null&&(G=y),T=fe.get(G),T.init(D),x.push(T),G.traverseVisible(function(B){B.isLight&&B.layers.test(D.layers)&&(T.pushLight(B),B.castShadow&&T.pushShadow(B))}),y!==G&&y.traverseVisible(function(B){B.isLight&&B.layers.test(D.layers)&&(T.pushLight(B),B.castShadow&&T.pushShadow(B))}),T.setupLights();let k=new Set;return y.traverse(function(B){if(!(B.isMesh||B.isPoints||B.isLine||B.isSprite))return;let ue=B.material;if(ue)if(Array.isArray(ue))for(let be=0;be<ue.length;be++){let he=ue[be];vn(he,G,B),k.add(he)}else vn(ue,G,B),k.add(ue)}),T=x.pop(),k},this.compileAsync=function(y,D,G=null){let k=this.compile(y,D,G);return new Promise(B=>{function ue(){if(k.forEach(function(be){A.get(be).currentProgram.isReady()&&k.delete(be)}),k.size===0){B(y);return}setTimeout(ue,10)}qe.get("KHR_parallel_shader_compile")!==null?ue():setTimeout(ue,10)})};let fc=null;function rf(y){fc&&fc(y)}function Ah(){vi.stop()}function Th(){vi.start()}let vi=new wd;vi.setAnimationLoop(rf),typeof self<"u"&&vi.setContext(self),this.setAnimationLoop=function(y){fc=y,re.setAnimationLoop(y),y===null?vi.stop():vi.start()},re.addEventListener("sessionstart",Ah),re.addEventListener("sessionend",Th),this.render=function(y,D){if(D!==void 0&&D.isCamera!==!0){we("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(R===!0)return;O!==null&&O.renderStart(y,D);let G=re.enabled===!0&&re.isPresenting===!0,k=w!==null&&(N===null||G)&&w.begin(L,N);if(y.matrixWorldAutoUpdate===!0&&y.updateMatrixWorld(),D.parent===null&&D.matrixWorldAutoUpdate===!0&&D.updateMatrixWorld(),re.enabled===!0&&re.isPresenting===!0&&(w===null||w.isCompositing()===!1)&&(re.cameraAutoUpdate===!0&&re.updateCamera(D),D=re.getCamera()),y.isScene===!0&&y.onBeforeRender(L,y,D,N),T=fe.get(y,x.length),T.init(D),T.state.textureUnits=b.getTextureUnits(),x.push(T),$e.multiplyMatrices(D.projectionMatrix,D.matrixWorldInverse),Re.setFromProjectionMatrix($e,un,D.reversedDepth),We=this.localClippingEnabled,ht=ge.init(this.clippingPlanes,We),E=K.get(y,C.length),E.init(),C.push(E),re.enabled===!0&&re.isPresenting===!0){let be=L.xr.getDepthSensingMesh();be!==null&&pc(be,D,-1/0,L.sortObjects)}pc(y,D,0,L.sortObjects),E.finish(),L.sortObjects===!0&&E.sort(J,de),ut=re.enabled===!1||re.isPresenting===!1||re.hasDepthSensing()===!1,ut&&te.addToRenderList(E,y),this.info.render.frame++,ht===!0&&ge.beginShadows();let B=T.state.shadowsArray;if(se.render(B,y,D),ht===!0&&ge.endShadows(),this.info.autoReset===!0&&this.info.reset(),(k&&w.hasRenderPass())===!1){let be=E.opaque,he=E.transmissive;if(T.setupLights(),D.isArrayCamera){let ve=D.cameras;if(he.length>0)for(let Me=0,De=ve.length;Me<De;Me++){let ke=ve[Me];Eh(be,he,y,ke)}ut&&te.render(y);for(let Me=0,De=ve.length;Me<De;Me++){let ke=ve[Me];wh(E,y,ke,ke.viewport)}}else he.length>0&&Eh(be,he,y,D),ut&&te.render(y),wh(E,y,D)}N!==null&&q===0&&(b.updateMultisampleRenderTarget(N),b.updateRenderTargetMipmap(N)),k&&w.end(L),y.isScene===!0&&y.onAfterRender(L,y,D),ne.resetDefaultState(),z=-1,V=null,x.pop(),x.length>0?(T=x[x.length-1],b.setTextureUnits(T.state.textureUnits),ht===!0&&ge.setGlobalState(L.clippingPlanes,T.state.camera)):T=null,C.pop(),C.length>0?E=C[C.length-1]:E=null,O!==null&&O.renderEnd()};function pc(y,D,G,k){if(y.visible===!1)return;if(y.layers.test(D.layers)){if(y.isGroup)G=y.renderOrder;else if(y.isLOD)y.autoUpdate===!0&&y.update(D);else if(y.isLightProbeGrid)T.pushLightProbeGrid(y);else if(y.isLight)T.pushLight(y),y.castShadow&&T.pushShadow(y);else if(y.isSprite){if(!y.frustumCulled||Re.intersectsSprite(y)){k&&Ge.setFromMatrixPosition(y.matrixWorld).applyMatrix4($e);let be=ee.update(y),he=y.material;he.visible&&E.push(y,be,he,G,Ge.z,null)}}else if((y.isMesh||y.isLine||y.isPoints)&&(!y.frustumCulled||Re.intersectsObject(y))){let be=ee.update(y),he=y.material;if(k&&(y.boundingSphere!==void 0?(y.boundingSphere===null&&y.computeBoundingSphere(),Ge.copy(y.boundingSphere.center)):(be.boundingSphere===null&&be.computeBoundingSphere(),Ge.copy(be.boundingSphere.center)),Ge.applyMatrix4(y.matrixWorld).applyMatrix4($e)),Array.isArray(he)){let ve=be.groups;for(let Me=0,De=ve.length;Me<De;Me++){let ke=ve[Me],Ae=he[ke.materialIndex];Ae&&Ae.visible&&E.push(y,be,Ae,G,Ge.z,ke)}}else he.visible&&E.push(y,be,he,G,Ge.z,null)}}let ue=y.children;for(let be=0,he=ue.length;be<he;be++)pc(ue[be],D,G,k)}function wh(y,D,G,k){let{opaque:B,transmissive:ue,transparent:be}=y;T.setupLightsView(G),ht===!0&&ge.setGlobalState(L.clippingPlanes,G),k&&oe.viewport($.copy(k)),B.length>0&&Xr(B,D,G),ue.length>0&&Xr(ue,D,G),be.length>0&&Xr(be,D,G),oe.buffers.depth.setTest(!0),oe.buffers.depth.setMask(!0),oe.buffers.color.setMask(!0),oe.setPolygonOffset(!1)}function Eh(y,D,G,k){if((G.isScene===!0?G.overrideMaterial:null)!==null)return;if(T.state.transmissionRenderTarget[k.id]===void 0){let Ae=qe.has("EXT_color_buffer_half_float")||qe.has("EXT_color_buffer_float");T.state.transmissionRenderTarget[k.id]=new Yt(1,1,{generateMipmaps:!0,type:Ae?Fn:qt,minFilter:xn,samples:Math.max(4,rt.samples),stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Be.workingColorSpace})}let ue=T.state.transmissionRenderTarget[k.id],be=k.viewport||$;ue.setSize(be.z*L.transmissionResolutionScale,be.w*L.transmissionResolutionScale);let he=L.getRenderTarget(),ve=L.getActiveCubeFace(),Me=L.getActiveMipmapLevel();L.setRenderTarget(ue),L.getClearColor(xe),Se=L.getClearAlpha(),Se<1&&L.setClearColor(16777215,.5),L.clear(),ut&&te.render(G);let De=L.toneMapping;L.toneMapping=bn;let ke=k.viewport;if(k.viewport!==void 0&&(k.viewport=void 0),T.setupLightsView(k),ht===!0&&ge.setGlobalState(L.clippingPlanes,k),Xr(y,G,k),b.updateMultisampleRenderTarget(ue),b.updateRenderTargetMipmap(ue),qe.has("WEBGL_multisampled_render_to_texture")===!1){let Ae=!1;for(let et=0,mt=D.length;et<mt;et++){let ft=D[et],{object:it,geometry:It,material:me,group:jt}=ft;if(me.side===sn&&it.layers.test(k.layers)){let je=me.side;me.side=Pt,me.needsUpdate=!0,Rh(it,G,k,It,me,jt),me.side=je,me.needsUpdate=!0,Ae=!0}}Ae===!0&&(b.updateMultisampleRenderTarget(ue),b.updateRenderTargetMipmap(ue))}L.setRenderTarget(he,ve,Me),L.setClearColor(xe,Se),ke!==void 0&&(k.viewport=ke),L.toneMapping=De}function Xr(y,D,G){let k=D.isScene===!0?D.overrideMaterial:null;for(let B=0,ue=y.length;B<ue;B++){let be=y[B],{object:he,geometry:ve,group:Me}=be,De=be.material;De.allowOverride===!0&&k!==null&&(De=k),he.layers.test(G.layers)&&Rh(he,D,G,ve,De,Me)}}function Rh(y,D,G,k,B,ue){y.onBeforeRender(L,D,G,k,B,ue),y.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse,y.matrixWorld),y.normalMatrix.getNormalMatrix(y.modelViewMatrix),B.onBeforeRender(L,D,G,k,y,ue),B.transparent===!0&&B.side===sn&&B.forceSinglePass===!1?(B.side=Pt,B.needsUpdate=!0,L.renderBufferDirect(G,D,k,B,y,ue),B.side=pn,B.needsUpdate=!0,L.renderBufferDirect(G,D,k,B,y,ue),B.side=sn):L.renderBufferDirect(G,D,k,B,y,ue),y.onAfterRender(L,D,G,k,B,ue)}function jr(y,D,G){D.isScene!==!0&&(D=At);let k=A.get(y),B=T.state.lights,ue=T.state.shadowsArray,be=B.state.version,he=ae.getParameters(y,B.state,ue,D,G,T.state.lightProbeGridArray),ve=ae.getProgramCacheKey(he),Me=k.programs;k.environment=y.isMeshStandardMaterial||y.isMeshLambertMaterial||y.isMeshPhongMaterial?D.environment:null,k.fog=D.fog;let De=y.isMeshStandardMaterial||y.isMeshLambertMaterial&&!y.envMap||y.isMeshPhongMaterial&&!y.envMap;k.envMap=U.get(y.envMap||k.environment,De),k.envMapRotation=k.environment!==null&&y.envMap===null?D.environmentRotation:y.envMapRotation,Me===void 0&&(y.addEventListener("dispose",pt),Me=new Map,k.programs=Me);let ke=Me.get(ve);if(ke!==void 0){if(k.currentProgram===ke&&k.lightsStateVersion===be)return Ph(y,he),ke}else he.uniforms=ae.getUniforms(y),O!==null&&y.isNodeMaterial&&O.build(y,G,he),y.onBeforeCompile(he,L),ke=ae.acquireProgram(he,ve),Me.set(ve,ke),k.uniforms=he.uniforms;let Ae=k.uniforms;return(!y.isShaderMaterial&&!y.isRawShaderMaterial||y.clipping===!0)&&(Ae.clippingPlanes=ge.uniform),Ph(y,he),k.needsLights=lf(y),k.lightsStateVersion=be,k.needsLights&&(Ae.ambientLightColor.value=B.state.ambient,Ae.lightProbe.value=B.state.probe,Ae.directionalLights.value=B.state.directional,Ae.directionalLightShadows.value=B.state.directionalShadow,Ae.spotLights.value=B.state.spot,Ae.spotLightShadows.value=B.state.spotShadow,Ae.rectAreaLights.value=B.state.rectArea,Ae.ltc_1.value=B.state.rectAreaLTC1,Ae.ltc_2.value=B.state.rectAreaLTC2,Ae.pointLights.value=B.state.point,Ae.pointLightShadows.value=B.state.pointShadow,Ae.hemisphereLights.value=B.state.hemi,Ae.directionalShadowMatrix.value=B.state.directionalShadowMatrix,Ae.spotLightMatrix.value=B.state.spotLightMatrix,Ae.spotLightMap.value=B.state.spotLightMap,Ae.pointShadowMatrix.value=B.state.pointShadowMatrix),k.lightProbeGrid=T.state.lightProbeGridArray.length>0,k.currentProgram=ke,k.uniformsList=null,ke}function Ch(y){if(y.uniformsList===null){let D=y.currentProgram.getUniforms();y.uniformsList=Ps.seqWithValue(D.seq,y.uniforms)}return y.uniformsList}function Ph(y,D){let G=A.get(y);G.outputColorSpace=D.outputColorSpace,G.batching=D.batching,G.batchingColor=D.batchingColor,G.instancing=D.instancing,G.instancingColor=D.instancingColor,G.instancingMorph=D.instancingMorph,G.skinning=D.skinning,G.morphTargets=D.morphTargets,G.morphNormals=D.morphNormals,G.morphColors=D.morphColors,G.morphTargetsCount=D.morphTargetsCount,G.numClippingPlanes=D.numClippingPlanes,G.numIntersection=D.numClipIntersection,G.vertexAlphas=D.vertexAlphas,G.vertexTangents=D.vertexTangents,G.toneMapping=D.toneMapping}function af(y,D){if(y.length===0)return null;if(y.length===1)return y[0].texture!==null?y[0]:null;M.setFromMatrixPosition(D.matrixWorld);for(let G=0,k=y.length;G<k;G++){let B=y[G];if(B.texture!==null&&B.boundingBox.containsPoint(M))return B}return null}function of(y,D,G,k,B){D.isScene!==!0&&(D=At),b.resetTextureUnits();let ue=D.fog,be=k.isMeshStandardMaterial||k.isMeshLambertMaterial||k.isMeshPhongMaterial?D.environment:null,he=N===null?L.outputColorSpace:N.isXRRenderTarget===!0?N.texture.colorSpace:Be.workingColorSpace,ve=k.isMeshStandardMaterial||k.isMeshLambertMaterial&&!k.envMap||k.isMeshPhongMaterial&&!k.envMap,Me=U.get(k.envMap||be,ve),De=k.vertexColors===!0&&!!G.attributes.color&&G.attributes.color.itemSize===4,ke=!!G.attributes.tangent&&(!!k.normalMap||k.anisotropy>0),Ae=!!G.morphAttributes.position,et=!!G.morphAttributes.normal,mt=!!G.morphAttributes.color,ft=bn;k.toneMapped&&(N===null||N.isXRRenderTarget===!0)&&(ft=L.toneMapping);let it=G.morphAttributes.position||G.morphAttributes.normal||G.morphAttributes.color,It=it!==void 0?it.length:0,me=A.get(k),jt=T.state.lights;if(ht===!0&&(We===!0||y!==V)){let at=y===V&&k.id===z;ge.setState(k,y,at)}let je=!1;k.version===me.__version?(me.needsLights&&me.lightsStateVersion!==jt.state.version||me.outputColorSpace!==he||B.isBatchedMesh&&me.batching===!1||!B.isBatchedMesh&&me.batching===!0||B.isBatchedMesh&&me.batchingColor===!0&&B.colorTexture===null||B.isBatchedMesh&&me.batchingColor===!1&&B.colorTexture!==null||B.isInstancedMesh&&me.instancing===!1||!B.isInstancedMesh&&me.instancing===!0||B.isSkinnedMesh&&me.skinning===!1||!B.isSkinnedMesh&&me.skinning===!0||B.isInstancedMesh&&me.instancingColor===!0&&B.instanceColor===null||B.isInstancedMesh&&me.instancingColor===!1&&B.instanceColor!==null||B.isInstancedMesh&&me.instancingMorph===!0&&B.morphTexture===null||B.isInstancedMesh&&me.instancingMorph===!1&&B.morphTexture!==null||me.envMap!==Me||k.fog===!0&&me.fog!==ue||me.numClippingPlanes!==void 0&&(me.numClippingPlanes!==ge.numPlanes||me.numIntersection!==ge.numIntersection)||me.vertexAlphas!==De||me.vertexTangents!==ke||me.morphTargets!==Ae||me.morphNormals!==et||me.morphColors!==mt||me.toneMapping!==ft||me.morphTargetsCount!==It||!!me.lightProbeGrid!=T.state.lightProbeGridArray.length>0)&&(je=!0):(je=!0,me.__version=k.version);let en=me.currentProgram;je===!0&&(en=jr(k,D,B),O&&k.isNodeMaterial&&O.onUpdateProgram(k,en,me));let yn=!1,$n=!1,ji=!1,st=en.getUniforms(),gt=me.uniforms;if(oe.useProgram(en.program)&&(yn=!0,$n=!0,ji=!0),k.id!==z&&(z=k.id,$n=!0),me.needsLights){let at=af(T.state.lightProbeGridArray,B);me.lightProbeGrid!==at&&(me.lightProbeGrid=at,$n=!0)}if(yn||V!==y){oe.buffers.depth.getReversed()&&y.reversedDepth!==!0&&(y._reversedDepth=!0,y.updateProjectionMatrix()),st.setValue(I,"projectionMatrix",y.projectionMatrix),st.setValue(I,"viewMatrix",y.matrixWorldInverse);let ei=st.map.cameraPosition;ei!==void 0&&ei.setValue(I,ot.setFromMatrixPosition(y.matrixWorld)),rt.logarithmicDepthBuffer&&st.setValue(I,"logDepthBufFC",2/(Math.log(y.far+1)/Math.LN2)),(k.isMeshPhongMaterial||k.isMeshToonMaterial||k.isMeshLambertMaterial||k.isMeshBasicMaterial||k.isMeshStandardMaterial||k.isShaderMaterial)&&st.setValue(I,"isOrthographic",y.isOrthographicCamera===!0),V!==y&&(V=y,$n=!0,ji=!0)}if(me.needsLights&&(jt.state.directionalShadowMap.length>0&&st.setValue(I,"directionalShadowMap",jt.state.directionalShadowMap,b),jt.state.spotShadowMap.length>0&&st.setValue(I,"spotShadowMap",jt.state.spotShadowMap,b),jt.state.pointShadowMap.length>0&&st.setValue(I,"pointShadowMap",jt.state.pointShadowMap,b)),B.isSkinnedMesh){st.setOptional(I,B,"bindMatrix"),st.setOptional(I,B,"bindMatrixInverse");let at=B.skeleton;at&&(at.boneTexture===null&&at.computeBoneTexture(),st.setValue(I,"boneTexture",at.boneTexture,b))}B.isBatchedMesh&&(st.setOptional(I,B,"batchingTexture"),st.setValue(I,"batchingTexture",B._matricesTexture,b),st.setOptional(I,B,"batchingIdTexture"),st.setValue(I,"batchingIdTexture",B._indirectTexture,b),st.setOptional(I,B,"batchingColorTexture"),B._colorsTexture!==null&&st.setValue(I,"batchingColorTexture",B._colorsTexture,b));let Qn=G.morphAttributes;if((Qn.position!==void 0||Qn.normal!==void 0||Qn.color!==void 0)&&Ce.update(B,G,en),($n||me.receiveShadow!==B.receiveShadow)&&(me.receiveShadow=B.receiveShadow,st.setValue(I,"receiveShadow",B.receiveShadow)),(k.isMeshStandardMaterial||k.isMeshLambertMaterial||k.isMeshPhongMaterial)&&k.envMap===null&&D.environment!==null&&(gt.envMapIntensity.value=D.environmentIntensity),gt.dfgLUT!==void 0&&(gt.dfgLUT.value=ix()),$n){if(st.setValue(I,"toneMappingExposure",L.toneMappingExposure),me.needsLights&&cf(gt,ji),ue&&k.fog===!0&&W.refreshFogUniforms(gt,ue),W.refreshMaterialUniforms(gt,k,Fe,Ze,T.state.transmissionRenderTarget[y.id]),me.needsLights&&me.lightProbeGrid){let at=me.lightProbeGrid;gt.probesSH.value=at.texture,gt.probesMin.value.copy(at.boundingBox.min),gt.probesMax.value.copy(at.boundingBox.max),gt.probesResolution.value.copy(at.resolution)}Ps.upload(I,Ch(me),gt,b)}if(k.isShaderMaterial&&k.uniformsNeedUpdate===!0&&(Ps.upload(I,Ch(me),gt,b),k.uniformsNeedUpdate=!1),k.isSpriteMaterial&&st.setValue(I,"center",B.center),st.setValue(I,"modelViewMatrix",B.modelViewMatrix),st.setValue(I,"normalMatrix",B.normalMatrix),st.setValue(I,"modelMatrix",B.matrixWorld),k.uniformsGroups!==void 0){let at=k.uniformsGroups;for(let ei=0,Ki=at.length;ei<Ki;ei++){let Ih=at[ei];X.update(Ih,en),X.bind(Ih,en)}}return en}function cf(y,D){y.ambientLightColor.needsUpdate=D,y.lightProbe.needsUpdate=D,y.directionalLights.needsUpdate=D,y.directionalLightShadows.needsUpdate=D,y.pointLights.needsUpdate=D,y.pointLightShadows.needsUpdate=D,y.spotLights.needsUpdate=D,y.spotLightShadows.needsUpdate=D,y.rectAreaLights.needsUpdate=D,y.hemisphereLights.needsUpdate=D}function lf(y){return y.isMeshLambertMaterial||y.isMeshToonMaterial||y.isMeshPhongMaterial||y.isMeshStandardMaterial||y.isShadowMaterial||y.isShaderMaterial&&y.lights===!0}this.getActiveCubeFace=function(){return H},this.getActiveMipmapLevel=function(){return q},this.getRenderTarget=function(){return N},this.setRenderTargetTextures=function(y,D,G){let k=A.get(y);k.__autoAllocateDepthBuffer=y.resolveDepthBuffer===!1,k.__autoAllocateDepthBuffer===!1&&(k.__useRenderToTexture=!1),A.get(y.texture).__webglTexture=D,A.get(y.depthTexture).__webglTexture=k.__autoAllocateDepthBuffer?void 0:G,k.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(y,D){let G=A.get(y);G.__webglFramebuffer=D,G.__useDefaultFramebuffer=D===void 0};let hf=I.createFramebuffer();this.setRenderTarget=function(y,D=0,G=0){N=y,H=D,q=G;let k=null,B=!1,ue=!1;if(y){let he=A.get(y);if(he.__useDefaultFramebuffer!==void 0){oe.bindFramebuffer(I.FRAMEBUFFER,he.__webglFramebuffer),$.copy(y.viewport),Q.copy(y.scissor),le=y.scissorTest,oe.viewport($),oe.scissor(Q),oe.setScissorTest(le),z=-1;return}else if(he.__webglFramebuffer===void 0)b.setupRenderTarget(y);else if(he.__hasExternalTextures)b.rebindTextures(y,A.get(y.texture).__webglTexture,A.get(y.depthTexture).__webglTexture);else if(y.depthBuffer){let De=y.depthTexture;if(he.__boundDepthTexture!==De){if(De!==null&&A.has(De)&&(y.width!==De.image.width||y.height!==De.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");b.setupDepthRenderbuffer(y)}}let ve=y.texture;(ve.isData3DTexture||ve.isDataArrayTexture||ve.isCompressedArrayTexture)&&(ue=!0);let Me=A.get(y).__webglFramebuffer;y.isWebGLCubeRenderTarget?(Array.isArray(Me[D])?k=Me[D][G]:k=Me[D],B=!0):y.samples>0&&b.useMultisampledRTT(y)===!1?k=A.get(y).__webglMultisampledFramebuffer:Array.isArray(Me)?k=Me[G]:k=Me,$.copy(y.viewport),Q.copy(y.scissor),le=y.scissorTest}else $.copy(ie).multiplyScalar(Fe).floor(),Q.copy(Ee).multiplyScalar(Fe).floor(),le=Ie;if(G!==0&&(k=hf),oe.bindFramebuffer(I.FRAMEBUFFER,k)&&oe.drawBuffers(y,k),oe.viewport($),oe.scissor(Q),oe.setScissorTest(le),B){let he=A.get(y.texture);I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_CUBE_MAP_POSITIVE_X+D,he.__webglTexture,G)}else if(ue){let he=D;for(let ve=0;ve<y.textures.length;ve++){let Me=A.get(y.textures[ve]);I.framebufferTextureLayer(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0+ve,Me.__webglTexture,G,he)}}else if(y!==null&&G!==0){let he=A.get(y.texture);I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,he.__webglTexture,G)}z=-1},this.readRenderTargetPixels=function(y,D,G,k,B,ue,be,he=0){if(!(y&&y.isWebGLRenderTarget)){we("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ve=A.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&be!==void 0&&(ve=ve[be]),ve){oe.bindFramebuffer(I.FRAMEBUFFER,ve);try{let Me=y.textures[he],De=Me.format,ke=Me.type;if(y.textures.length>1&&I.readBuffer(I.COLOR_ATTACHMENT0+he),!rt.textureFormatReadable(De)){we("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!rt.textureTypeReadable(ke)){we("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}D>=0&&D<=y.width-k&&G>=0&&G<=y.height-B&&I.readPixels(D,G,k,B,P.convert(De),P.convert(ke),ue)}finally{let Me=N!==null?A.get(N).__webglFramebuffer:null;oe.bindFramebuffer(I.FRAMEBUFFER,Me)}}},this.readRenderTargetPixelsAsync=async function(y,D,G,k,B,ue,be,he=0){if(!(y&&y.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ve=A.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&be!==void 0&&(ve=ve[be]),ve)if(D>=0&&D<=y.width-k&&G>=0&&G<=y.height-B){oe.bindFramebuffer(I.FRAMEBUFFER,ve);let Me=y.textures[he],De=Me.format,ke=Me.type;if(y.textures.length>1&&I.readBuffer(I.COLOR_ATTACHMENT0+he),!rt.textureFormatReadable(De))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!rt.textureTypeReadable(ke))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");let Ae=I.createBuffer();I.bindBuffer(I.PIXEL_PACK_BUFFER,Ae),I.bufferData(I.PIXEL_PACK_BUFFER,ue.byteLength,I.STREAM_READ),I.readPixels(D,G,k,B,P.convert(De),P.convert(ke),0);let et=N!==null?A.get(N).__webglFramebuffer:null;oe.bindFramebuffer(I.FRAMEBUFFER,et);let mt=I.fenceSync(I.SYNC_GPU_COMMANDS_COMPLETE,0);return I.flush(),await $u(I,mt,4),I.bindBuffer(I.PIXEL_PACK_BUFFER,Ae),I.getBufferSubData(I.PIXEL_PACK_BUFFER,0,ue),I.deleteBuffer(Ae),I.deleteSync(mt),ue}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(y,D=null,G=0){let k=Math.pow(2,-G),B=Math.floor(y.image.width*k),ue=Math.floor(y.image.height*k),be=D!==null?D.x:0,he=D!==null?D.y:0;b.setTexture2D(y,0),I.copyTexSubImage2D(I.TEXTURE_2D,G,0,0,be,he,B,ue),oe.unbindTexture()};let uf=I.createFramebuffer(),df=I.createFramebuffer();this.copyTextureToTexture=function(y,D,G=null,k=null,B=0,ue=0){let be,he,ve,Me,De,ke,Ae,et,mt,ft=y.isCompressedTexture?y.mipmaps[ue]:y.image;if(G!==null)be=G.max.x-G.min.x,he=G.max.y-G.min.y,ve=G.isBox3?G.max.z-G.min.z:1,Me=G.min.x,De=G.min.y,ke=G.isBox3?G.min.z:0;else{let gt=Math.pow(2,-B);be=Math.floor(ft.width*gt),he=Math.floor(ft.height*gt),y.isDataArrayTexture?ve=ft.depth:y.isData3DTexture?ve=Math.floor(ft.depth*gt):ve=1,Me=0,De=0,ke=0}k!==null?(Ae=k.x,et=k.y,mt=k.z):(Ae=0,et=0,mt=0);let it=P.convert(D.format),It=P.convert(D.type),me;D.isData3DTexture?(b.setTexture3D(D,0),me=I.TEXTURE_3D):D.isDataArrayTexture||D.isCompressedArrayTexture?(b.setTexture2DArray(D,0),me=I.TEXTURE_2D_ARRAY):(b.setTexture2D(D,0),me=I.TEXTURE_2D),oe.activeTexture(I.TEXTURE0),oe.pixelStorei(I.UNPACK_FLIP_Y_WEBGL,D.flipY),oe.pixelStorei(I.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),oe.pixelStorei(I.UNPACK_ALIGNMENT,D.unpackAlignment);let jt=oe.getParameter(I.UNPACK_ROW_LENGTH),je=oe.getParameter(I.UNPACK_IMAGE_HEIGHT),en=oe.getParameter(I.UNPACK_SKIP_PIXELS),yn=oe.getParameter(I.UNPACK_SKIP_ROWS),$n=oe.getParameter(I.UNPACK_SKIP_IMAGES);oe.pixelStorei(I.UNPACK_ROW_LENGTH,ft.width),oe.pixelStorei(I.UNPACK_IMAGE_HEIGHT,ft.height),oe.pixelStorei(I.UNPACK_SKIP_PIXELS,Me),oe.pixelStorei(I.UNPACK_SKIP_ROWS,De),oe.pixelStorei(I.UNPACK_SKIP_IMAGES,ke);let ji=y.isDataArrayTexture||y.isData3DTexture,st=D.isDataArrayTexture||D.isData3DTexture;if(y.isDepthTexture){let gt=A.get(y),Qn=A.get(D),at=A.get(gt.__renderTarget),ei=A.get(Qn.__renderTarget);oe.bindFramebuffer(I.READ_FRAMEBUFFER,at.__webglFramebuffer),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,ei.__webglFramebuffer);for(let Ki=0;Ki<ve;Ki++)ji&&(I.framebufferTextureLayer(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,A.get(y).__webglTexture,B,ke+Ki),I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,A.get(D).__webglTexture,ue,mt+Ki)),I.blitFramebuffer(Me,De,be,he,Ae,et,be,he,I.DEPTH_BUFFER_BIT,I.NEAREST);oe.bindFramebuffer(I.READ_FRAMEBUFFER,null),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,null)}else if(B!==0||y.isRenderTargetTexture||A.has(y)){let gt=A.get(y),Qn=A.get(D);oe.bindFramebuffer(I.READ_FRAMEBUFFER,uf),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,df);for(let at=0;at<ve;at++)ji?I.framebufferTextureLayer(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,gt.__webglTexture,B,ke+at):I.framebufferTexture2D(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,gt.__webglTexture,B),st?I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,Qn.__webglTexture,ue,mt+at):I.framebufferTexture2D(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,Qn.__webglTexture,ue),B!==0?I.blitFramebuffer(Me,De,be,he,Ae,et,be,he,I.COLOR_BUFFER_BIT,I.NEAREST):st?I.copyTexSubImage3D(me,ue,Ae,et,mt+at,Me,De,be,he):I.copyTexSubImage2D(me,ue,Ae,et,Me,De,be,he);oe.bindFramebuffer(I.READ_FRAMEBUFFER,null),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,null)}else st?y.isDataTexture||y.isData3DTexture?I.texSubImage3D(me,ue,Ae,et,mt,be,he,ve,it,It,ft.data):D.isCompressedArrayTexture?I.compressedTexSubImage3D(me,ue,Ae,et,mt,be,he,ve,it,ft.data):I.texSubImage3D(me,ue,Ae,et,mt,be,he,ve,it,It,ft):y.isDataTexture?I.texSubImage2D(I.TEXTURE_2D,ue,Ae,et,be,he,it,It,ft.data):y.isCompressedTexture?I.compressedTexSubImage2D(I.TEXTURE_2D,ue,Ae,et,ft.width,ft.height,it,ft.data):I.texSubImage2D(I.TEXTURE_2D,ue,Ae,et,be,he,it,It,ft);oe.pixelStorei(I.UNPACK_ROW_LENGTH,jt),oe.pixelStorei(I.UNPACK_IMAGE_HEIGHT,je),oe.pixelStorei(I.UNPACK_SKIP_PIXELS,en),oe.pixelStorei(I.UNPACK_SKIP_ROWS,yn),oe.pixelStorei(I.UNPACK_SKIP_IMAGES,$n),ue===0&&D.generateMipmaps&&I.generateMipmap(me),oe.unbindTexture()},this.initRenderTarget=function(y){A.get(y).__webglFramebuffer===void 0&&b.setupRenderTarget(y)},this.initTexture=function(y){y.isCubeTexture?b.setTextureCube(y,0):y.isData3DTexture?b.setTexture3D(y,0):y.isDataArrayTexture||y.isCompressedArrayTexture?b.setTexture2DArray(y,0):b.setTexture2D(y,0),oe.unbindTexture()},this.resetState=function(){H=0,q=0,N=null,oe.reset(),ne.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return un}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=Be._getDrawingBufferColorSpace(e),t.unpackColorSpace=Be._getUnpackColorSpace()}};function Gl(s,e){if(e===pl)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),s;if(e===Rs||e===Lr){let t=s.getIndex();if(t===null){let a=[],o=s.getAttribute("position");if(o!==void 0){for(let c=0;c<o.count;c++)a.push(c);s.setIndex(a),t=s.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),s}let n=t.count-2,i=[];if(e===Rs)for(let a=1;a<=n;a++)i.push(t.getX(0)),i.push(t.getX(a)),i.push(t.getX(a+1));else for(let a=0;a<n;a++)a%2===0?(i.push(t.getX(a)),i.push(t.getX(a+1)),i.push(t.getX(a+2))):(i.push(t.getX(a+2)),i.push(t.getX(a+1)),i.push(t.getX(a)));i.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let r=s.clone();return r.setIndex(i),r.clearGroups(),r}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),s}function Dd(s){let e=new Map,t=new Map,n=s.clone();return Fd(s,n,function(i,r){e.set(r,i),t.set(i,r)}),n.traverse(function(i){if(!i.isSkinnedMesh)return;let r=i,a=e.get(i),o=a.skeleton.bones;r.skeleton=a.skeleton.clone(),r.bindMatrix.copy(a.bindMatrix),r.skeleton.bones=o.map(function(c){return t.get(c)}),r.bind(r.skeleton,r.bindMatrix)}),n}function Fd(s,e,t){t(s,e);for(let n=0;n<s.children.length;n++)Fd(s.children[n],e.children[n],t)}var Jo=class extends Ln{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new Kl(t)}),this.register(function(t){return new Jl(t)}),this.register(function(t){return new sh(t)}),this.register(function(t){return new rh(t)}),this.register(function(t){return new ah(t)}),this.register(function(t){return new Zl(t)}),this.register(function(t){return new $l(t)}),this.register(function(t){return new Ql(t)}),this.register(function(t){return new eh(t)}),this.register(function(t){return new jl(t)}),this.register(function(t){return new th(t)}),this.register(function(t){return new Yl(t)}),this.register(function(t){return new ih(t)}),this.register(function(t){return new nh(t)}),this.register(function(t){return new ql(t)}),this.register(function(t){return new Yo(t,ze.EXT_MESHOPT_COMPRESSION)}),this.register(function(t){return new Yo(t,ze.KHR_MESHOPT_COMPRESSION)}),this.register(function(t){return new oh(t)})}load(e,t,n,i){let r=this,a;if(this.resourcePath!=="")a=this.resourcePath;else if(this.path!==""){let l=Yn.extractUrlBase(e);a=Yn.resolveURL(l,this.path)}else a=Yn.extractUrlBase(e);this.manager.itemStart(e);let o=function(l){i?i(l):console.error(l),r.manager.itemError(e),r.manager.itemEnd(e)},c=new Ss(this.manager);c.setPath(this.path),c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,function(l){try{r.parse(l,a,function(h){t(h),r.manager.itemEnd(e)},o)}catch(h){o(h)}},n,o)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let r,a={},o={},c=new TextDecoder;if(typeof e=="string")r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(c.decode(new Uint8Array(e,0,4))===Bd){try{a[ze.KHR_BINARY_GLTF]=new ch(e)}catch(u){i&&i(u);return}r=JSON.parse(a[ze.KHR_BINARY_GLTF].content)}else r=JSON.parse(c.decode(e));else r=e;if(r.asset===void 0||r.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}let l=new mh(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let h=0;h<this.pluginCallbacks.length;h++){let u=this.pluginCallbacks[h](l);u.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),o[u.name]=u,a[u.name]=!0}if(r.extensionsUsed)for(let h=0;h<r.extensionsUsed.length;++h){let u=r.extensionsUsed[h],d=r.extensionsRequired||[];switch(u){case ze.KHR_MATERIALS_UNLIT:a[u]=new Xl;break;case ze.KHR_DRACO_MESH_COMPRESSION:a[u]=new lh(r,this.dracoLoader);break;case ze.KHR_TEXTURE_TRANSFORM:a[u]=new hh;break;case ze.KHR_MESH_QUANTIZATION:a[u]=new uh;break;default:d.indexOf(u)>=0&&o[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}l.setExtensions(a),l.setPlugins(o),l.parse(n,i)}parseAsync(e,t){let n=this;return new Promise(function(i,r){n.parse(e,t,i,r)})}};function sx(){let s={};return{get:function(e){return s[e]},add:function(e,t){s[e]=t},remove:function(e){delete s[e]},removeAll:function(){s={}}}}function vt(s,e,t){let n=s.json.materials[e];return n.extensions&&n.extensions[t]?n.extensions[t]:null}var ze={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"},ql=class{constructor(e){this.parser=e,this.name=ze.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let n=0,i=t.length;n<i;n++){let r=t[n];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){let t=this.parser,n="light:"+e,i=t.cache.get(n);if(i)return i;let r=t.json,c=((r.extensions&&r.extensions[this.name]||{}).lights||[])[e],l,h=new Te(16777215);c.color!==void 0&&h.setRGB(c.color[0],c.color[1],c.color[2],kt);let u=c.range!==void 0?c.range:0;switch(c.type){case"directional":l=new fi(h),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new Bi(h),l.distance=u;break;case"spot":l=new br(h),l.distance=u,c.spot=c.spot||{},c.spot.innerConeAngle=c.spot.innerConeAngle!==void 0?c.spot.innerConeAngle:0,c.spot.outerConeAngle=c.spot.outerConeAngle!==void 0?c.spot.outerConeAngle:Math.PI/4,l.angle=c.spot.outerConeAngle,l.penumbra=1-c.spot.innerConeAngle/c.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+c.type)}return l.position.set(0,0,0),On(l,c),c.intensity!==void 0&&(l.intensity=c.intensity),l.name=t.createUniqueName(c.name||"light_"+e),i=Promise.resolve(l),t.cache.add(n,i),i}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){let t=this,n=this.parser,r=n.json.nodes[e],o=(r.extensions&&r.extensions[this.name]||{}).light;return o===void 0?null:this._loadLight(o).then(function(c){return n._getNodeRef(t.cache,o,c)})}},Xl=class{constructor(){this.name=ze.KHR_MATERIALS_UNLIT}getMaterialType(){return gn}extendParams(e,t,n){let i=[];e.color=new Te(1,1,1),e.opacity=1;let r=t.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){let a=r.baseColorFactor;e.color.setRGB(a[0],a[1],a[2],kt),e.opacity=a[3]}r.baseColorTexture!==void 0&&i.push(n.assignTexture(e,"map",r.baseColorTexture,bt))}return Promise.all(i)}},jl=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);return n===null||n.emissiveStrength!==void 0&&(t.emissiveIntensity=n.emissiveStrength),Promise.resolve()}},Kl=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];if(n.clearcoatFactor!==void 0&&(t.clearcoat=n.clearcoatFactor),n.clearcoatTexture!==void 0&&i.push(this.parser.assignTexture(t,"clearcoatMap",n.clearcoatTexture)),n.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=n.clearcoatRoughnessFactor),n.clearcoatRoughnessTexture!==void 0&&i.push(this.parser.assignTexture(t,"clearcoatRoughnessMap",n.clearcoatRoughnessTexture)),n.clearcoatNormalTexture!==void 0&&(i.push(this.parser.assignTexture(t,"clearcoatNormalMap",n.clearcoatNormalTexture)),n.clearcoatNormalTexture.scale!==void 0)){let r=n.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new He(r,r)}return Promise.all(i)}},Jl=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_DISPERSION}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);return n===null||(t.dispersion=n.dispersion!==void 0?n.dispersion:0),Promise.resolve()}},Yl=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];return n.iridescenceFactor!==void 0&&(t.iridescence=n.iridescenceFactor),n.iridescenceTexture!==void 0&&i.push(this.parser.assignTexture(t,"iridescenceMap",n.iridescenceTexture)),n.iridescenceIor!==void 0&&(t.iridescenceIOR=n.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),n.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=n.iridescenceThicknessMinimum),n.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=n.iridescenceThicknessMaximum),n.iridescenceThicknessTexture!==void 0&&i.push(this.parser.assignTexture(t,"iridescenceThicknessMap",n.iridescenceThicknessTexture)),Promise.all(i)}},Zl=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_SHEEN}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];if(t.sheenColor=new Te(0,0,0),t.sheenRoughness=0,t.sheen=1,n.sheenColorFactor!==void 0){let r=n.sheenColorFactor;t.sheenColor.setRGB(r[0],r[1],r[2],kt)}return n.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=n.sheenRoughnessFactor),n.sheenColorTexture!==void 0&&i.push(this.parser.assignTexture(t,"sheenColorMap",n.sheenColorTexture,bt)),n.sheenRoughnessTexture!==void 0&&i.push(this.parser.assignTexture(t,"sheenRoughnessMap",n.sheenRoughnessTexture)),Promise.all(i)}},$l=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];return n.transmissionFactor!==void 0&&(t.transmission=n.transmissionFactor),n.transmissionTexture!==void 0&&i.push(this.parser.assignTexture(t,"transmissionMap",n.transmissionTexture)),Promise.all(i)}},Ql=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_VOLUME}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];t.thickness=n.thicknessFactor!==void 0?n.thicknessFactor:0,n.thicknessTexture!==void 0&&i.push(this.parser.assignTexture(t,"thicknessMap",n.thicknessTexture)),t.attenuationDistance=n.attenuationDistance||1/0;let r=n.attenuationColor||[1,1,1];return t.attenuationColor=new Te().setRGB(r[0],r[1],r[2],kt),Promise.all(i)}},eh=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_IOR}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);return n===null||(t.ior=n.ior!==void 0?n.ior:1.5,t.ior===0&&(t.ior=1e3)),Promise.resolve()}},th=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_SPECULAR}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];t.specularIntensity=n.specularFactor!==void 0?n.specularFactor:1,n.specularTexture!==void 0&&i.push(this.parser.assignTexture(t,"specularIntensityMap",n.specularTexture));let r=n.specularColorFactor||[1,1,1];return t.specularColor=new Te().setRGB(r[0],r[1],r[2],kt),n.specularColorTexture!==void 0&&i.push(this.parser.assignTexture(t,"specularColorMap",n.specularColorTexture,bt)),Promise.all(i)}},nh=class{constructor(e){this.parser=e,this.name=ze.EXT_MATERIALS_BUMP}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];return t.bumpScale=n.bumpFactor!==void 0?n.bumpFactor:1,n.bumpTexture!==void 0&&i.push(this.parser.assignTexture(t,"bumpMap",n.bumpTexture)),Promise.all(i)}},ih=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];return n.anisotropyStrength!==void 0&&(t.anisotropy=n.anisotropyStrength),n.anisotropyRotation!==void 0&&(t.anisotropyRotation=n.anisotropyRotation),n.anisotropyTexture!==void 0&&i.push(this.parser.assignTexture(t,"anisotropyMap",n.anisotropyTexture)),Promise.all(i)}},sh=class{constructor(e){this.parser=e,this.name=ze.KHR_TEXTURE_BASISU}loadTexture(e){let t=this.parser,n=t.json,i=n.textures[e];if(!i.extensions||!i.extensions[this.name])return null;let r=i.extensions[this.name],a=t.options.ktx2Loader;if(!a){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,a)}},rh=class{constructor(e){this.parser=e,this.name=ze.EXT_TEXTURE_WEBP}loadTexture(e){let t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;let a=r.extensions[t],o=i.images[a.source],c=n.textureLoader;if(o.uri){let l=n.options.manager.getHandler(o.uri);l!==null&&(c=l)}return n.loadTextureImage(e,a.source,c)}},ah=class{constructor(e){this.parser=e,this.name=ze.EXT_TEXTURE_AVIF}loadTexture(e){let t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;let a=r.extensions[t],o=i.images[a.source],c=n.textureLoader;if(o.uri){let l=n.options.manager.getHandler(o.uri);l!==null&&(c=l)}return n.loadTextureImage(e,a.source,c)}},Yo=class{constructor(e,t){this.name=t,this.parser=e}loadBufferView(e){let t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){let i=n.extensions[this.name],r=this.parser.getDependency("buffer",i.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(o){let c=i.byteOffset||0,l=i.byteLength||0,h=i.count,u=i.byteStride,d=new Uint8Array(o,c,l);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(h,u,d,i.mode,i.filter).then(function(f){return f.buffer}):a.ready.then(function(){let f=new ArrayBuffer(h*u);return a.decodeGltfBuffer(new Uint8Array(f),h,u,d,i.mode,i.filter),f})})}else return null}},oh=class{constructor(e){this.name=ze.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){let t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;let i=t.meshes[n.mesh];for(let l of i.primitives)if(l.mode!==rn.TRIANGLES&&l.mode!==rn.TRIANGLE_STRIP&&l.mode!==rn.TRIANGLE_FAN&&l.mode!==void 0)return null;let a=n.extensions[this.name].attributes,o=[],c={};for(let l in a)o.push(this.parser.getDependency("accessor",a[l]).then(h=>(c[l]=h,c[l])));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then(l=>{let h=l.pop(),u=h.isGroup?h.children:[h],d=l[0].count,f=[];for(let g of u){let _=new Ue,m=new F,p=new Ft,v=new F(1,1,1),S=new Ni(g.geometry,g.material,d);for(let M=0;M<d;M++)c.TRANSLATION&&m.fromBufferAttribute(c.TRANSLATION,M),c.ROTATION&&p.fromBufferAttribute(c.ROTATION,M),c.SCALE&&v.fromBufferAttribute(c.SCALE,M),S.setMatrixAt(M,_.compose(m,p,v));for(let M in c)if(M==="_COLOR_0"){let E=c[M];S.instanceColor=new hi(E.array,E.itemSize,E.normalized)}else M!=="TRANSLATION"&&M!=="ROTATION"&&M!=="SCALE"&&g.geometry.setAttribute(M,c[M]);ct.prototype.copy.call(S,g),this.parser.assignFinalMaterial(S),f.push(S)}return h.isGroup?(h.clear(),h.add(...f),h):f[0]}))}},Bd="glTF",kr=12,Nd={JSON:1313821514,BIN:5130562},ch=class{constructor(e){this.name=ze.KHR_BINARY_GLTF,this.content=null,this.body=null;let t=new DataView(e,0,kr),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Bd)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");let i=this.header.length-kr,r=new DataView(e,kr),a=0;for(;a<i;){let o=r.getUint32(a,!0);a+=4;let c=r.getUint32(a,!0);if(a+=4,c===Nd.JSON){let l=new Uint8Array(e,kr+a,o);this.content=n.decode(l)}else if(c===Nd.BIN){let l=kr+a;this.body=e.slice(l,l+o)}a+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}},lh=class{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=ze.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){let n=this.json,i=this.dracoLoader,r=e.extensions[this.name].bufferView,a=e.extensions[this.name].attributes,o={},c={},l={};for(let h in a){let u=fh[h]||h.toLowerCase();o[u]=a[h]}for(let h in e.attributes){let u=fh[h]||h.toLowerCase();if(a[h]!==void 0){let d=n.accessors[e.attributes[h]],f=Ds[d.componentType];l[u]=f.name,c[u]=d.normalized===!0}}return t.getDependency("bufferView",r).then(function(h){return new Promise(function(u,d){i.decodeDracoFile(h,function(f){for(let g in f.attributes){let _=f.attributes[g],m=c[g];m!==void 0&&(_.normalized=m)}u(f)},o,l,kt,d)})})}},hh=class{constructor(){this.name=ze.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}},uh=class{constructor(){this.name=ze.KHR_MESH_QUANTIZATION}},Zo=class extends Rn{constructor(e,t,n,i){super(e,t,n,i)}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i*3+i;for(let a=0;a!==i;a++)t[a]=n[r+a];return t}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=o*2,l=o*3,h=i-t,u=(n-t)/h,d=u*u,f=d*u,g=e*l,_=g-l,m=-2*f+3*d,p=f-d,v=1-m,S=p-d+u;for(let M=0;M!==o;M++){let E=a[_+M+o],T=a[_+M+c]*h,C=a[g+M+o],x=a[g+M]*h;r[M]=v*E+S*T+m*C+p*x}return r}},rx=new Ft,dh=class extends Zo{interpolate_(e,t,n,i){let r=super.interpolate_(e,t,n,i);return rx.fromArray(r).normalize().toArray(r),r}},rn={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Ds={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Ud={9728:xt,9729:_t,9984:to,9985:Ts,9986:Gi,9987:xn},Od={33071:nn,33648:hs,10497:li},Vl={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},fh={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},xi={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},ax={CUBICSPLINE:void 0,LINEAR:Ii,STEP:Pi},Hl={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function ox(s){return s.DefaultMaterial===void 0&&(s.DefaultMaterial=new En({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:pn})),s.DefaultMaterial}function Wi(s,e,t){for(let n in t.extensions)s[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function On(s,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(s.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function cx(s,e,t){let n=!1,i=!1,r=!1;for(let l=0,h=e.length;l<h;l++){let u=e[l];if(u.POSITION!==void 0&&(n=!0),u.NORMAL!==void 0&&(i=!0),u.COLOR_0!==void 0&&(r=!0),n&&i&&r)break}if(!n&&!i&&!r)return Promise.resolve(s);let a=[],o=[],c=[];for(let l=0,h=e.length;l<h;l++){let u=e[l];if(n){let d=u.POSITION!==void 0?t.getDependency("accessor",u.POSITION):s.attributes.position;a.push(d)}if(i){let d=u.NORMAL!==void 0?t.getDependency("accessor",u.NORMAL):s.attributes.normal;o.push(d)}if(r){let d=u.COLOR_0!==void 0?t.getDependency("accessor",u.COLOR_0):s.attributes.color;c.push(d)}}return Promise.all([Promise.all(a),Promise.all(o),Promise.all(c)]).then(function(l){let h=l[0],u=l[1],d=l[2];return n&&(s.morphAttributes.position=h),i&&(s.morphAttributes.normal=u),r&&(s.morphAttributes.color=d),s.morphTargetsRelative=!0,s})}function lx(s,e){if(s.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)s.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){let t=e.extras.targetNames;if(s.morphTargetInfluences.length===t.length){s.morphTargetDictionary={};for(let n=0,i=t.length;n<i;n++)s.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function hx(s){let e,t=s.extensions&&s.extensions[ze.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+Wl(t.attributes):e=s.indices+":"+Wl(s.attributes)+":"+s.mode,s.targets!==void 0)for(let n=0,i=s.targets.length;n<i;n++)e+=":"+Wl(s.targets[n]);return e}function Wl(s){let e="",t=Object.keys(s).sort();for(let n=0,i=t.length;n<i;n++)e+=t[n]+":"+s[t[n]]+";";return e}function ph(s){switch(s){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function ux(s){return s.search(/\.jpe?g($|\?)/i)>0||s.search(/^data\:image\/jpeg/)===0?"image/jpeg":s.search(/\.webp($|\?)/i)>0||s.search(/^data\:image\/webp/)===0?"image/webp":s.search(/\.ktx2($|\?)/i)>0||s.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}var dx=new Ue,mh=class{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new sx,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=-1,r=!1,a=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){let o=navigator.userAgent;n=/^((?!chrome|android).)*safari/i.test(o)===!0;let c=o.match(/Version\/(\d+)/);i=n&&c?parseInt(c[1],10):-1,r=o.indexOf("Firefox")>-1,a=r?o.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||n&&i<17||r&&a<98?this.textureLoader=new pr(this.options.manager):this.textureLoader=new _r(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ss(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){let n=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(a){let o={scene:a[0][i.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:i.asset,parser:n,userData:{}};return Wi(r,o,i),On(o,i),Promise.all(n._invokeAll(function(c){return c.afterRoot&&c.afterRoot(o)})).then(function(){for(let c of o.scenes)c.updateMatrixWorld();e(o)})}).catch(t)}_markDefs(){let e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let i=0,r=t.length;i<r;i++){let a=t[i].joints;for(let o=0,c=a.length;o<c;o++)e[a[o]].isBone=!0}for(let i=0,r=e.length;i<r;i++){let a=e[i];a.mesh!==void 0&&(this._addNodeRef(this.meshCache,a.mesh),a.skin!==void 0&&(n[a.mesh].isSkinnedMesh=!0)),a.camera!==void 0&&this._addNodeRef(this.cameraCache,a.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;let i=n.clone(),r=(a,o)=>{let c=this.associations.get(a);c!=null&&this.associations.set(o,c);for(let[l,h]of a.children.entries())r(h,o.children[l])};return r(n,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){let i=e(t[n]);if(i)return i}return null}_invokeAll(e){let t=Object.values(this.plugins);t.unshift(this);let n=[];for(let i=0;i<t.length;i++){let r=e(t[i]);r&&n.push(r)}return n}getDependency(e,t){let n=e+":"+t,i=this.cache.get(n);if(!i){switch(e){case"scene":i=this.loadScene(t);break;case"node":i=this._invokeOne(function(r){return r.loadNode&&r.loadNode(t)});break;case"mesh":i=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(t)});break;case"accessor":i=this.loadAccessor(t);break;case"bufferView":i=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(t)});break;case"buffer":i=this.loadBuffer(t);break;case"material":i=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(t)});break;case"texture":i=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(t)});break;case"skin":i=this.loadSkin(t);break;case"animation":i=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(t)});break;case"camera":i=this.loadCamera(t);break;default:if(i=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(e,t)}),!i)throw new Error("Unknown type: "+e);break}this.cache.add(n,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){let n=this,i=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(i.map(function(r,a){return n.getDependency(e,a)})),this.cache.add(e,t)}return t}loadBuffer(e){let t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[ze.KHR_BINARY_GLTF].body);let i=this.options;return new Promise(function(r,a){n.load(Yn.resolveURL(t.uri,i.path),r,void 0,function(){a(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){let t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){let i=t.byteLength||0,r=t.byteOffset||0;return n.slice(r,r+i)})}loadAccessor(e){let t=this,n=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0){let a=Vl[i.type],o=Ds[i.componentType],c=i.normalized===!0,l=new o(i.count*a);return Promise.resolve(new St(l,a,c))}let r=[];return i.bufferView!==void 0?r.push(this.getDependency("bufferView",i.bufferView)):r.push(null),i.sparse!==void 0&&(r.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(r).then(function(a){let o=a[0],c=Vl[i.type],l=Ds[i.componentType],h=l.BYTES_PER_ELEMENT,u=h*c,d=i.byteOffset||0,f=i.bufferView!==void 0?n.bufferViews[i.bufferView].byteStride:void 0,g=i.normalized===!0,_,m;if(f&&f!==u){let p=Math.floor(d/f),v="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+p+":"+i.count,S=t.cache.get(v);S||(_=new l(o,p*f,i.count*f/h),S=new gs(_,f/h),t.cache.add(v,S)),m=new bs(S,c,d%f/h,g)}else o===null?_=new l(i.count*c):_=new l(o,d,i.count*c),m=new St(_,c,g);if(i.sparse!==void 0){let p=Vl.SCALAR,v=Ds[i.sparse.indices.componentType],S=i.sparse.indices.byteOffset||0,M=i.sparse.values.byteOffset||0,E=new v(a[1],S,i.sparse.count*p),T=new l(a[2],M,i.sparse.count*c);o!==null&&(m=new St(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let C=0,x=E.length;C<x;C++){let w=E[C];if(m.setX(w,T[C*c]),c>=2&&m.setY(w,T[C*c+1]),c>=3&&m.setZ(w,T[C*c+2]),c>=4&&m.setW(w,T[C*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=g}return m})}loadTexture(e){let t=this.json,n=this.options,r=t.textures[e].source,a=t.images[r],o=this.textureLoader;if(a.uri){let c=n.manager.getHandler(a.uri);c!==null&&(o=c)}return this.loadTextureImage(e,r,o)}loadTextureImage(e,t,n){let i=this,r=this.json,a=r.textures[e],o=r.images[t],c=(o.uri||o.bufferView)+":"+a.sampler;if(this.textureCache[c])return this.textureCache[c];let l=this.loadImageSource(t,n).then(function(h){h.flipY=!1,h.name=a.name||o.name||"",h.name===""&&typeof o.uri=="string"&&o.uri.startsWith("data:image/")===!1&&(h.name=o.uri);let d=(r.samplers||{})[a.sampler]||{};return h.magFilter=Ud[d.magFilter]||_t,h.minFilter=Ud[d.minFilter]||xn,h.wrapS=Od[d.wrapS]||li,h.wrapT=Od[d.wrapT]||li,h.generateMipmaps=!h.isCompressedTexture&&h.minFilter!==xt&&h.minFilter!==_t,i.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[c]=l,l}loadImageSource(e,t){let n=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());let a=i.images[e],o=self.URL||self.webkitURL,c=a.uri||"",l=!1;if(a.bufferView!==void 0)c=n.getDependency("bufferView",a.bufferView).then(function(u){l=!0;let d=new Blob([u],{type:a.mimeType});return c=o.createObjectURL(d),c});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");let h=Promise.resolve(c).then(function(u){return new Promise(function(d,f){let g=d;t.isImageBitmapLoader===!0&&(g=function(_){let m=new Ct(_);m.needsUpdate=!0,d(m)}),t.load(Yn.resolveURL(u,r.path),g,void 0,f)})}).then(function(u){return l===!0&&o.revokeObjectURL(c),On(u,a),u.userData.mimeType=a.mimeType||ux(a.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),u});return this.sourceCache[e]=h,h}assignTexture(e,t,n,i){let r=this;return this.getDependency("texture",n.index).then(function(a){if(!a)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(a=a.clone(),a.channel=n.texCoord),r.extensions[ze.KHR_TEXTURE_TRANSFORM]){let o=n.extensions!==void 0?n.extensions[ze.KHR_TEXTURE_TRANSFORM]:void 0;if(o){let c=r.associations.get(a);a=r.extensions[ze.KHR_TEXTURE_TRANSFORM].extendTexture(a,o),r.associations.set(a,c)}}return i!==void 0&&(a.colorSpace=i),e[t]=a,a})}assignFinalMaterial(e){let t=e.geometry,n=e.material,i=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,a=t.attributes.normal===void 0;if(e.isPoints){let o="PointsMaterial:"+n.uuid,c=this.cache.get(o);c||(c=new Ms,Gt.prototype.copy.call(c,n),c.color.copy(n.color),c.map=n.map,c.sizeAttenuation=!1,this.cache.add(o,c)),n=c}else if(e.isLine){let o="LineBasicMaterial:"+n.uuid,c=this.cache.get(o);c||(c=new ys,Gt.prototype.copy.call(c,n),c.color.copy(n.color),c.map=n.map,this.cache.add(o,c)),n=c}if(i||r||a){let o="ClonedMaterial:"+n.uuid+":";i&&(o+="derivative-tangents:"),r&&(o+="vertex-colors:"),a&&(o+="flat-shading:");let c=this.cache.get(o);c||(c=n.clone(),r&&(c.vertexColors=!0),a&&(c.flatShading=!0),i&&(c.normalScale&&(c.normalScale.y*=-1),c.clearcoatNormalScale&&(c.clearcoatNormalScale.y*=-1)),this.cache.add(o,c),this.associations.set(c,this.associations.get(n))),n=c}e.material=n}getMaterialType(){return En}loadMaterial(e){let t=this,n=this.json,i=this.extensions,r=n.materials[e],a,o={},c=r.extensions||{},l=[];if(c[ze.KHR_MATERIALS_UNLIT]){let u=i[ze.KHR_MATERIALS_UNLIT];a=u.getMaterialType(),l.push(u.extendParams(o,r,t))}else{let u=r.pbrMetallicRoughness||{};if(o.color=new Te(1,1,1),o.opacity=1,Array.isArray(u.baseColorFactor)){let d=u.baseColorFactor;o.color.setRGB(d[0],d[1],d[2],kt),o.opacity=d[3]}u.baseColorTexture!==void 0&&l.push(t.assignTexture(o,"map",u.baseColorTexture,bt)),o.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,o.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(l.push(t.assignTexture(o,"metalnessMap",u.metallicRoughnessTexture)),l.push(t.assignTexture(o,"roughnessMap",u.metallicRoughnessTexture))),a=this._invokeOne(function(d){return d.getMaterialType&&d.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(d){return d.extendMaterialParams&&d.extendMaterialParams(e,o)})))}r.doubleSided===!0&&(o.side=sn);let h=r.alphaMode||Hl.OPAQUE;if(h===Hl.BLEND?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,h===Hl.MASK&&(o.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&a!==gn&&(l.push(t.assignTexture(o,"normalMap",r.normalTexture)),o.normalScale=new He(1,1),r.normalTexture.scale!==void 0)){let u=r.normalTexture.scale;o.normalScale.set(u,u)}if(r.occlusionTexture!==void 0&&a!==gn&&(l.push(t.assignTexture(o,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(o.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&a!==gn){let u=r.emissiveFactor;o.emissive=new Te().setRGB(u[0],u[1],u[2],kt)}return r.emissiveTexture!==void 0&&a!==gn&&l.push(t.assignTexture(o,"emissiveMap",r.emissiveTexture,bt)),Promise.all(l).then(function(){let u=new a(o);return r.name&&(u.name=r.name),On(u,r),t.associations.set(u,{materials:e}),r.extensions&&Wi(i,u,r),u})}createUniqueName(e){let t=tt.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){let t=this,n=this.extensions,i=this.primitiveCache;function r(o){return n[ze.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(o,t).then(function(c){return kd(c,o,t)})}let a=[];for(let o=0,c=e.length;o<c;o++){let l=e[o],h=hx(l),u=i[h];if(u)a.push(u.promise);else{let d;l.extensions&&l.extensions[ze.KHR_DRACO_MESH_COMPRESSION]?d=r(l):d=kd(new zt,l,t),i[h]={primitive:l,promise:d},a.push(d)}}return Promise.all(a)}loadMesh(e){let t=this,n=this.json,i=this.extensions,r=n.meshes[e],a=r.primitives,o=[];for(let c=0,l=a.length;c<l;c++){let h=a[c].material===void 0?ox(this.cache):this.getDependency("material",a[c].material);o.push(h)}return o.push(t.loadGeometries(a)),Promise.all(o).then(function(c){let l=c.slice(0,c.length-1),h=c[c.length-1],u=[];for(let f=0,g=h.length;f<g;f++){let _=h[f],m=a[f],p,v=l[f];if(m.mode===rn.TRIANGLES||m.mode===rn.TRIANGLE_STRIP||m.mode===rn.TRIANGLE_FAN||m.mode===void 0)p=r.isSkinnedMesh===!0?new ir(_,v):new lt(_,v),p.isSkinnedMesh===!0&&p.normalizeSkinWeights(),m.mode===rn.TRIANGLE_STRIP?p.geometry=Gl(p.geometry,Lr):m.mode===rn.TRIANGLE_FAN&&(p.geometry=Gl(p.geometry,Rs));else if(m.mode===rn.LINES)p=new rr(_,v);else if(m.mode===rn.LINE_STRIP)p=new Ui(_,v);else if(m.mode===rn.LINE_LOOP)p=new ar(_,v);else if(m.mode===rn.POINTS)p=new or(_,v);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(p.geometry.morphAttributes).length>0&&lx(p,r),p.name=t.createUniqueName(r.name||"mesh_"+e),On(p,r),m.extensions&&Wi(i,p,m),t.assignFinalMaterial(p),u.push(p)}for(let f=0,g=u.length;f<g;f++)t.associations.set(u[f],{meshes:e,primitives:f});if(u.length===1)return r.extensions&&Wi(i,u[0],r),u[0];let d=new dn;r.extensions&&Wi(i,d,r),t.associations.set(d,{meshes:e});for(let f=0,g=u.length;f<g;f++)d.add(u[f]);return d})}loadCamera(e){let t,n=this.json.cameras[e],i=n[n.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new Mt(Fr.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):n.type==="orthographic"&&(t=new di(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),On(t,n),Promise.resolve(t)}loadSkin(e){let t=this.json.skins[e],n=[];for(let i=0,r=t.joints.length;i<r;i++)n.push(this._loadNodeShallow(t.joints[i]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(i){let r=i.pop(),a=i,o=[],c=[];for(let l=0,h=a.length;l<h;l++){let u=a[l];if(u){o.push(u);let d=new Ue;r!==null&&d.fromArray(r.array,l*16),c.push(d)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[l])}return new sr(o,c)})}loadAnimation(e){let t=this.json,n=this,i=t.animations[e],r=i.name?i.name:"animation_"+e,a=[],o=[],c=[],l=[],h=[];for(let u=0,d=i.channels.length;u<d;u++){let f=i.channels[u],g=i.samplers[f.sampler],_=f.target,m=_.node,p=i.parameters!==void 0?i.parameters[g.input]:g.input,v=i.parameters!==void 0?i.parameters[g.output]:g.output;_.node!==void 0&&(a.push(this.getDependency("node",m)),o.push(this.getDependency("accessor",p)),c.push(this.getDependency("accessor",v)),l.push(g),h.push(_))}return Promise.all([Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(l),Promise.all(h)]).then(function(u){let d=u[0],f=u[1],g=u[2],_=u[3],m=u[4],p=[];for(let S=0,M=d.length;S<M;S++){let E=d[S],T=f[S],C=g[S],x=_[S],w=m[S];if(E===void 0)continue;E.updateMatrix&&E.updateMatrix();let L=n._createAnimationTracks(E,T,C,x,w);if(L)for(let R=0;R<L.length;R++)p.push(L[R])}let v=new Oi(r,void 0,p);return On(v,i),v})}createNodeMesh(e){let t=this.json,n=this,i=t.nodes[e];return i.mesh===void 0?null:n.getDependency("mesh",i.mesh).then(function(r){let a=n._getNodeRef(n.meshCache,i.mesh,r);return i.weights!==void 0&&a.traverse(function(o){if(o.isMesh)for(let c=0,l=i.weights.length;c<l;c++)o.morphTargetInfluences[c]=i.weights[c]}),a})}loadNode(e){let t=this.json,n=this,i=t.nodes[e],r=n._loadNodeShallow(e),a=[],o=i.children||[];for(let l=0,h=o.length;l<h;l++)a.push(n.getDependency("node",o[l]));let c=i.skin===void 0?Promise.resolve(null):n.getDependency("skin",i.skin);return Promise.all([r,Promise.all(a),c]).then(function(l){let h=l[0],u=l[1],d=l[2];d!==null&&h.traverse(function(f){f.isSkinnedMesh&&f.bind(d,dx)});for(let f=0,g=u.length;f<g;f++)h.add(u[f]);if(h.userData.pivot!==void 0&&u.length>0){let f=h.userData.pivot,g=u[0];h.pivot=new F().fromArray(f),h.position.x-=f[0],h.position.y-=f[1],h.position.z-=f[2],g.position.set(0,0,0),delete h.userData.pivot}return h})}_loadNodeShallow(e){let t=this.json,n=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];let r=t.nodes[e],a=r.name?i.createUniqueName(r.name):"",o=[],c=i._invokeOne(function(l){return l.createNodeMesh&&l.createNodeMesh(e)});return c&&o.push(c),r.camera!==void 0&&o.push(i.getDependency("camera",r.camera).then(function(l){return i._getNodeRef(i.cameraCache,r.camera,l)})),i._invokeAll(function(l){return l.createNodeAttachment&&l.createNodeAttachment(e)}).forEach(function(l){o.push(l)}),this.nodeCache[e]=Promise.all(o).then(function(l){let h;if(r.isBone===!0?h=new xs:l.length>1?h=new dn:l.length===1?h=l[0]:h=new ct,h!==l[0])for(let u=0,d=l.length;u<d;u++)h.add(l[u]);if(r.name&&(h.userData.name=r.name,h.name=a),On(h,r),r.extensions&&Wi(n,h,r),r.matrix!==void 0){let u=new Ue;u.fromArray(r.matrix),h.applyMatrix4(u)}else r.translation!==void 0&&h.position.fromArray(r.translation),r.rotation!==void 0&&h.quaternion.fromArray(r.rotation),r.scale!==void 0&&h.scale.fromArray(r.scale);if(!i.associations.has(h))i.associations.set(h,{});else if(r.mesh!==void 0&&i.meshCache.refs[r.mesh]>1){let u=i.associations.get(h);i.associations.set(h,{...u})}return i.associations.get(h).nodes=e,h}),this.nodeCache[e]}loadScene(e){let t=this.extensions,n=this.json.scenes[e],i=this,r=new dn;n.name&&(r.name=i.createUniqueName(n.name)),On(r,n),n.extensions&&Wi(t,r,n);let a=n.nodes||[],o=[];for(let c=0,l=a.length;c<l;c++)o.push(i.getDependency("node",a[c]));return Promise.all(o).then(function(c){for(let h=0,u=c.length;h<u;h++){let d=c[h];d.parent!==null?r.add(Dd(d)):r.add(d)}let l=h=>{let u=new Map;for(let[d,f]of i.associations)(d instanceof Gt||d instanceof Ct)&&u.set(d,f);return h.traverse(d=>{let f=i.associations.get(d);f!=null&&u.set(d,f)}),u};return i.associations=l(r),r})}_createAnimationTracks(e,t,n,i,r){let a=[],o=e.name?e.name:e.uuid,c=[];function l(f){f.morphTargetInfluences&&c.push(f.name?f.name:f.uuid)}xi[r.path]===xi.weights?(l(e),e.isGroup&&e.children.forEach(l)):c.push(o);let h;switch(xi[r.path]){case xi.weights:h=Cn;break;case xi.rotation:h=Pn;break;case xi.translation:case xi.scale:h=In;break;default:n.itemSize===1?h=Cn:h=In;break}let u=i.interpolation!==void 0?ax[i.interpolation]:Ii,d=this._getArrayFromAccessor(n);for(let f=0,g=c.length;f<g;f++){let _=new h(c[f]+"."+xi[r.path],t.array,d,u);i.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(_),a.push(_)}return a}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){let n=ph(t.constructor),i=new Float32Array(t.length);for(let r=0,a=t.length;r<a;r++)i[r]=t[r]*n;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){let i=this instanceof Pn?dh:Zo;return new i(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}};function fx(s,e,t){let n=e.attributes,i=new Bt;if(n.POSITION!==void 0){let o=t.json.accessors[n.POSITION],c=o.min,l=o.max;if(c!==void 0&&l!==void 0){if(i.set(new F(c[0],c[1],c[2]),new F(l[0],l[1],l[2])),o.normalized){let h=ph(Ds[o.componentType]);i.min.multiplyScalar(h),i.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;let r=e.targets;if(r!==void 0){let o=new F,c=new F;for(let l=0,h=r.length;l<h;l++){let u=r[l];if(u.POSITION!==void 0){let d=t.json.accessors[u.POSITION],f=d.min,g=d.max;if(f!==void 0&&g!==void 0){if(c.setX(Math.max(Math.abs(f[0]),Math.abs(g[0]))),c.setY(Math.max(Math.abs(f[1]),Math.abs(g[1]))),c.setZ(Math.max(Math.abs(f[2]),Math.abs(g[2]))),d.normalized){let _=ph(Ds[d.componentType]);c.multiplyScalar(_)}o.max(c)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(o)}s.boundingBox=i;let a=new Vt;i.getCenter(a.center),a.radius=i.min.distanceTo(i.max)/2,s.boundingSphere=a}function kd(s,e,t){let n=e.attributes,i=[];function r(a,o){return t.getDependency("accessor",a).then(function(c){s.setAttribute(o,c)})}for(let a in n){let o=fh[a]||a.toLowerCase();o in s.attributes||i.push(r(n[a],o))}if(e.indices!==void 0&&!s.index){let a=t.getDependency("accessor",e.indices).then(function(o){s.setIndex(o)});i.push(a)}return Be.workingColorSpace!==kt&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Be.workingColorSpace}" not supported.`),On(s,e),fx(s,e,t),Promise.all(i).then(function(){return e.targets!==void 0?cx(s,e.targets,t):s})}var $o=class extends Di{constructor(){super(),this.name="RoomEnvironment",this.position.y=-3.5;let e=new ui;e.deleteAttribute("uv");let t=new En({side:Pt}),n=new En,i=new Bi(16777215,900,28,2);i.position.set(.418,16.199,.3),this.add(i);let r=new lt(e,t);r.position.set(-.757,13.219,.717),r.scale.set(31.713,28.305,28.591),this.add(r);let a=new Ni(e,n,6),o=new ct;o.position.set(-10.906,2.009,1.846),o.rotation.set(0,-.195,0),o.scale.set(2.328,7.905,4.651),o.updateMatrix(),a.setMatrixAt(0,o.matrix),o.position.set(-5.607,-.754,-.758),o.rotation.set(0,.994,0),o.scale.set(1.97,1.534,3.955),o.updateMatrix(),a.setMatrixAt(1,o.matrix),o.position.set(6.167,.857,7.803),o.rotation.set(0,.561,0),o.scale.set(3.927,6.285,3.687),o.updateMatrix(),a.setMatrixAt(2,o.matrix),o.position.set(-2.017,.018,6.124),o.rotation.set(0,.333,0),o.scale.set(2.002,4.566,2.064),o.updateMatrix(),a.setMatrixAt(3,o.matrix),o.position.set(2.291,-.756,-2.621),o.rotation.set(0,-.286,0),o.scale.set(1.546,1.552,1.496),o.updateMatrix(),a.setMatrixAt(4,o.matrix),o.position.set(-2.193,-.369,-5.547),o.rotation.set(0,.516,0),o.scale.set(3.875,3.487,2.986),o.updateMatrix(),a.setMatrixAt(5,o.matrix),this.add(a);let c=new lt(e,Fs(50));c.position.set(-16.116,14.37,8.208),c.scale.set(.1,2.428,2.739),this.add(c);let l=new lt(e,Fs(50));l.position.set(-16.109,18.021,-8.207),l.scale.set(.1,2.425,2.751),this.add(l);let h=new lt(e,Fs(17));h.position.set(14.904,12.198,-1.832),h.scale.set(.15,4.265,6.331),this.add(h);let u=new lt(e,Fs(43));u.position.set(-.462,8.89,14.52),u.scale.set(4.38,5.441,.088),this.add(u);let d=new lt(e,Fs(20));d.position.set(3.235,11.486,-12.541),d.scale.set(2.5,2,.1),this.add(d);let f=new lt(e,Fs(100));f.position.set(0,20,0),f.scale.set(1,.1,1),this.add(f)}dispose(){let e=new Set;this.traverse(t=>{t.isMesh&&(e.add(t.geometry),e.add(t.material))});for(let t of e)t.dispose()}};function Fs(s){return new ur({color:0,emissive:16777215,emissiveIntensity:s})}var px=["viseme_aa","viseme_CH","viseme_DD","viseme_E","viseme_FF","viseme_I","viseme_kk","viseme_nn","viseme_O","viseme_PP","viseme_RR","viseme_sil","viseme_SS","viseme_TH","viseme_U"],mx=["jawOpen","mouthOpen"],zd={a:"viseme_aa",e:"viseme_E",i:"viseme_I",o:"viseme_O",u:"viseme_U",b:"viseme_PP",m:"viseme_PP",p:"viseme_PP",f:"viseme_FF",v:"viseme_FF",d:"viseme_DD",t:"viseme_DD",n:"viseme_DD",l:"viseme_DD",k:"viseme_kk",g:"viseme_kk",c:"viseme_kk",q:"viseme_kk",s:"viseme_SS",z:"viseme_SS",x:"viseme_SS",r:"viseme_RR",w:"viseme_U",y:"viseme_I",h:"viseme_E",j:"viseme_CH"},Gd={th:"viseme_TH",ch:"viseme_CH",sh:"viseme_CH"},Qo=80,gx=120,bx=200,xx=.35;function ec(s){let e=new Map,t=new Map;return s?.traverse?.(n=>{if(!n.isMesh||!n.morphTargetDictionary||!n.morphTargetInfluences)return;let i=n.morphTargetDictionary;for(let r of px)i[r]!==void 0&&(e.has(r)||e.set(r,[]),e.get(r).push({mesh:n,index:i[r]}));for(let r of mx)i[r]!==void 0&&(t.has(r)||t.set(r,[]),t.get(r).push({mesh:n,index:i[r]}))}),e.size?{mode:"arkit",map:e}:t.size?{mode:"jaw",map:t}:null}function Vd(s){let e=[],t=String(s||"").toLowerCase(),n=0;for(let i=0;i<t.length;){let r=i+1<t.length?t[i]+t[i+1]:"";if(Gd[r]){e.push({viseme:Gd[r],startMs:n,endMs:n+Qo*2}),n+=Qo*2,i+=2;continue}let a=t[i];zd[a]?(e.push({viseme:zd[a],startMs:n,endMs:n+Qo}),n+=Qo):/\s/.test(a)?n+=gx:/[.,!?;:]/.test(a)&&(n+=bx),i++}return e}function Br(s){let e=Vd(s);return e.length?e[e.length-1].endMs:0}function tc(s,e,t={}){let n=t.rate&&t.rate>0?t.rate:1,i=e?Vd(s):[],r=i.length?i[i.length-1].endMs:0,a=-1,o=!1,c=e?new Map([...e.map.keys()].map(d=>[d,0])):new Map;function l(d,f){let g=e?.map.get(d);if(g)for(let{mesh:_,index:m}of g)_.morphTargetInfluences[m]=f}function h(d){if(!e||o)return;a<0&&(a=d);let f=(d-a)*n,g=null;if(f<=r){for(let _ of i)if(f>=_.startMs&&f<_.endMs){g=_.viseme;break}}for(let _ of c.keys()){let m=0;e.mode==="arkit"?m=_===g?.92:0:m=g?.45+.25*Math.abs(Math.sin(f/70)):0;let p=c.get(_)+(m-c.get(_))*xx;c.set(_,p),l(_,p)}f>r+120&&(o=!0)}function u(){o=!0;for(let d of c.keys())c.set(d,0),l(d,0)}return{tick:h,stop:u,get done(){return o},get totalMs(){return r}}}var gh=null;function vx(){return gh||(gh=Promise.resolve().then(()=>(Wd(),Hd)).then(s=>s.MeshoptDecoder)),gh}var qd={bust:{center:.86,dist:.62,fov:28},upper:{center:.72,dist:1,fov:30},full:{center:.5,dist:1.9,fov:32}},yx=["eyeBlinkLeft","eyeBlinkRight","eyesClosed","blink"],Ns=class{constructor(e,t={}){this.container=e,this._opts=t,this.scene=new Di,this._applyBackground(t.background),this.canvas=document.createElement("canvas"),this.canvas.style.cssText="display:block;width:100%;height:100%;outline:none",e.appendChild(this.canvas);let n=e.clientWidth||320,i=e.clientHeight||360;this.camera=new Mt(30,n/i,.05,200),this.camera.position.set(0,1.5,2.2),this.renderer=new Xo({canvas:this.canvas,antialias:!0,alpha:!0,powerPreference:"high-performance"}),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),this.renderer.setSize(n,i,!1),this.renderer.outputColorSpace=bt,this.renderer.toneMapping=Sr,this.renderer.toneMappingExposure=1.05;let r=new Is(this.renderer);this._envTex=r.fromScene(new $o,.04).texture,this.scene.environment=this._envTex,r.dispose(),this.scene.add(new xr(16777215,.6));let a=new fi(16777215,1.4);a.position.set(1.5,3,2.5),this.scene.add(a);let o=new fi(10075135,.5);o.position.set(-2,2,-2),this.scene.add(o),this.clock=new yr,this.mixer=null,this.model=null,this.morph=null,this._idleAction=null,this._talkAction=null,this._speaking=!1,this._loadToken=0,this._frameHooks=new Set,this._headBone=null,this._blinkTargets=[],this._nextBlink=1+Math.random()*3,this._blinkT=-1,this._reduce=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!1,this._resizeObs=new ResizeObserver(()=>this._resize()),this._resizeObs.observe(e),this._visible=!document.hidden,this._onscreen=!0,this._render=this._render.bind(this),this._onVisibility=()=>{this._visible=!document.hidden,this._kick()},document.addEventListener("visibilitychange",this._onVisibility),this._inViewObs=new IntersectionObserver(c=>{this._onscreen=c.some(l=>l.isIntersecting),this._kick()},{threshold:0}),this._inViewObs.observe(e),this._raf=0,this._raf=requestAnimationFrame(this._render)}_kick(){this._raf||!this.renderer||!this._visible||!this._onscreen||(this.clock.getDelta(),this._raf=requestAnimationFrame(this._render))}onFrame(e){return this._frameHooks.add(e),()=>this._frameHooks.delete(e)}async load(e,t={}){let n=++this._loadToken,i=new Jo;i.setMeshoptDecoder(await vx());let r=await i.loadAsync(e);if(n!==this._loadToken)return null;if(this.model&&(this.scene.remove(this.model),this._disposeObject(this.model)),this.mixer&&(this.mixer.stopAllAction(),this.mixer.uncacheRoot(this.model)),this.mixer=null,this._idleAction=null,this._talkAction=null,this.model=r.scene,this.scene.add(this.model),this.morph=ec(this.model),this._collectRigRefs(this.model),r.animations?.length){this.mixer=new vr(this.model);let a=Xd(r.animations,["idle","breathing","stand","rest"])||r.animations[0],o=Xd(r.animations,["talk","talking","speak","gesture","wave"]);a&&(this._idleAction=this.mixer.clipAction(a),this._idleAction.setLoop(Ir,1/0).play()),o&&o!==a&&(this._talkAction=this.mixer.clipAction(o),this._talkAction.setLoop(Ir,1/0),this._talkAction.enabled=!0,this._talkAction.setEffectiveWeight(0),this._talkAction.play())}return this._frame(t.framing||"upper"),r}setSpeaking(e){this._speaking=!!e,this._talkAction&&this._talkAction.setEffectiveWeight(e?.85:0)}_collectRigRefs(e){this._headBone=null,this._blinkTargets=[],e.traverse(t=>{if(t.isBone&&/head/i.test(t.name)&&!/headtop|end/i.test(t.name)&&!this._headBone&&(this._headBone=t,t.userData._restQ=t.quaternion.clone()),t.isMesh&&t.morphTargetDictionary)for(let n of yx){let i=t.morphTargetDictionary[n];i!==void 0&&this._blinkTargets.push({mesh:t,index:i})}})}_frame(e){let t=qd[e]||qd.upper,n=new Bt().setFromObject(this.model),i=new F,r=new F;n.getSize(i),n.getCenter(r);let a=i.y||1.7,o=n.min.y+a*t.center,c=r.x,l=Math.max(i.x,a)||1;this.camera.fov=t.fov;let h=t.fov*Math.PI/180,u=l/2/Math.tan(h/2)*t.dist;this.camera.position.set(c,o,n.max.z+u),this.camera.near=Math.max(.01,u/100),this.camera.far=u*50,this.camera.lookAt(c,o,r.z),this.camera.updateProjectionMatrix(),this._focus=new F(c,o,r.z)}_proceduralIdle(e){if(this.mixer||this._reduce||!this.model)return;let t=Math.sin(e*1.6)*.006;if(this.model.position.y=t,this._headBone&&this._headBone.userData._restQ){let n=Math.sin(e*.6)*.05,i=Math.sin(e*.9)*.03+(this._speaking?Math.sin(e*6)*.04:0);this._headBone.quaternion.copy(this._headBone.userData._restQ),this._headBone.rotateY(n),this._headBone.rotateX(i)}}_blink(e){if(!this._blinkTargets.length||this._reduce)return;if(this._blinkT<0){this._nextBlink-=e,this._nextBlink<=0&&(this._blinkT=0,this._nextBlink=2+Math.random()*4);return}this._blinkT+=e;let t=.16,n=this._blinkT<t/2?this._blinkT/(t/2):1-(this._blinkT-t/2)/(t/2),i=Fr.clamp(n,0,1);for(let{mesh:r,index:a}of this._blinkTargets)r.morphTargetInfluences[a]=i;this._blinkT>=t&&(this._blinkT=-1)}_render(){if(!this.renderer||!this._visible||!this._onscreen){this._raf=0;return}this._raf=requestAnimationFrame(this._render);let e=Math.min(this.clock.getDelta(),.05),t=this.clock.elapsedTime,n=t*1e3;this.mixer?.update(e),this._proceduralIdle(t),this._blink(e);for(let i of this._frameHooks)try{i(e,n)}catch{}this.renderer.render(this.scene,this.camera)}_resize(){if(!this.renderer||!this.camera)return;let e=this.container.clientWidth||1,t=this.container.clientHeight||1;this.renderer.setSize(e,t,!1),this.camera.aspect=e/t,this.camera.updateProjectionMatrix()}_applyBackground(e){if(!e||e==="transparent"){this.scene.background=null;return}try{this.scene.background=new Te(e)}catch{this.scene.background=null}}_disposeObject(e){e.traverse?.(t=>{t.geometry?.dispose?.(),(Array.isArray(t.material)?t.material:[t.material]).forEach(i=>{if(i){for(let r of Object.values(i))r?.isTexture&&r.dispose();i.dispose?.()}})})}dispose(){cancelAnimationFrame(this._raf),this._raf=0,this._resizeObs?.disconnect(),this._inViewObs?.disconnect(),document.removeEventListener("visibilitychange",this._onVisibility),this._frameHooks.clear(),this.model&&(this.scene.remove(this.model),this._disposeObject(this.model)),this._envTex?.dispose(),this._envTex=null,this.renderer?.dispose(),this.renderer?.forceContextLoss?.(),this.renderer=null,this.canvas?.remove(),this.scene=null,this.camera=null,this.model=null}};function Xd(s,e){for(let t of e){let n=s.find(i=>i.name&&i.name.toLowerCase().includes(t));if(n)return n}return null}var Us=typeof window<"u"&&"speechSynthesis"in window,Os=class{constructor(e,t={}){this.stage=e,this.muted=!!t.muted,this.onState=t.onState||(()=>{}),this.onCaption=t.onCaption||(()=>{}),this.onError=t.onError||(()=>{}),this.agent=null,this._queue=[],this._active=null,this._frameUnsub=e.onFrame((n,i)=>this._tick(i)),this._voices=[],Us&&(this._onVoices=this._loadVoices.bind(this),this._loadVoices(),window.speechSynthesis.addEventListener?.("voiceschanged",this._onVoices))}setAgent(e){this.agent=e}setMuted(e){this.muted=!!e,e&&Us&&window.speechSynthesis.cancel()}speak(e,t={}){let n=String(e||"").trim();return n?(t.interrupt&&this.cancel(),new Promise(i=>{this._queue.push({text:n,resolve:i}),this._active||this._next()})):Promise.resolve()}cancel(){Us&&window.speechSynthesis.cancel(),this._finishActive(!0);for(let e of this._queue.splice(0))e.resolve();this.onCaption(null),this.stage.setSpeaking(!1),this.onState("idle")}get speaking(){return!!this._active}_next(){let e=this._queue.shift();if(!e){this.onState("idle"),this.onCaption(null),this.stage.setSpeaking(!1);return}let t=this.agent?.voice?.rate||1,n=tc(e.text,this.stage.morph,{rate:t}),i={text:e.text,lipsync:n,resolve:e.resolve,utter:null,fallbackTimer:0};if(this._active=i,this.stage.setSpeaking(!0),this.onState("speaking"),this.onCaption(e.text),Us&&!this.muted){let r=new SpeechSynthesisUtterance(e.text),a=this._pickVoice();a&&(r.voice=a),r.lang=this.agent?.voice?.lang||a?.lang||"en-US",r.pitch=jd(this.agent?.voice?.pitch??1,0,2),r.rate=jd(this.agent?.voice?.rate??1,.1,3),r.onend=()=>this._finishActive(!1),r.onerror=c=>{c?.error&&!/interrupt|cancel/i.test(c.error)?(this.onError(new Error("speech-synthesis: "+c.error)),this._runVisualFallback(i)):this._finishActive(!1)},i.utter=r;let o=Br(e.text)*(1/(r.rate||1))+1500;i.fallbackTimer=window.setTimeout(()=>this._finishActive(!1),Math.max(2500,o));try{window.speechSynthesis.speak(r)}catch(c){this.onError(c instanceof Error?c:new Error(String(c))),this._runVisualFallback(i)}}else this._runVisualFallback(i)}_runVisualFallback(e){if(e!==this._active)return;let t=e.lipsync.totalMs?e.lipsync.totalMs+350:Math.max(1200,Br(e.text)+350);e.fallbackTimer=window.setTimeout(()=>this._finishActive(!1),t)}_tick(e){this._active?.lipsync?.tick(e)}_finishActive(e){let t=this._active;if(t){this._active=null,t.fallbackTimer&&clearTimeout(t.fallbackTimer),t.lipsync?.stop();try{t.resolve()}catch{}e||this._next()}}_loadVoices(){Us&&(this._voices=window.speechSynthesis.getVoices()||[])}_pickVoice(){this._voices.length||this._loadVoices();let e=this.agent?.voice||{},t=this._voices;if(!t.length)return null;for(let n of e.match||[]){let i=t.find(r=>r.name?.toLowerCase().includes(n.toLowerCase()));if(i)return i}if(e.lang){let n=t.find(i=>i.lang?.toLowerCase().startsWith(e.lang.toLowerCase().slice(0,2)));if(n)return n}return t.find(n=>n.localService)||t[0]}dispose(){this.cancel(),this._frameUnsub?.(),Us&&window.speechSynthesis.removeEventListener?.("voiceschanged",this._onVoices)}};function jd(s,e,t){return Math.max(e,Math.min(t,Number(s)))}var zr="https://three.ws/avatars/",qi=[{id:"sol",name:"Sol",tagline:"Calm, clear product guide",file:"realistic-halfbody.glb",lipsync:"viseme",framing:"bust",voice:{lang:"en-US",pitch:1,rate:1,match:["samantha","jenny","aria","google us english"]},accent:"#6366f1"},{id:"nova",name:"Nova",tagline:"Upbeat, friendly host",file:"selfie-girl.glb",lipsync:"viseme",framing:"upper",voice:{lang:"en-US",pitch:1.12,rate:1.04,match:["jenny","aria","samantha","google us english"]},accent:"#ec4899"},{id:"vera",name:"Vera",tagline:"Composed, professional",file:"realistic-female.glb",lipsync:"viseme",framing:"bust",voice:{lang:"en-GB",pitch:1,rate:.98,match:["libby","sonia","google uk english female","serena"]},accent:"#14b8a6"},{id:"atlas",name:"Atlas",tagline:"Confident, grounded",file:"realistic-male.glb",lipsync:"viseme",framing:"bust",voice:{lang:"en-US",pitch:.92,rate:.98,match:["guy","eric","google us english","daniel"]},accent:"#3b82f6"},{id:"echo",name:"Echo",tagline:"Neutral, even-keeled",file:"default.glb",lipsync:"viseme",framing:"upper",voice:{lang:"en-US",pitch:1,rate:1,match:["google us english","samantha","guy"]},accent:"#8b5cf6"}],ks="sol";function Gr(s){return qi.find(e=>e.id===s)||qi.find(e=>e.id===ks)}function Vr(s,e=zr){return s?s.url?s.url:(e.endsWith("/")?e:e+"/")+s.file:null}function nc(s){return s?typeof s=="string"?{id:"custom",name:"Assistant",tagline:"Custom avatar",url:s,lipsync:"viseme",framing:"bust",voice:{lang:"en-US",pitch:1,rate:1,match:[]},accent:"#6366f1"}:{...Gr(ks),id:"custom",name:"Assistant",...s}:null}var Kd=6e3,Jd=8e3,Mx='script,style,noscript,template,svg,iframe,canvas,[aria-hidden="true"],[hidden],[data-concierge-ignore]';function _i(s){return String(s||"").replace(/\s+/g," ").trim()}function Sx(s,e){if(!s)return"";let t=s.cloneNode(!0);for(let n of t.querySelectorAll(Mx))n.remove();for(let n of t.querySelectorAll("[data-three-concierge]"))n.remove();return _i(t.textContent).slice(0,e)}function bh(s,e={}){if(!s)return{url:"",title:"",description:"",headings:[],nav:[],content:"",name:""};let t=_i(s.title).slice(0,200),n=_i(s.querySelector('meta[name="description"]')?.getAttribute("content")||s.querySelector('meta[property="og:description"]')?.getAttribute("content")).slice(0,500),i=[...s.querySelectorAll("h1, h2, h3")].map(h=>_i(h.textContent)).filter(h=>h&&h.length<=120).slice(0,24),r=[...s.querySelectorAll("nav a, header a")].map(h=>_i(h.textContent)).filter(h=>h&&h.length<=40),a=[...new Set(r)].slice(0,24),o=s.querySelector("main")||s.querySelector('[role="main"]')||s.querySelector("article")||s.body,c=Sx(o,6e3),l=_i(s.querySelector('meta[property="og:site_name"]')?.getAttribute("content"))||(e.siteName?_i(e.siteName):"")||(typeof location<"u"?location.hostname:"");return{url:typeof location<"u"?location.href.split("#")[0]:"",title:t,description:n,headings:i,nav:a,content:c,name:l.slice(0,120)}}function ic(s,e={}){let t=bh(s,e),n=_i(e.knowledge).slice(0,8e3),i=t.content;if(n){let r=Math.max(0,6e3-Math.min(n.length,6e3));i=i.slice(0,r)}return{url:t.url,name:t.name,title:t.title,description:t.description,headings:t.headings,nav:t.nav,knowledge:n,content:i}}var Hr="https://three.ws/api/concierge",sc=20;function xh(s){let e=String(s||"").trim();if(!e||e==="[DONE]")return null;try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}function _h(s){let e="";return{push(t){e+=t;let n;for(;(n=e.indexOf(`
+}`,Kl=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){let n=new dr(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new $t({vertexShader:fx,fragmentShader:px,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new lt(new fr(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},Yl=class extends gn{constructor(e,t){super();let n=this,i=null,r=1,a=null,o="local-floor",c=1,l=null,h=null,u=null,d=null,f=null,g=null,_=typeof XRWebGLBinding<"u",m=new Kl,p={},v=t.getContextAttributes(),S=null,M=null,E=[],T=[],C=new He,x=null,w=new Mt;w.viewport=new nt;let L=new Mt;L.viewport=new nt;let R=[w,L],O=new Qa,H=null,q=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Y){let de=E[Y];return de===void 0&&(de=new xs,E[Y]=de),de.getTargetRaySpace()},this.getControllerGrip=function(Y){let de=E[Y];return de===void 0&&(de=new xs,E[Y]=de),de.getGripSpace()},this.getHand=function(Y){let de=E[Y];return de===void 0&&(de=new xs,E[Y]=de),de.getHandSpace()};function N(Y){let de=T.indexOf(Y.inputSource);if(de===-1)return;let ie=E[de];ie!==void 0&&(ie.update(Y.inputSource,Y.frame,l||a),ie.dispatchEvent({type:Y.type,data:Y.inputSource}))}function z(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",z),i.removeEventListener("inputsourceschange",V);for(let Y=0;Y<E.length;Y++){let de=T[Y];de!==null&&(T[Y]=null,E[Y].disconnect(de))}H=null,q=null,m.reset();for(let Y in p)delete p[Y];e.setRenderTarget(S),f=null,d=null,u=null,i=null,M=null,Fe.stop(),n.isPresenting=!1,e.setPixelRatio(x),e.setSize(C.width,C.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(Y){r=Y,n.isPresenting===!0&&_e("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Y){o=Y,n.isPresenting===!0&&_e("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(Y){l=Y},this.getBaseLayer=function(){return d!==null?d:f},this.getBinding=function(){return u===null&&_&&(u=new XRWebGLBinding(i,t)),u},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(Y){if(i=Y,i!==null){if(S=e.getRenderTarget(),i.addEventListener("select",N),i.addEventListener("selectstart",N),i.addEventListener("selectend",N),i.addEventListener("squeeze",N),i.addEventListener("squeezestart",N),i.addEventListener("squeezeend",N),i.addEventListener("end",z),i.addEventListener("inputsourceschange",V),v.xrCompatible!==!0&&await t.makeXRCompatible(),x=e.getPixelRatio(),e.getSize(C),_&&"createProjectionLayer"in XRWebGLBinding.prototype){let ie=null,Ee=null,Ie=null;v.depth&&(Ie=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ie=v.stencil?bi:En,Ee=v.stencil?Ps:vn);let Re={colorFormat:t.RGBA8,depthFormat:Ie,scaleFactor:r};u=this.getBinding(),d=u.createProjectionLayer(Re),i.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),M=new Jt(d.textureWidth,d.textureHeight,{format:Qt,type:qt,depthTexture:new Yn(d.textureWidth,d.textureHeight,Ee,void 0,void 0,void 0,void 0,void 0,void 0,ie),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1,resolveStencilBuffer:d.ignoreDepthValues===!1})}else{let ie={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:r};f=new XRWebGLLayer(i,t,ie),i.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),M=new Jt(f.framebufferWidth,f.framebufferHeight,{format:Qt,type:qt,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:f.ignoreDepthValues===!1,resolveStencilBuffer:f.ignoreDepthValues===!1})}M.isXRRenderTarget=!0,this.setFoveation(c),l=null,a=await i.requestReferenceSpace(o),Fe.setContext(i),Fe.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};function V(Y){for(let de=0;de<Y.removed.length;de++){let ie=Y.removed[de],Ee=T.indexOf(ie);Ee>=0&&(T[Ee]=null,E[Ee].disconnect(ie))}for(let de=0;de<Y.added.length;de++){let ie=Y.added[de],Ee=T.indexOf(ie);if(Ee===-1){for(let Re=0;Re<E.length;Re++)if(Re>=T.length){T.push(ie),Ee=Re;break}else if(T[Re]===null){T[Re]=ie,Ee=Re;break}if(Ee===-1)break}let Ie=E[Ee];Ie&&Ie.connect(ie)}}let Z=new F,Q=new F;function le(Y,de,ie){Z.setFromMatrixPosition(de.matrixWorld),Q.setFromMatrixPosition(ie.matrixWorld);let Ee=Z.distanceTo(Q),Ie=de.projectionMatrix.elements,Re=ie.projectionMatrix.elements,ht=Ie[14]/(Ie[10]-1),We=Ie[14]/(Ie[10]+1),Ze=(Ie[9]+1)/Ie[5],ot=(Ie[9]-1)/Ie[5],Ge=(Ie[8]-1)/Ie[0],At=(Re[8]+1)/Re[0],ut=ht*Ge,Xt=ht*At,I=Ee/(-Ge+At),Tt=I*-Ge;if(de.matrixWorld.decompose(Y.position,Y.quaternion,Y.scale),Y.translateX(Tt),Y.translateZ(I),Y.matrixWorld.compose(Y.position,Y.quaternion,Y.scale),Y.matrixWorldInverse.copy(Y.matrixWorld).invert(),Ie[10]===-1)Y.projectionMatrix.copy(de.projectionMatrix),Y.projectionMatrixInverse.copy(de.projectionMatrixInverse);else{let qe=ht+I,rt=We+I,oe=ut-Tt,dt=Xt+(Ee-Tt),A=Ze*We/rt*qe,b=ot*We/rt*qe;Y.projectionMatrix.makePerspective(oe,dt,A,b,qe,rt),Y.projectionMatrixInverse.copy(Y.projectionMatrix).invert()}}function xe(Y,de){de===null?Y.matrixWorld.copy(Y.matrix):Y.matrixWorld.multiplyMatrices(de.matrixWorld,Y.matrix),Y.matrixWorldInverse.copy(Y.matrixWorld).invert()}this.updateCamera=function(Y){if(i===null)return;let de=Y.near,ie=Y.far;m.texture!==null&&(m.depthNear>0&&(de=m.depthNear),m.depthFar>0&&(ie=m.depthFar)),O.near=L.near=w.near=de,O.far=L.far=w.far=ie,(H!==O.near||q!==O.far)&&(i.updateRenderState({depthNear:O.near,depthFar:O.far}),H=O.near,q=O.far),O.layers.mask=Y.layers.mask|6,w.layers.mask=O.layers.mask&-5,L.layers.mask=O.layers.mask&-3;let Ee=Y.parent,Ie=O.cameras;xe(O,Ee);for(let Re=0;Re<Ie.length;Re++)xe(Ie[Re],Ee);Ie.length===2?le(O,w,L):O.projectionMatrix.copy(w.projectionMatrix),Se(Y,O,Ee)};function Se(Y,de,ie){ie===null?Y.matrix.copy(de.matrixWorld):(Y.matrix.copy(ie.matrixWorld),Y.matrix.invert(),Y.matrix.multiply(de.matrixWorld)),Y.matrix.decompose(Y.position,Y.quaternion,Y.scale),Y.updateMatrixWorld(!0),Y.projectionMatrix.copy(de.projectionMatrix),Y.projectionMatrixInverse.copy(de.projectionMatrixInverse),Y.isPerspectiveCamera&&(Y.fov=Fi*2*Math.atan(1/Y.projectionMatrix.elements[5]),Y.zoom=1)}this.getCamera=function(){return O},this.getFoveation=function(){if(!(d===null&&f===null))return c},this.setFoveation=function(Y){c=Y,d!==null&&(d.fixedFoveation=Y),f!==null&&f.fixedFoveation!==void 0&&(f.fixedFoveation=Y)},this.hasDepthSensing=function(){return m.texture!==null},this.getDepthSensingMesh=function(){return m.getMesh(O)},this.getCameraTexture=function(Y){return p[Y]};let Xe=null;function $e(Y,de){if(h=de.getViewerPose(l||a),g=de,h!==null){let ie=h.views;f!==null&&(e.setRenderTargetFramebuffer(M,f.framebuffer),e.setRenderTarget(M));let Ee=!1;ie.length!==O.cameras.length&&(O.cameras.length=0,Ee=!0);for(let We=0;We<ie.length;We++){let Ze=ie[We],ot=null;if(f!==null)ot=f.getViewport(Ze);else{let At=u.getViewSubImage(d,Ze);ot=At.viewport,We===0&&(e.setRenderTargetTextures(M,At.colorTexture,At.depthStencilTexture),e.setRenderTarget(M))}let Ge=R[We];Ge===void 0&&(Ge=new Mt,Ge.layers.enable(We),Ge.viewport=new nt,R[We]=Ge),Ge.matrix.fromArray(Ze.transform.matrix),Ge.matrix.decompose(Ge.position,Ge.quaternion,Ge.scale),Ge.projectionMatrix.fromArray(Ze.projectionMatrix),Ge.projectionMatrixInverse.copy(Ge.projectionMatrix).invert(),Ge.viewport.set(ot.x,ot.y,ot.width,ot.height),We===0&&(O.matrix.copy(Ge.matrix),O.matrix.decompose(O.position,O.quaternion,O.scale)),Ee===!0&&O.cameras.push(Ge)}let Ie=i.enabledFeatures;if(Ie&&Ie.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&_){u=n.getBinding();let We=u.getDepthInformation(ie[0]);We&&We.isValid&&We.texture&&m.init(We,i.renderState)}if(Ie&&Ie.includes("camera-access")&&_){e.state.unbindTexture(),u=n.getBinding();for(let We=0;We<ie.length;We++){let Ze=ie[We].camera;if(Ze){let ot=p[Ze];ot||(ot=new dr,p[Ze]=ot);let Ge=u.getCameraImage(Ze);ot.sourceTexture=Ge}}}}for(let ie=0;ie<E.length;ie++){let Ee=T[ie],Ie=E[ie];Ee!==null&&Ie!==void 0&&Ie.update(Ee,de,l||a)}Xe&&Xe(Y,de),de.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:de}),g=null}let Fe=new Bd;Fe.setAnimationLoop($e),this.setAnimationLoop=function(Y){Xe=Y},this.dispose=function(){}}},mx=new Ue,qd=new Pe;qd.set(-1,0,0,0,1,0,0,0,1);function gx(s,e){function t(m,p){m.matrixAutoUpdate===!0&&m.updateMatrix(),p.value.copy(m.matrix)}function n(m,p){p.color.getRGB(m.fogColor.value,wl(s)),p.isFog?(m.fogNear.value=p.near,m.fogFar.value=p.far):p.isFogExp2&&(m.fogDensity.value=p.density)}function i(m,p,v,S,M){p.isNodeMaterial?p.uniformsNeedUpdate=!1:p.isMeshBasicMaterial?r(m,p):p.isMeshLambertMaterial?(r(m,p),p.envMap&&(m.envMapIntensity.value=p.envMapIntensity)):p.isMeshToonMaterial?(r(m,p),u(m,p)):p.isMeshPhongMaterial?(r(m,p),h(m,p),p.envMap&&(m.envMapIntensity.value=p.envMapIntensity)):p.isMeshStandardMaterial?(r(m,p),d(m,p),p.isMeshPhysicalMaterial&&f(m,p,M)):p.isMeshMatcapMaterial?(r(m,p),g(m,p)):p.isMeshDepthMaterial?r(m,p):p.isMeshDistanceMaterial?(r(m,p),_(m,p)):p.isMeshNormalMaterial?r(m,p):p.isLineBasicMaterial?(a(m,p),p.isLineDashedMaterial&&o(m,p)):p.isPointsMaterial?c(m,p,v,S):p.isSpriteMaterial?l(m,p):p.isShadowMaterial?(m.color.value.copy(p.color),m.opacity.value=p.opacity):p.isShaderMaterial&&(p.uniformsNeedUpdate=!1)}function r(m,p){m.opacity.value=p.opacity,p.color&&m.diffuse.value.copy(p.color),p.emissive&&m.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity),p.map&&(m.map.value=p.map,t(p.map,m.mapTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.bumpMap&&(m.bumpMap.value=p.bumpMap,t(p.bumpMap,m.bumpMapTransform),m.bumpScale.value=p.bumpScale,p.side===Pt&&(m.bumpScale.value*=-1)),p.normalMap&&(m.normalMap.value=p.normalMap,t(p.normalMap,m.normalMapTransform),m.normalScale.value.copy(p.normalScale),p.side===Pt&&m.normalScale.value.negate()),p.displacementMap&&(m.displacementMap.value=p.displacementMap,t(p.displacementMap,m.displacementMapTransform),m.displacementScale.value=p.displacementScale,m.displacementBias.value=p.displacementBias),p.emissiveMap&&(m.emissiveMap.value=p.emissiveMap,t(p.emissiveMap,m.emissiveMapTransform)),p.specularMap&&(m.specularMap.value=p.specularMap,t(p.specularMap,m.specularMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest);let v=e.get(p),S=v.envMap,M=v.envMapRotation;S&&(m.envMap.value=S,m.envMapRotation.value.setFromMatrix4(mx.makeRotationFromEuler(M)).transpose(),S.isCubeTexture&&S.isRenderTargetTexture===!1&&m.envMapRotation.value.premultiply(qd),m.reflectivity.value=p.reflectivity,m.ior.value=p.ior,m.refractionRatio.value=p.refractionRatio),p.lightMap&&(m.lightMap.value=p.lightMap,m.lightMapIntensity.value=p.lightMapIntensity,t(p.lightMap,m.lightMapTransform)),p.aoMap&&(m.aoMap.value=p.aoMap,m.aoMapIntensity.value=p.aoMapIntensity,t(p.aoMap,m.aoMapTransform))}function a(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,p.map&&(m.map.value=p.map,t(p.map,m.mapTransform))}function o(m,p){m.dashSize.value=p.dashSize,m.totalSize.value=p.dashSize+p.gapSize,m.scale.value=p.scale}function c(m,p,v,S){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.size.value=p.size*v,m.scale.value=S*.5,p.map&&(m.map.value=p.map,t(p.map,m.uvTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function l(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.rotation.value=p.rotation,p.map&&(m.map.value=p.map,t(p.map,m.mapTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function h(m,p){m.specular.value.copy(p.specular),m.shininess.value=Math.max(p.shininess,1e-4)}function u(m,p){p.gradientMap&&(m.gradientMap.value=p.gradientMap)}function d(m,p){m.metalness.value=p.metalness,p.metalnessMap&&(m.metalnessMap.value=p.metalnessMap,t(p.metalnessMap,m.metalnessMapTransform)),m.roughness.value=p.roughness,p.roughnessMap&&(m.roughnessMap.value=p.roughnessMap,t(p.roughnessMap,m.roughnessMapTransform)),p.envMap&&(m.envMapIntensity.value=p.envMapIntensity)}function f(m,p,v){m.ior.value=p.ior,p.sheen>0&&(m.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen),m.sheenRoughness.value=p.sheenRoughness,p.sheenColorMap&&(m.sheenColorMap.value=p.sheenColorMap,t(p.sheenColorMap,m.sheenColorMapTransform)),p.sheenRoughnessMap&&(m.sheenRoughnessMap.value=p.sheenRoughnessMap,t(p.sheenRoughnessMap,m.sheenRoughnessMapTransform))),p.clearcoat>0&&(m.clearcoat.value=p.clearcoat,m.clearcoatRoughness.value=p.clearcoatRoughness,p.clearcoatMap&&(m.clearcoatMap.value=p.clearcoatMap,t(p.clearcoatMap,m.clearcoatMapTransform)),p.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=p.clearcoatRoughnessMap,t(p.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),p.clearcoatNormalMap&&(m.clearcoatNormalMap.value=p.clearcoatNormalMap,t(p.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(p.clearcoatNormalScale),p.side===Pt&&m.clearcoatNormalScale.value.negate())),p.dispersion>0&&(m.dispersion.value=p.dispersion),p.iridescence>0&&(m.iridescence.value=p.iridescence,m.iridescenceIOR.value=p.iridescenceIOR,m.iridescenceThicknessMinimum.value=p.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=p.iridescenceThicknessRange[1],p.iridescenceMap&&(m.iridescenceMap.value=p.iridescenceMap,t(p.iridescenceMap,m.iridescenceMapTransform)),p.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=p.iridescenceThicknessMap,t(p.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),p.transmission>0&&(m.transmission.value=p.transmission,m.transmissionSamplerMap.value=v.texture,m.transmissionSamplerSize.value.set(v.width,v.height),p.transmissionMap&&(m.transmissionMap.value=p.transmissionMap,t(p.transmissionMap,m.transmissionMapTransform)),m.thickness.value=p.thickness,p.thicknessMap&&(m.thicknessMap.value=p.thicknessMap,t(p.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=p.attenuationDistance,m.attenuationColor.value.copy(p.attenuationColor)),p.anisotropy>0&&(m.anisotropyVector.value.set(p.anisotropy*Math.cos(p.anisotropyRotation),p.anisotropy*Math.sin(p.anisotropyRotation)),p.anisotropyMap&&(m.anisotropyMap.value=p.anisotropyMap,t(p.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=p.specularIntensity,m.specularColor.value.copy(p.specularColor),p.specularColorMap&&(m.specularColorMap.value=p.specularColorMap,t(p.specularColorMap,m.specularColorMapTransform)),p.specularIntensityMap&&(m.specularIntensityMap.value=p.specularIntensityMap,t(p.specularIntensityMap,m.specularIntensityMapTransform))}function g(m,p){p.matcap&&(m.matcap.value=p.matcap)}function _(m,p){let v=e.get(p).light;m.referencePosition.value.setFromMatrixPosition(v.matrixWorld),m.nearDistance.value=v.shadow.camera.near,m.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function bx(s,e,t,n){let i={},r={},a=[],o=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function c(v,S){let M=S.program;n.uniformBlockBinding(v,M)}function l(v,S){let M=i[v.id];M===void 0&&(g(v),M=h(v),i[v.id]=M,v.addEventListener("dispose",m));let E=S.program;n.updateUBOMapping(v,E);let T=e.render.frame;r[v.id]!==T&&(d(v),r[v.id]=T)}function h(v){let S=u();v.__bindingPointIndex=S;let M=s.createBuffer(),E=v.__size,T=v.usage;return s.bindBuffer(s.UNIFORM_BUFFER,M),s.bufferData(s.UNIFORM_BUFFER,E,T),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,S,M),M}function u(){for(let v=0;v<o;v++)if(a.indexOf(v)===-1)return a.push(v),v;return we("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function d(v){let S=i[v.id],M=v.uniforms,E=v.__cache;s.bindBuffer(s.UNIFORM_BUFFER,S);for(let T=0,C=M.length;T<C;T++){let x=Array.isArray(M[T])?M[T]:[M[T]];for(let w=0,L=x.length;w<L;w++){let R=x[w];if(f(R,T,w,E)===!0){let O=R.__offset,H=Array.isArray(R.value)?R.value:[R.value],q=0;for(let N=0;N<H.length;N++){let z=H[N],V=_(z);typeof z=="number"||typeof z=="boolean"?(R.__data[0]=z,s.bufferSubData(s.UNIFORM_BUFFER,O+q,R.__data)):z.isMatrix3?(R.__data[0]=z.elements[0],R.__data[1]=z.elements[1],R.__data[2]=z.elements[2],R.__data[3]=0,R.__data[4]=z.elements[3],R.__data[5]=z.elements[4],R.__data[6]=z.elements[5],R.__data[7]=0,R.__data[8]=z.elements[6],R.__data[9]=z.elements[7],R.__data[10]=z.elements[8],R.__data[11]=0):ArrayBuffer.isView(z)?R.__data.set(new z.constructor(z.buffer,z.byteOffset,R.__data.length)):(z.toArray(R.__data,q),q+=V.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,O,R.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function f(v,S,M,E){let T=v.value,C=S+"_"+M;if(E[C]===void 0)return typeof T=="number"||typeof T=="boolean"?E[C]=T:ArrayBuffer.isView(T)?E[C]=T.slice():E[C]=T.clone(),!0;{let x=E[C];if(typeof T=="number"||typeof T=="boolean"){if(x!==T)return E[C]=T,!0}else{if(ArrayBuffer.isView(T))return!0;if(x.equals(T)===!1)return x.copy(T),!0}}return!1}function g(v){let S=v.uniforms,M=0,E=16;for(let C=0,x=S.length;C<x;C++){let w=Array.isArray(S[C])?S[C]:[S[C]];for(let L=0,R=w.length;L<R;L++){let O=w[L],H=Array.isArray(O.value)?O.value:[O.value];for(let q=0,N=H.length;q<N;q++){let z=H[q],V=_(z),Z=M%E,Q=Z%V.boundary,le=Z+Q;M+=Q,le!==0&&E-le<V.storage&&(M+=E-le),O.__data=new Float32Array(V.storage/Float32Array.BYTES_PER_ELEMENT),O.__offset=M,M+=V.storage}}}let T=M%E;return T>0&&(M+=E-T),v.__size=M,v.__cache={},this}function _(v){let S={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(S.boundary=4,S.storage=4):v.isVector2?(S.boundary=8,S.storage=8):v.isVector3||v.isColor?(S.boundary=16,S.storage=12):v.isVector4?(S.boundary=16,S.storage=16):v.isMatrix3?(S.boundary=48,S.storage=48):v.isMatrix4?(S.boundary=64,S.storage=64):v.isTexture?_e("WebGLRenderer: Texture samplers can not be part of an uniforms group."):ArrayBuffer.isView(v)?(S.boundary=16,S.storage=v.byteLength):_e("WebGLRenderer: Unsupported uniform value type.",v),S}function m(v){let S=v.target;S.removeEventListener("dispose",m);let M=a.indexOf(S.__bindingPointIndex);a.splice(M,1),s.deleteBuffer(i[S.id]),delete i[S.id],delete r[S.id]}function p(){for(let v in i)s.deleteBuffer(i[v]);a=[],i={},r={}}return{bind:c,update:l,dispose:p}}var xx=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]),On=null;function _x(){return On===null&&(On=new Ms(xx,16,16,xi,Un),On.name="DFG_LUT",On.minFilter=_t,On.magFilter=_t,On.wrapS=sn,On.wrapT=sn,On.generateMipmaps=!1,On.needsUpdate=!0),On}var $o=class{constructor(e={}){let{canvas:t=ld(),context:n=null,depth:i=!0,stencil:r=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:l=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:u=!1,reversedDepthBuffer:d=!1,outputBufferType:f=qt}=e;this.isWebGLRenderer=!0;let g;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");g=n.getContextAttributes().alpha}else g=a;let _=f,m=new Set([po,fo,uo]),p=new Set([qt,vn,Cs,Ps,co,lo]),v=new Uint32Array(4),S=new Int32Array(4),M=new F,E=null,T=null,C=[],x=[],w=null;this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=xn,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let L=this,R=!1,O=null;this._outputColorSpace=bt;let H=0,q=0,N=null,z=-1,V=null,Z=new nt,Q=new nt,le=null,xe=new Te(0),Se=0,Xe=t.width,$e=t.height,Fe=1,Y=null,de=null,ie=new nt(0,0,Xe,$e),Ee=new nt(0,0,Xe,$e),Ie=!1,Re=new Ss,ht=!1,We=!1,Ze=new Ue,ot=new F,Ge=new nt,At={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},ut=!1;function Xt(){return N===null?Fe:1}let I=n;function Tt(y,D){return t.getContext(y,D)}try{let y={alpha:!0,depth:i,stencil:r,antialias:o,premultipliedAlpha:c,preserveDrawingBuffer:l,powerPreference:h,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${"184"}`),t.addEventListener("webglcontextlost",J,!1),t.addEventListener("webglcontextrestored",ye,!1),t.addEventListener("webglcontextcreationerror",Le,!1),I===null){let D="webgl2";if(I=Tt(D,y),I===null)throw Tt(D)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(y){throw we("WebGLRenderer: "+y.message),y}let qe,rt,oe,dt,A,b,U,j,$,ee,ae,W,K,fe,ge,se,te,Ce,Ne,Ke,P,ne,X;function pe(){qe=new wb(I),qe.init(),P=new dx(I,qe),rt=new xb(I,qe,e,P),oe=new hx(I,qe),rt.reversedDepthBuffer&&d&&oe.buffers.depth.setReversed(!0),dt=new Cb(I),A=new J0,b=new ux(I,qe,oe,A,rt,P,dt),U=new Tb(L),j=new Dp(I),ne=new gb(I,j),$=new Eb(I,j,dt,ne),ee=new Ib(I,$,j,ne,dt),Ce=new Pb(I,rt,b),ge=new _b(A),ae=new Y0(L,U,qe,rt,ne,ge),W=new gx(L,A),K=new Z0,fe=new sx(qe),te=new mb(L,U,oe,ee,g,c),se=new lx(L,ee,rt),X=new bx(I,dt,rt,oe),Ne=new bb(I,qe,dt),Ke=new Rb(I,qe,dt),dt.programs=ae.programs,L.capabilities=rt,L.extensions=qe,L.properties=A,L.renderLists=K,L.shadowMap=se,L.state=oe,L.info=dt}pe(),_!==qt&&(w=new Db(_,t.width,t.height,i,r));let re=new Yl(L,I);this.xr=re,this.getContext=function(){return I},this.getContextAttributes=function(){return I.getContextAttributes()},this.forceContextLoss=function(){let y=qe.get("WEBGL_lose_context");y&&y.loseContext()},this.forceContextRestore=function(){let y=qe.get("WEBGL_lose_context");y&&y.restoreContext()},this.getPixelRatio=function(){return Fe},this.setPixelRatio=function(y){y!==void 0&&(Fe=y,this.setSize(Xe,$e,!1))},this.getSize=function(y){return y.set(Xe,$e)},this.setSize=function(y,D,G=!0){if(re.isPresenting){_e("WebGLRenderer: Can't change size while VR device is presenting.");return}Xe=y,$e=D,t.width=Math.floor(y*Fe),t.height=Math.floor(D*Fe),G===!0&&(t.style.width=y+"px",t.style.height=D+"px"),w!==null&&w.setSize(t.width,t.height),this.setViewport(0,0,y,D)},this.getDrawingBufferSize=function(y){return y.set(Xe*Fe,$e*Fe).floor()},this.setDrawingBufferSize=function(y,D,G){Xe=y,$e=D,Fe=G,t.width=Math.floor(y*G),t.height=Math.floor(D*G),this.setViewport(0,0,y,D)},this.setEffects=function(y){if(_===qt){we("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(y){for(let D=0;D<y.length;D++)if(y[D].isOutputPass===!0){_e("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}w.setEffects(y||[])},this.getCurrentViewport=function(y){return y.copy(Z)},this.getViewport=function(y){return y.copy(ie)},this.setViewport=function(y,D,G,k){y.isVector4?ie.set(y.x,y.y,y.z,y.w):ie.set(y,D,G,k),oe.viewport(Z.copy(ie).multiplyScalar(Fe).round())},this.getScissor=function(y){return y.copy(Ee)},this.setScissor=function(y,D,G,k){y.isVector4?Ee.set(y.x,y.y,y.z,y.w):Ee.set(y,D,G,k),oe.scissor(Q.copy(Ee).multiplyScalar(Fe).round())},this.getScissorTest=function(){return Ie},this.setScissorTest=function(y){oe.setScissorTest(Ie=y)},this.setOpaqueSort=function(y){Y=y},this.setTransparentSort=function(y){de=y},this.getClearColor=function(y){return y.copy(te.getClearColor())},this.setClearColor=function(){te.setClearColor(...arguments)},this.getClearAlpha=function(){return te.getClearAlpha()},this.setClearAlpha=function(){te.setClearAlpha(...arguments)},this.clear=function(y=!0,D=!0,G=!0){let k=0;if(y){let B=!1;if(N!==null){let ue=N.texture.format;B=m.has(ue)}if(B){let ue=N.texture.type,be=p.has(ue),he=te.getClearColor(),ve=te.getClearAlpha(),Me=he.r,De=he.g,ke=he.b;be?(v[0]=Me,v[1]=De,v[2]=ke,v[3]=ve,I.clearBufferuiv(I.COLOR,0,v)):(S[0]=Me,S[1]=De,S[2]=ke,S[3]=ve,I.clearBufferiv(I.COLOR,0,S))}else k|=I.COLOR_BUFFER_BIT}D&&(k|=I.DEPTH_BUFFER_BIT,this.state.buffers.depth.setMask(!0)),G&&(k|=I.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),k!==0&&I.clear(k)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.setNodesHandler=function(y){y.setRenderer(this),O=y},this.dispose=function(){t.removeEventListener("webglcontextlost",J,!1),t.removeEventListener("webglcontextrestored",ye,!1),t.removeEventListener("webglcontextcreationerror",Le,!1),te.dispose(),K.dispose(),fe.dispose(),A.dispose(),U.dispose(),ee.dispose(),ne.dispose(),X.dispose(),ae.dispose(),re.dispose(),re.removeEventListener("sessionstart",Oh),re.removeEventListener("sessionend",kh),Mi.stop()};function J(y){y.preventDefault(),tr("WebGLRenderer: Context Lost."),R=!0}function ye(){tr("WebGLRenderer: Context Restored."),R=!1;let y=dt.autoReset,D=se.enabled,G=se.autoUpdate,k=se.needsUpdate,B=se.type;pe(),dt.autoReset=y,se.enabled=D,se.autoUpdate=G,se.needsUpdate=k,se.type=B}function Le(y){we("WebGLRenderer: A WebGL context could not be created. Reason: ",y.statusMessage)}function pt(y){let D=y.target;D.removeEventListener("dispose",pt),Qe(D)}function Qe(y){Gn(y),A.remove(y)}function Gn(y){let D=A.get(y).programs;D!==void 0&&(D.forEach(function(G){ae.releaseProgram(G)}),y.isShaderMaterial&&ae.releaseShaderCache(y))}this.renderBufferDirect=function(y,D,G,k,B,ue){D===null&&(D=At);let be=B.isMesh&&B.matrixWorld.determinant()<0,he=Sf(y,D,G,k,B);oe.setMaterial(k,be);let ve=G.index,Me=1;if(k.wireframe===!0){if(ve=$.getWireframeAttribute(G),ve===void 0)return;Me=2}let De=G.drawRange,ke=G.attributes.position,Ae=De.start*Me,et=(De.start+De.count)*Me;ue!==null&&(Ae=Math.max(Ae,ue.start*Me),et=Math.min(et,(ue.start+ue.count)*Me)),ve!==null?(Ae=Math.max(Ae,0),et=Math.min(et,ve.count)):ke!=null&&(Ae=Math.max(Ae,0),et=Math.min(et,ke.count));let mt=et-Ae;if(mt<0||mt===1/0)return;ne.setup(B,k,he,G,ve);let ft,it=Ne;if(ve!==null&&(ft=j.get(ve),it=Ke,it.setIndex(ft)),B.isMesh)k.wireframe===!0?(oe.setLineWidth(k.wireframeLinewidth*Xt()),it.setMode(I.LINES)):it.setMode(I.TRIANGLES);else if(B.isLine){let It=k.linewidth;It===void 0&&(It=1),oe.setLineWidth(It*Xt()),B.isLineSegments?it.setMode(I.LINES):B.isLineLoop?it.setMode(I.LINE_LOOP):it.setMode(I.LINE_STRIP)}else B.isPoints?it.setMode(I.POINTS):B.isSprite&&it.setMode(I.TRIANGLES);if(B.isBatchedMesh)if(qe.get("WEBGL_multi_draw"))it.renderMultiDraw(B._multiDrawStarts,B._multiDrawCounts,B._multiDrawCount);else{let It=B._multiDrawStarts,me=B._multiDrawCounts,jt=B._multiDrawCount,je=ve?j.get(ve).bytesPerElement:1,tn=A.get(k).currentProgram.getUniforms();for(let Sn=0;Sn<jt;Sn++)tn.setValue(I,"_gl_DrawID",Sn),it.render(It[Sn]/je,me[Sn])}else if(B.isInstancedMesh)it.renderInstances(Ae,mt,B.count);else if(G.isInstancedBufferGeometry){let It=G._maxInstanceCount!==void 0?G._maxInstanceCount:1/0,me=Math.min(G.instanceCount,It);it.renderInstances(Ae,mt,me)}else it.render(Ae,mt)};function Mn(y,D,G){y.transparent===!0&&y.side===rn&&y.forceSinglePass===!1?(y.side=Pt,y.needsUpdate=!0,Zr(y,D,G),y.side=mn,y.needsUpdate=!0,Zr(y,D,G),y.side=rn):Zr(y,D,G)}this.compile=function(y,D,G=null){G===null&&(G=y),T=fe.get(G),T.init(D),x.push(T),G.traverseVisible(function(B){B.isLight&&B.layers.test(D.layers)&&(T.pushLight(B),B.castShadow&&T.pushShadow(B))}),y!==G&&y.traverseVisible(function(B){B.isLight&&B.layers.test(D.layers)&&(T.pushLight(B),B.castShadow&&T.pushShadow(B))}),T.setupLights();let k=new Set;return y.traverse(function(B){if(!(B.isMesh||B.isPoints||B.isLine||B.isSprite))return;let ue=B.material;if(ue)if(Array.isArray(ue))for(let be=0;be<ue.length;be++){let he=ue[be];Mn(he,G,B),k.add(he)}else Mn(ue,G,B),k.add(ue)}),T=x.pop(),k},this.compileAsync=function(y,D,G=null){let k=this.compile(y,D,G);return new Promise(B=>{function ue(){if(k.forEach(function(be){A.get(be).currentProgram.isReady()&&k.delete(be)}),k.size===0){B(y);return}setTimeout(ue,10)}qe.get("KHR_parallel_shader_compile")!==null?ue():setTimeout(ue,10)})};let Mc=null;function yf(y){Mc&&Mc(y)}function Oh(){Mi.stop()}function kh(){Mi.start()}let Mi=new Bd;Mi.setAnimationLoop(yf),typeof self<"u"&&Mi.setContext(self),this.setAnimationLoop=function(y){Mc=y,re.setAnimationLoop(y),y===null?Mi.stop():Mi.start()},re.addEventListener("sessionstart",Oh),re.addEventListener("sessionend",kh),this.render=function(y,D){if(D!==void 0&&D.isCamera!==!0){we("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(R===!0)return;O!==null&&O.renderStart(y,D);let G=re.enabled===!0&&re.isPresenting===!0,k=w!==null&&(N===null||G)&&w.begin(L,N);if(y.matrixWorldAutoUpdate===!0&&y.updateMatrixWorld(),D.parent===null&&D.matrixWorldAutoUpdate===!0&&D.updateMatrixWorld(),re.enabled===!0&&re.isPresenting===!0&&(w===null||w.isCompositing()===!1)&&(re.cameraAutoUpdate===!0&&re.updateCamera(D),D=re.getCamera()),y.isScene===!0&&y.onBeforeRender(L,y,D,N),T=fe.get(y,x.length),T.init(D),T.state.textureUnits=b.getTextureUnits(),x.push(T),Ze.multiplyMatrices(D.projectionMatrix,D.matrixWorldInverse),Re.setFromProjectionMatrix(Ze,dn,D.reversedDepth),We=this.localClippingEnabled,ht=ge.init(this.clippingPlanes,We),E=K.get(y,C.length),E.init(),C.push(E),re.enabled===!0&&re.isPresenting===!0){let be=L.xr.getDepthSensingMesh();be!==null&&Sc(be,D,-1/0,L.sortObjects)}Sc(y,D,0,L.sortObjects),E.finish(),L.sortObjects===!0&&E.sort(Y,de),ut=re.enabled===!1||re.isPresenting===!1||re.hasDepthSensing()===!1,ut&&te.addToRenderList(E,y),this.info.render.frame++,ht===!0&&ge.beginShadows();let B=T.state.shadowsArray;if(se.render(B,y,D),ht===!0&&ge.endShadows(),this.info.autoReset===!0&&this.info.reset(),(k&&w.hasRenderPass())===!1){let be=E.opaque,he=E.transmissive;if(T.setupLights(),D.isArrayCamera){let ve=D.cameras;if(he.length>0)for(let Me=0,De=ve.length;Me<De;Me++){let ke=ve[Me];zh(be,he,y,ke)}ut&&te.render(y);for(let Me=0,De=ve.length;Me<De;Me++){let ke=ve[Me];Bh(E,y,ke,ke.viewport)}}else he.length>0&&zh(be,he,y,D),ut&&te.render(y),Bh(E,y,D)}N!==null&&q===0&&(b.updateMultisampleRenderTarget(N),b.updateRenderTargetMipmap(N)),k&&w.end(L),y.isScene===!0&&y.onAfterRender(L,y,D),ne.resetDefaultState(),z=-1,V=null,x.pop(),x.length>0?(T=x[x.length-1],b.setTextureUnits(T.state.textureUnits),ht===!0&&ge.setGlobalState(L.clippingPlanes,T.state.camera)):T=null,C.pop(),C.length>0?E=C[C.length-1]:E=null,O!==null&&O.renderEnd()};function Sc(y,D,G,k){if(y.visible===!1)return;if(y.layers.test(D.layers)){if(y.isGroup)G=y.renderOrder;else if(y.isLOD)y.autoUpdate===!0&&y.update(D);else if(y.isLightProbeGrid)T.pushLightProbeGrid(y);else if(y.isLight)T.pushLight(y),y.castShadow&&T.pushShadow(y);else if(y.isSprite){if(!y.frustumCulled||Re.intersectsSprite(y)){k&&Ge.setFromMatrixPosition(y.matrixWorld).applyMatrix4(Ze);let be=ee.update(y),he=y.material;he.visible&&E.push(y,be,he,G,Ge.z,null)}}else if((y.isMesh||y.isLine||y.isPoints)&&(!y.frustumCulled||Re.intersectsObject(y))){let be=ee.update(y),he=y.material;if(k&&(y.boundingSphere!==void 0?(y.boundingSphere===null&&y.computeBoundingSphere(),Ge.copy(y.boundingSphere.center)):(be.boundingSphere===null&&be.computeBoundingSphere(),Ge.copy(be.boundingSphere.center)),Ge.applyMatrix4(y.matrixWorld).applyMatrix4(Ze)),Array.isArray(he)){let ve=be.groups;for(let Me=0,De=ve.length;Me<De;Me++){let ke=ve[Me],Ae=he[ke.materialIndex];Ae&&Ae.visible&&E.push(y,be,Ae,G,Ge.z,ke)}}else he.visible&&E.push(y,be,he,G,Ge.z,null)}}let ue=y.children;for(let be=0,he=ue.length;be<he;be++)Sc(ue[be],D,G,k)}function Bh(y,D,G,k){let{opaque:B,transmissive:ue,transparent:be}=y;T.setupLightsView(G),ht===!0&&ge.setGlobalState(L.clippingPlanes,G),k&&oe.viewport(Z.copy(k)),B.length>0&&$r(B,D,G),ue.length>0&&$r(ue,D,G),be.length>0&&$r(be,D,G),oe.buffers.depth.setTest(!0),oe.buffers.depth.setMask(!0),oe.buffers.color.setMask(!0),oe.setPolygonOffset(!1)}function zh(y,D,G,k){if((G.isScene===!0?G.overrideMaterial:null)!==null)return;if(T.state.transmissionRenderTarget[k.id]===void 0){let Ae=qe.has("EXT_color_buffer_half_float")||qe.has("EXT_color_buffer_float");T.state.transmissionRenderTarget[k.id]=new Jt(1,1,{generateMipmaps:!0,type:Ae?Un:qt,minFilter:_n,samples:Math.max(4,rt.samples),stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Be.workingColorSpace})}let ue=T.state.transmissionRenderTarget[k.id],be=k.viewport||Z;ue.setSize(be.z*L.transmissionResolutionScale,be.w*L.transmissionResolutionScale);let he=L.getRenderTarget(),ve=L.getActiveCubeFace(),Me=L.getActiveMipmapLevel();L.setRenderTarget(ue),L.getClearColor(xe),Se=L.getClearAlpha(),Se<1&&L.setClearColor(16777215,.5),L.clear(),ut&&te.render(G);let De=L.toneMapping;L.toneMapping=xn;let ke=k.viewport;if(k.viewport!==void 0&&(k.viewport=void 0),T.setupLightsView(k),ht===!0&&ge.setGlobalState(L.clippingPlanes,k),$r(y,G,k),b.updateMultisampleRenderTarget(ue),b.updateRenderTargetMipmap(ue),qe.has("WEBGL_multisampled_render_to_texture")===!1){let Ae=!1;for(let et=0,mt=D.length;et<mt;et++){let ft=D[et],{object:it,geometry:It,material:me,group:jt}=ft;if(me.side===rn&&it.layers.test(k.layers)){let je=me.side;me.side=Pt,me.needsUpdate=!0,Gh(it,G,k,It,me,jt),me.side=je,me.needsUpdate=!0,Ae=!0}}Ae===!0&&(b.updateMultisampleRenderTarget(ue),b.updateRenderTargetMipmap(ue))}L.setRenderTarget(he,ve,Me),L.setClearColor(xe,Se),ke!==void 0&&(k.viewport=ke),L.toneMapping=De}function $r(y,D,G){let k=D.isScene===!0?D.overrideMaterial:null;for(let B=0,ue=y.length;B<ue;B++){let be=y[B],{object:he,geometry:ve,group:Me}=be,De=be.material;De.allowOverride===!0&&k!==null&&(De=k),he.layers.test(G.layers)&&Gh(he,D,G,ve,De,Me)}}function Gh(y,D,G,k,B,ue){y.onBeforeRender(L,D,G,k,B,ue),y.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse,y.matrixWorld),y.normalMatrix.getNormalMatrix(y.modelViewMatrix),B.onBeforeRender(L,D,G,k,y,ue),B.transparent===!0&&B.side===rn&&B.forceSinglePass===!1?(B.side=Pt,B.needsUpdate=!0,L.renderBufferDirect(G,D,k,B,y,ue),B.side=mn,B.needsUpdate=!0,L.renderBufferDirect(G,D,k,B,y,ue),B.side=rn):L.renderBufferDirect(G,D,k,B,y,ue),y.onAfterRender(L,D,G,k,B,ue)}function Zr(y,D,G){D.isScene!==!0&&(D=At);let k=A.get(y),B=T.state.lights,ue=T.state.shadowsArray,be=B.state.version,he=ae.getParameters(y,B.state,ue,D,G,T.state.lightProbeGridArray),ve=ae.getProgramCacheKey(he),Me=k.programs;k.environment=y.isMeshStandardMaterial||y.isMeshLambertMaterial||y.isMeshPhongMaterial?D.environment:null,k.fog=D.fog;let De=y.isMeshStandardMaterial||y.isMeshLambertMaterial&&!y.envMap||y.isMeshPhongMaterial&&!y.envMap;k.envMap=U.get(y.envMap||k.environment,De),k.envMapRotation=k.environment!==null&&y.envMap===null?D.environmentRotation:y.envMapRotation,Me===void 0&&(y.addEventListener("dispose",pt),Me=new Map,k.programs=Me);let ke=Me.get(ve);if(ke!==void 0){if(k.currentProgram===ke&&k.lightsStateVersion===be)return Hh(y,he),ke}else he.uniforms=ae.getUniforms(y),O!==null&&y.isNodeMaterial&&O.build(y,G,he),y.onBeforeCompile(he,L),ke=ae.acquireProgram(he,ve),Me.set(ve,ke),k.uniforms=he.uniforms;let Ae=k.uniforms;return(!y.isShaderMaterial&&!y.isRawShaderMaterial||y.clipping===!0)&&(Ae.clippingPlanes=ge.uniform),Hh(y,he),k.needsLights=Tf(y),k.lightsStateVersion=be,k.needsLights&&(Ae.ambientLightColor.value=B.state.ambient,Ae.lightProbe.value=B.state.probe,Ae.directionalLights.value=B.state.directional,Ae.directionalLightShadows.value=B.state.directionalShadow,Ae.spotLights.value=B.state.spot,Ae.spotLightShadows.value=B.state.spotShadow,Ae.rectAreaLights.value=B.state.rectArea,Ae.ltc_1.value=B.state.rectAreaLTC1,Ae.ltc_2.value=B.state.rectAreaLTC2,Ae.pointLights.value=B.state.point,Ae.pointLightShadows.value=B.state.pointShadow,Ae.hemisphereLights.value=B.state.hemi,Ae.directionalShadowMatrix.value=B.state.directionalShadowMatrix,Ae.spotLightMatrix.value=B.state.spotLightMatrix,Ae.spotLightMap.value=B.state.spotLightMap,Ae.pointShadowMatrix.value=B.state.pointShadowMatrix),k.lightProbeGrid=T.state.lightProbeGridArray.length>0,k.currentProgram=ke,k.uniformsList=null,ke}function Vh(y){if(y.uniformsList===null){let D=y.currentProgram.getUniforms();y.uniformsList=Ds.seqWithValue(D.seq,y.uniforms)}return y.uniformsList}function Hh(y,D){let G=A.get(y);G.outputColorSpace=D.outputColorSpace,G.batching=D.batching,G.batchingColor=D.batchingColor,G.instancing=D.instancing,G.instancingColor=D.instancingColor,G.instancingMorph=D.instancingMorph,G.skinning=D.skinning,G.morphTargets=D.morphTargets,G.morphNormals=D.morphNormals,G.morphColors=D.morphColors,G.morphTargetsCount=D.morphTargetsCount,G.numClippingPlanes=D.numClippingPlanes,G.numIntersection=D.numClipIntersection,G.vertexAlphas=D.vertexAlphas,G.vertexTangents=D.vertexTangents,G.toneMapping=D.toneMapping}function Mf(y,D){if(y.length===0)return null;if(y.length===1)return y[0].texture!==null?y[0]:null;M.setFromMatrixPosition(D.matrixWorld);for(let G=0,k=y.length;G<k;G++){let B=y[G];if(B.texture!==null&&B.boundingBox.containsPoint(M))return B}return null}function Sf(y,D,G,k,B){D.isScene!==!0&&(D=At),b.resetTextureUnits();let ue=D.fog,be=k.isMeshStandardMaterial||k.isMeshLambertMaterial||k.isMeshPhongMaterial?D.environment:null,he=N===null?L.outputColorSpace:N.isXRRenderTarget===!0?N.texture.colorSpace:Be.workingColorSpace,ve=k.isMeshStandardMaterial||k.isMeshLambertMaterial&&!k.envMap||k.isMeshPhongMaterial&&!k.envMap,Me=U.get(k.envMap||be,ve),De=k.vertexColors===!0&&!!G.attributes.color&&G.attributes.color.itemSize===4,ke=!!G.attributes.tangent&&(!!k.normalMap||k.anisotropy>0),Ae=!!G.morphAttributes.position,et=!!G.morphAttributes.normal,mt=!!G.morphAttributes.color,ft=xn;k.toneMapped&&(N===null||N.isXRRenderTarget===!0)&&(ft=L.toneMapping);let it=G.morphAttributes.position||G.morphAttributes.normal||G.morphAttributes.color,It=it!==void 0?it.length:0,me=A.get(k),jt=T.state.lights;if(ht===!0&&(We===!0||y!==V)){let at=y===V&&k.id===z;ge.setState(k,y,at)}let je=!1;k.version===me.__version?(me.needsLights&&me.lightsStateVersion!==jt.state.version||me.outputColorSpace!==he||B.isBatchedMesh&&me.batching===!1||!B.isBatchedMesh&&me.batching===!0||B.isBatchedMesh&&me.batchingColor===!0&&B.colorTexture===null||B.isBatchedMesh&&me.batchingColor===!1&&B.colorTexture!==null||B.isInstancedMesh&&me.instancing===!1||!B.isInstancedMesh&&me.instancing===!0||B.isSkinnedMesh&&me.skinning===!1||!B.isSkinnedMesh&&me.skinning===!0||B.isInstancedMesh&&me.instancingColor===!0&&B.instanceColor===null||B.isInstancedMesh&&me.instancingColor===!1&&B.instanceColor!==null||B.isInstancedMesh&&me.instancingMorph===!0&&B.morphTexture===null||B.isInstancedMesh&&me.instancingMorph===!1&&B.morphTexture!==null||me.envMap!==Me||k.fog===!0&&me.fog!==ue||me.numClippingPlanes!==void 0&&(me.numClippingPlanes!==ge.numPlanes||me.numIntersection!==ge.numIntersection)||me.vertexAlphas!==De||me.vertexTangents!==ke||me.morphTargets!==Ae||me.morphNormals!==et||me.morphColors!==mt||me.toneMapping!==ft||me.morphTargetsCount!==It||!!me.lightProbeGrid!=T.state.lightProbeGridArray.length>0)&&(je=!0):(je=!0,me.__version=k.version);let tn=me.currentProgram;je===!0&&(tn=Zr(k,D,B),O&&k.isNodeMaterial&&O.onUpdateProgram(k,tn,me));let Sn=!1,ei=!1,Ji=!1,st=tn.getUniforms(),gt=me.uniforms;if(oe.useProgram(tn.program)&&(Sn=!0,ei=!0,Ji=!0),k.id!==z&&(z=k.id,ei=!0),me.needsLights){let at=Mf(T.state.lightProbeGridArray,B);me.lightProbeGrid!==at&&(me.lightProbeGrid=at,ei=!0)}if(Sn||V!==y){oe.buffers.depth.getReversed()&&y.reversedDepth!==!0&&(y._reversedDepth=!0,y.updateProjectionMatrix()),st.setValue(I,"projectionMatrix",y.projectionMatrix),st.setValue(I,"viewMatrix",y.matrixWorldInverse);let ni=st.map.cameraPosition;ni!==void 0&&ni.setValue(I,ot.setFromMatrixPosition(y.matrixWorld)),rt.logarithmicDepthBuffer&&st.setValue(I,"logDepthBufFC",2/(Math.log(y.far+1)/Math.LN2)),(k.isMeshPhongMaterial||k.isMeshToonMaterial||k.isMeshLambertMaterial||k.isMeshBasicMaterial||k.isMeshStandardMaterial||k.isShaderMaterial)&&st.setValue(I,"isOrthographic",y.isOrthographicCamera===!0),V!==y&&(V=y,ei=!0,Ji=!0)}if(me.needsLights&&(jt.state.directionalShadowMap.length>0&&st.setValue(I,"directionalShadowMap",jt.state.directionalShadowMap,b),jt.state.spotShadowMap.length>0&&st.setValue(I,"spotShadowMap",jt.state.spotShadowMap,b),jt.state.pointShadowMap.length>0&&st.setValue(I,"pointShadowMap",jt.state.pointShadowMap,b)),B.isSkinnedMesh){st.setOptional(I,B,"bindMatrix"),st.setOptional(I,B,"bindMatrixInverse");let at=B.skeleton;at&&(at.boneTexture===null&&at.computeBoneTexture(),st.setValue(I,"boneTexture",at.boneTexture,b))}B.isBatchedMesh&&(st.setOptional(I,B,"batchingTexture"),st.setValue(I,"batchingTexture",B._matricesTexture,b),st.setOptional(I,B,"batchingIdTexture"),st.setValue(I,"batchingIdTexture",B._indirectTexture,b),st.setOptional(I,B,"batchingColorTexture"),B._colorsTexture!==null&&st.setValue(I,"batchingColorTexture",B._colorsTexture,b));let ti=G.morphAttributes;if((ti.position!==void 0||ti.normal!==void 0||ti.color!==void 0)&&Ce.update(B,G,tn),(ei||me.receiveShadow!==B.receiveShadow)&&(me.receiveShadow=B.receiveShadow,st.setValue(I,"receiveShadow",B.receiveShadow)),(k.isMeshStandardMaterial||k.isMeshLambertMaterial||k.isMeshPhongMaterial)&&k.envMap===null&&D.environment!==null&&(gt.envMapIntensity.value=D.environmentIntensity),gt.dfgLUT!==void 0&&(gt.dfgLUT.value=_x()),ei){if(st.setValue(I,"toneMappingExposure",L.toneMappingExposure),me.needsLights&&Af(gt,Ji),ue&&k.fog===!0&&W.refreshFogUniforms(gt,ue),W.refreshMaterialUniforms(gt,k,Fe,$e,T.state.transmissionRenderTarget[y.id]),me.needsLights&&me.lightProbeGrid){let at=me.lightProbeGrid;gt.probesSH.value=at.texture,gt.probesMin.value.copy(at.boundingBox.min),gt.probesMax.value.copy(at.boundingBox.max),gt.probesResolution.value.copy(at.resolution)}Ds.upload(I,Vh(me),gt,b)}if(k.isShaderMaterial&&k.uniformsNeedUpdate===!0&&(Ds.upload(I,Vh(me),gt,b),k.uniformsNeedUpdate=!1),k.isSpriteMaterial&&st.setValue(I,"center",B.center),st.setValue(I,"modelViewMatrix",B.modelViewMatrix),st.setValue(I,"normalMatrix",B.normalMatrix),st.setValue(I,"modelMatrix",B.matrixWorld),k.uniformsGroups!==void 0){let at=k.uniformsGroups;for(let ni=0,$i=at.length;ni<$i;ni++){let Wh=at[ni];X.update(Wh,tn),X.bind(Wh,tn)}}return tn}function Af(y,D){y.ambientLightColor.needsUpdate=D,y.lightProbe.needsUpdate=D,y.directionalLights.needsUpdate=D,y.directionalLightShadows.needsUpdate=D,y.pointLights.needsUpdate=D,y.pointLightShadows.needsUpdate=D,y.spotLights.needsUpdate=D,y.spotLightShadows.needsUpdate=D,y.rectAreaLights.needsUpdate=D,y.hemisphereLights.needsUpdate=D}function Tf(y){return y.isMeshLambertMaterial||y.isMeshToonMaterial||y.isMeshPhongMaterial||y.isMeshStandardMaterial||y.isShadowMaterial||y.isShaderMaterial&&y.lights===!0}this.getActiveCubeFace=function(){return H},this.getActiveMipmapLevel=function(){return q},this.getRenderTarget=function(){return N},this.setRenderTargetTextures=function(y,D,G){let k=A.get(y);k.__autoAllocateDepthBuffer=y.resolveDepthBuffer===!1,k.__autoAllocateDepthBuffer===!1&&(k.__useRenderToTexture=!1),A.get(y.texture).__webglTexture=D,A.get(y.depthTexture).__webglTexture=k.__autoAllocateDepthBuffer?void 0:G,k.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(y,D){let G=A.get(y);G.__webglFramebuffer=D,G.__useDefaultFramebuffer=D===void 0};let wf=I.createFramebuffer();this.setRenderTarget=function(y,D=0,G=0){N=y,H=D,q=G;let k=null,B=!1,ue=!1;if(y){let he=A.get(y);if(he.__useDefaultFramebuffer!==void 0){oe.bindFramebuffer(I.FRAMEBUFFER,he.__webglFramebuffer),Z.copy(y.viewport),Q.copy(y.scissor),le=y.scissorTest,oe.viewport(Z),oe.scissor(Q),oe.setScissorTest(le),z=-1;return}else if(he.__webglFramebuffer===void 0)b.setupRenderTarget(y);else if(he.__hasExternalTextures)b.rebindTextures(y,A.get(y.texture).__webglTexture,A.get(y.depthTexture).__webglTexture);else if(y.depthBuffer){let De=y.depthTexture;if(he.__boundDepthTexture!==De){if(De!==null&&A.has(De)&&(y.width!==De.image.width||y.height!==De.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");b.setupDepthRenderbuffer(y)}}let ve=y.texture;(ve.isData3DTexture||ve.isDataArrayTexture||ve.isCompressedArrayTexture)&&(ue=!0);let Me=A.get(y).__webglFramebuffer;y.isWebGLCubeRenderTarget?(Array.isArray(Me[D])?k=Me[D][G]:k=Me[D],B=!0):y.samples>0&&b.useMultisampledRTT(y)===!1?k=A.get(y).__webglMultisampledFramebuffer:Array.isArray(Me)?k=Me[G]:k=Me,Z.copy(y.viewport),Q.copy(y.scissor),le=y.scissorTest}else Z.copy(ie).multiplyScalar(Fe).floor(),Q.copy(Ee).multiplyScalar(Fe).floor(),le=Ie;if(G!==0&&(k=wf),oe.bindFramebuffer(I.FRAMEBUFFER,k)&&oe.drawBuffers(y,k),oe.viewport(Z),oe.scissor(Q),oe.setScissorTest(le),B){let he=A.get(y.texture);I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_CUBE_MAP_POSITIVE_X+D,he.__webglTexture,G)}else if(ue){let he=D;for(let ve=0;ve<y.textures.length;ve++){let Me=A.get(y.textures[ve]);I.framebufferTextureLayer(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0+ve,Me.__webglTexture,G,he)}}else if(y!==null&&G!==0){let he=A.get(y.texture);I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,he.__webglTexture,G)}z=-1},this.readRenderTargetPixels=function(y,D,G,k,B,ue,be,he=0){if(!(y&&y.isWebGLRenderTarget)){we("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ve=A.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&be!==void 0&&(ve=ve[be]),ve){oe.bindFramebuffer(I.FRAMEBUFFER,ve);try{let Me=y.textures[he],De=Me.format,ke=Me.type;if(y.textures.length>1&&I.readBuffer(I.COLOR_ATTACHMENT0+he),!rt.textureFormatReadable(De)){we("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!rt.textureTypeReadable(ke)){we("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}D>=0&&D<=y.width-k&&G>=0&&G<=y.height-B&&I.readPixels(D,G,k,B,P.convert(De),P.convert(ke),ue)}finally{let Me=N!==null?A.get(N).__webglFramebuffer:null;oe.bindFramebuffer(I.FRAMEBUFFER,Me)}}},this.readRenderTargetPixelsAsync=async function(y,D,G,k,B,ue,be,he=0){if(!(y&&y.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ve=A.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&be!==void 0&&(ve=ve[be]),ve)if(D>=0&&D<=y.width-k&&G>=0&&G<=y.height-B){oe.bindFramebuffer(I.FRAMEBUFFER,ve);let Me=y.textures[he],De=Me.format,ke=Me.type;if(y.textures.length>1&&I.readBuffer(I.COLOR_ATTACHMENT0+he),!rt.textureFormatReadable(De))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!rt.textureTypeReadable(ke))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");let Ae=I.createBuffer();I.bindBuffer(I.PIXEL_PACK_BUFFER,Ae),I.bufferData(I.PIXEL_PACK_BUFFER,ue.byteLength,I.STREAM_READ),I.readPixels(D,G,k,B,P.convert(De),P.convert(ke),0);let et=N!==null?A.get(N).__webglFramebuffer:null;oe.bindFramebuffer(I.FRAMEBUFFER,et);let mt=I.fenceSync(I.SYNC_GPU_COMMANDS_COMPLETE,0);return I.flush(),await ud(I,mt,4),I.bindBuffer(I.PIXEL_PACK_BUFFER,Ae),I.getBufferSubData(I.PIXEL_PACK_BUFFER,0,ue),I.deleteBuffer(Ae),I.deleteSync(mt),ue}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(y,D=null,G=0){let k=Math.pow(2,-G),B=Math.floor(y.image.width*k),ue=Math.floor(y.image.height*k),be=D!==null?D.x:0,he=D!==null?D.y:0;b.setTexture2D(y,0),I.copyTexSubImage2D(I.TEXTURE_2D,G,0,0,be,he,B,ue),oe.unbindTexture()};let Ef=I.createFramebuffer(),Rf=I.createFramebuffer();this.copyTextureToTexture=function(y,D,G=null,k=null,B=0,ue=0){let be,he,ve,Me,De,ke,Ae,et,mt,ft=y.isCompressedTexture?y.mipmaps[ue]:y.image;if(G!==null)be=G.max.x-G.min.x,he=G.max.y-G.min.y,ve=G.isBox3?G.max.z-G.min.z:1,Me=G.min.x,De=G.min.y,ke=G.isBox3?G.min.z:0;else{let gt=Math.pow(2,-B);be=Math.floor(ft.width*gt),he=Math.floor(ft.height*gt),y.isDataArrayTexture?ve=ft.depth:y.isData3DTexture?ve=Math.floor(ft.depth*gt):ve=1,Me=0,De=0,ke=0}k!==null?(Ae=k.x,et=k.y,mt=k.z):(Ae=0,et=0,mt=0);let it=P.convert(D.format),It=P.convert(D.type),me;D.isData3DTexture?(b.setTexture3D(D,0),me=I.TEXTURE_3D):D.isDataArrayTexture||D.isCompressedArrayTexture?(b.setTexture2DArray(D,0),me=I.TEXTURE_2D_ARRAY):(b.setTexture2D(D,0),me=I.TEXTURE_2D),oe.activeTexture(I.TEXTURE0),oe.pixelStorei(I.UNPACK_FLIP_Y_WEBGL,D.flipY),oe.pixelStorei(I.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),oe.pixelStorei(I.UNPACK_ALIGNMENT,D.unpackAlignment);let jt=oe.getParameter(I.UNPACK_ROW_LENGTH),je=oe.getParameter(I.UNPACK_IMAGE_HEIGHT),tn=oe.getParameter(I.UNPACK_SKIP_PIXELS),Sn=oe.getParameter(I.UNPACK_SKIP_ROWS),ei=oe.getParameter(I.UNPACK_SKIP_IMAGES);oe.pixelStorei(I.UNPACK_ROW_LENGTH,ft.width),oe.pixelStorei(I.UNPACK_IMAGE_HEIGHT,ft.height),oe.pixelStorei(I.UNPACK_SKIP_PIXELS,Me),oe.pixelStorei(I.UNPACK_SKIP_ROWS,De),oe.pixelStorei(I.UNPACK_SKIP_IMAGES,ke);let Ji=y.isDataArrayTexture||y.isData3DTexture,st=D.isDataArrayTexture||D.isData3DTexture;if(y.isDepthTexture){let gt=A.get(y),ti=A.get(D),at=A.get(gt.__renderTarget),ni=A.get(ti.__renderTarget);oe.bindFramebuffer(I.READ_FRAMEBUFFER,at.__webglFramebuffer),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,ni.__webglFramebuffer);for(let $i=0;$i<ve;$i++)Ji&&(I.framebufferTextureLayer(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,A.get(y).__webglTexture,B,ke+$i),I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,A.get(D).__webglTexture,ue,mt+$i)),I.blitFramebuffer(Me,De,be,he,Ae,et,be,he,I.DEPTH_BUFFER_BIT,I.NEAREST);oe.bindFramebuffer(I.READ_FRAMEBUFFER,null),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,null)}else if(B!==0||y.isRenderTargetTexture||A.has(y)){let gt=A.get(y),ti=A.get(D);oe.bindFramebuffer(I.READ_FRAMEBUFFER,Ef),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,Rf);for(let at=0;at<ve;at++)Ji?I.framebufferTextureLayer(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,gt.__webglTexture,B,ke+at):I.framebufferTexture2D(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,gt.__webglTexture,B),st?I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,ti.__webglTexture,ue,mt+at):I.framebufferTexture2D(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,ti.__webglTexture,ue),B!==0?I.blitFramebuffer(Me,De,be,he,Ae,et,be,he,I.COLOR_BUFFER_BIT,I.NEAREST):st?I.copyTexSubImage3D(me,ue,Ae,et,mt+at,Me,De,be,he):I.copyTexSubImage2D(me,ue,Ae,et,Me,De,be,he);oe.bindFramebuffer(I.READ_FRAMEBUFFER,null),oe.bindFramebuffer(I.DRAW_FRAMEBUFFER,null)}else st?y.isDataTexture||y.isData3DTexture?I.texSubImage3D(me,ue,Ae,et,mt,be,he,ve,it,It,ft.data):D.isCompressedArrayTexture?I.compressedTexSubImage3D(me,ue,Ae,et,mt,be,he,ve,it,ft.data):I.texSubImage3D(me,ue,Ae,et,mt,be,he,ve,it,It,ft):y.isDataTexture?I.texSubImage2D(I.TEXTURE_2D,ue,Ae,et,be,he,it,It,ft.data):y.isCompressedTexture?I.compressedTexSubImage2D(I.TEXTURE_2D,ue,Ae,et,ft.width,ft.height,it,ft.data):I.texSubImage2D(I.TEXTURE_2D,ue,Ae,et,be,he,it,It,ft);oe.pixelStorei(I.UNPACK_ROW_LENGTH,jt),oe.pixelStorei(I.UNPACK_IMAGE_HEIGHT,je),oe.pixelStorei(I.UNPACK_SKIP_PIXELS,tn),oe.pixelStorei(I.UNPACK_SKIP_ROWS,Sn),oe.pixelStorei(I.UNPACK_SKIP_IMAGES,ei),ue===0&&D.generateMipmaps&&I.generateMipmap(me),oe.unbindTexture()},this.initRenderTarget=function(y){A.get(y).__webglFramebuffer===void 0&&b.setupRenderTarget(y)},this.initTexture=function(y){y.isCubeTexture?b.setTextureCube(y,0):y.isData3DTexture?b.setTexture3D(y,0):y.isDataArrayTexture||y.isCompressedArrayTexture?b.setTexture2DArray(y,0):b.setTexture2D(y,0),oe.unbindTexture()},this.resetState=function(){H=0,q=0,N=null,oe.reset(),ne.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return dn}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=Be._getDrawingBufferColorSpace(e),t.unpackColorSpace=Be._getUnpackColorSpace()}};function Jl(s,e){if(e===Sl)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),s;if(e===Is||e===Nr){let t=s.getIndex();if(t===null){let a=[],o=s.getAttribute("position");if(o!==void 0){for(let c=0;c<o.count;c++)a.push(c);s.setIndex(a),t=s.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),s}let n=t.count-2,i=[];if(e===Is)for(let a=1;a<=n;a++)i.push(t.getX(0)),i.push(t.getX(a)),i.push(t.getX(a+1));else for(let a=0;a<n;a++)a%2===0?(i.push(t.getX(a)),i.push(t.getX(a+1)),i.push(t.getX(a+2))):(i.push(t.getX(a+2)),i.push(t.getX(a+1)),i.push(t.getX(a)));i.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let r=s.clone();return r.setIndex(i),r.clearGroups(),r}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),s}function Xd(s){let e=new Map,t=new Map,n=s.clone();return jd(s,n,function(i,r){e.set(r,i),t.set(i,r)}),n.traverse(function(i){if(!i.isSkinnedMesh)return;let r=i,a=e.get(i),o=a.skeleton.bones;r.skeleton=a.skeleton.clone(),r.bindMatrix.copy(a.bindMatrix),r.skeleton.bones=o.map(function(c){return t.get(c)}),r.bind(r.skeleton,r.bindMatrix)}),n}function jd(s,e,t){t(s,e);for(let n=0;n<s.children.length;n++)jd(s.children[n],e.children[n],t)}var ec=class extends Fn{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new ih(t)}),this.register(function(t){return new sh(t)}),this.register(function(t){return new fh(t)}),this.register(function(t){return new ph(t)}),this.register(function(t){return new mh(t)}),this.register(function(t){return new ah(t)}),this.register(function(t){return new oh(t)}),this.register(function(t){return new ch(t)}),this.register(function(t){return new lh(t)}),this.register(function(t){return new nh(t)}),this.register(function(t){return new hh(t)}),this.register(function(t){return new rh(t)}),this.register(function(t){return new dh(t)}),this.register(function(t){return new uh(t)}),this.register(function(t){return new eh(t)}),this.register(function(t){return new tc(t,ze.EXT_MESHOPT_COMPRESSION)}),this.register(function(t){return new tc(t,ze.KHR_MESHOPT_COMPRESSION)}),this.register(function(t){return new gh(t)})}load(e,t,n,i){let r=this,a;if(this.resourcePath!=="")a=this.resourcePath;else if(this.path!==""){let l=Zn.extractUrlBase(e);a=Zn.resolveURL(l,this.path)}else a=Zn.extractUrlBase(e);this.manager.itemStart(e);let o=function(l){i?i(l):console.error(l),r.manager.itemError(e),r.manager.itemEnd(e)},c=new ws(this.manager);c.setPath(this.path),c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,function(l){try{r.parse(l,a,function(h){t(h),r.manager.itemEnd(e)},o)}catch(h){o(h)}},n,o)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let r,a={},o={},c=new TextDecoder;if(typeof e=="string")r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(c.decode(new Uint8Array(e,0,4))===Zd){try{a[ze.KHR_BINARY_GLTF]=new bh(e)}catch(u){i&&i(u);return}r=JSON.parse(a[ze.KHR_BINARY_GLTF].content)}else r=JSON.parse(c.decode(e));else r=e;if(r.asset===void 0||r.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}let l=new Ah(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let h=0;h<this.pluginCallbacks.length;h++){let u=this.pluginCallbacks[h](l);u.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),o[u.name]=u,a[u.name]=!0}if(r.extensionsUsed)for(let h=0;h<r.extensionsUsed.length;++h){let u=r.extensionsUsed[h],d=r.extensionsRequired||[];switch(u){case ze.KHR_MATERIALS_UNLIT:a[u]=new th;break;case ze.KHR_DRACO_MESH_COMPRESSION:a[u]=new xh(r,this.dracoLoader);break;case ze.KHR_TEXTURE_TRANSFORM:a[u]=new _h;break;case ze.KHR_MESH_QUANTIZATION:a[u]=new vh;break;default:d.indexOf(u)>=0&&o[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}l.setExtensions(a),l.setPlugins(o),l.parse(n,i)}parseAsync(e,t){let n=this;return new Promise(function(i,r){n.parse(e,t,i,r)})}};function vx(){let s={};return{get:function(e){return s[e]},add:function(e,t){s[e]=t},remove:function(e){delete s[e]},removeAll:function(){s={}}}}function vt(s,e,t){let n=s.json.materials[e];return n.extensions&&n.extensions[t]?n.extensions[t]:null}var ze={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"},eh=class{constructor(e){this.parser=e,this.name=ze.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let n=0,i=t.length;n<i;n++){let r=t[n];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){let t=this.parser,n="light:"+e,i=t.cache.get(n);if(i)return i;let r=t.json,c=((r.extensions&&r.extensions[this.name]||{}).lights||[])[e],l,h=new Te(16777215);c.color!==void 0&&h.setRGB(c.color[0],c.color[1],c.color[2],kt);let u=c.range!==void 0?c.range:0;switch(c.type){case"directional":l=new mi(h),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new Gi(h),l.distance=u;break;case"spot":l=new vr(h),l.distance=u,c.spot=c.spot||{},c.spot.innerConeAngle=c.spot.innerConeAngle!==void 0?c.spot.innerConeAngle:0,c.spot.outerConeAngle=c.spot.outerConeAngle!==void 0?c.spot.outerConeAngle:Math.PI/4,l.angle=c.spot.outerConeAngle,l.penumbra=1-c.spot.innerConeAngle/c.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+c.type)}return l.position.set(0,0,0),Bn(l,c),c.intensity!==void 0&&(l.intensity=c.intensity),l.name=t.createUniqueName(c.name||"light_"+e),i=Promise.resolve(l),t.cache.add(n,i),i}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){let t=this,n=this.parser,r=n.json.nodes[e],o=(r.extensions&&r.extensions[this.name]||{}).light;return o===void 0?null:this._loadLight(o).then(function(c){return n._getNodeRef(t.cache,o,c)})}},th=class{constructor(){this.name=ze.KHR_MATERIALS_UNLIT}getMaterialType(){return bn}extendParams(e,t,n){let i=[];e.color=new Te(1,1,1),e.opacity=1;let r=t.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){let a=r.baseColorFactor;e.color.setRGB(a[0],a[1],a[2],kt),e.opacity=a[3]}r.baseColorTexture!==void 0&&i.push(n.assignTexture(e,"map",r.baseColorTexture,bt))}return Promise.all(i)}},nh=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);return n===null||n.emissiveStrength!==void 0&&(t.emissiveIntensity=n.emissiveStrength),Promise.resolve()}},ih=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];if(n.clearcoatFactor!==void 0&&(t.clearcoat=n.clearcoatFactor),n.clearcoatTexture!==void 0&&i.push(this.parser.assignTexture(t,"clearcoatMap",n.clearcoatTexture)),n.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=n.clearcoatRoughnessFactor),n.clearcoatRoughnessTexture!==void 0&&i.push(this.parser.assignTexture(t,"clearcoatRoughnessMap",n.clearcoatRoughnessTexture)),n.clearcoatNormalTexture!==void 0&&(i.push(this.parser.assignTexture(t,"clearcoatNormalMap",n.clearcoatNormalTexture)),n.clearcoatNormalTexture.scale!==void 0)){let r=n.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new He(r,r)}return Promise.all(i)}},sh=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_DISPERSION}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);return n===null||(t.dispersion=n.dispersion!==void 0?n.dispersion:0),Promise.resolve()}},rh=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];return n.iridescenceFactor!==void 0&&(t.iridescence=n.iridescenceFactor),n.iridescenceTexture!==void 0&&i.push(this.parser.assignTexture(t,"iridescenceMap",n.iridescenceTexture)),n.iridescenceIor!==void 0&&(t.iridescenceIOR=n.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),n.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=n.iridescenceThicknessMinimum),n.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=n.iridescenceThicknessMaximum),n.iridescenceThicknessTexture!==void 0&&i.push(this.parser.assignTexture(t,"iridescenceThicknessMap",n.iridescenceThicknessTexture)),Promise.all(i)}},ah=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_SHEEN}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];if(t.sheenColor=new Te(0,0,0),t.sheenRoughness=0,t.sheen=1,n.sheenColorFactor!==void 0){let r=n.sheenColorFactor;t.sheenColor.setRGB(r[0],r[1],r[2],kt)}return n.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=n.sheenRoughnessFactor),n.sheenColorTexture!==void 0&&i.push(this.parser.assignTexture(t,"sheenColorMap",n.sheenColorTexture,bt)),n.sheenRoughnessTexture!==void 0&&i.push(this.parser.assignTexture(t,"sheenRoughnessMap",n.sheenRoughnessTexture)),Promise.all(i)}},oh=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];return n.transmissionFactor!==void 0&&(t.transmission=n.transmissionFactor),n.transmissionTexture!==void 0&&i.push(this.parser.assignTexture(t,"transmissionMap",n.transmissionTexture)),Promise.all(i)}},ch=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_VOLUME}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];t.thickness=n.thicknessFactor!==void 0?n.thicknessFactor:0,n.thicknessTexture!==void 0&&i.push(this.parser.assignTexture(t,"thicknessMap",n.thicknessTexture)),t.attenuationDistance=n.attenuationDistance||1/0;let r=n.attenuationColor||[1,1,1];return t.attenuationColor=new Te().setRGB(r[0],r[1],r[2],kt),Promise.all(i)}},lh=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_IOR}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);return n===null||(t.ior=n.ior!==void 0?n.ior:1.5,t.ior===0&&(t.ior=1e3)),Promise.resolve()}},hh=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_SPECULAR}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];t.specularIntensity=n.specularFactor!==void 0?n.specularFactor:1,n.specularTexture!==void 0&&i.push(this.parser.assignTexture(t,"specularIntensityMap",n.specularTexture));let r=n.specularColorFactor||[1,1,1];return t.specularColor=new Te().setRGB(r[0],r[1],r[2],kt),n.specularColorTexture!==void 0&&i.push(this.parser.assignTexture(t,"specularColorMap",n.specularColorTexture,bt)),Promise.all(i)}},uh=class{constructor(e){this.parser=e,this.name=ze.EXT_MATERIALS_BUMP}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];return t.bumpScale=n.bumpFactor!==void 0?n.bumpFactor:1,n.bumpTexture!==void 0&&i.push(this.parser.assignTexture(t,"bumpMap",n.bumpTexture)),Promise.all(i)}},dh=class{constructor(e){this.parser=e,this.name=ze.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){return vt(this.parser,e,this.name)!==null?Ht:null}extendMaterialParams(e,t){let n=vt(this.parser,e,this.name);if(n===null)return Promise.resolve();let i=[];return n.anisotropyStrength!==void 0&&(t.anisotropy=n.anisotropyStrength),n.anisotropyRotation!==void 0&&(t.anisotropyRotation=n.anisotropyRotation),n.anisotropyTexture!==void 0&&i.push(this.parser.assignTexture(t,"anisotropyMap",n.anisotropyTexture)),Promise.all(i)}},fh=class{constructor(e){this.parser=e,this.name=ze.KHR_TEXTURE_BASISU}loadTexture(e){let t=this.parser,n=t.json,i=n.textures[e];if(!i.extensions||!i.extensions[this.name])return null;let r=i.extensions[this.name],a=t.options.ktx2Loader;if(!a){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,a)}},ph=class{constructor(e){this.parser=e,this.name=ze.EXT_TEXTURE_WEBP}loadTexture(e){let t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;let a=r.extensions[t],o=i.images[a.source],c=n.textureLoader;if(o.uri){let l=n.options.manager.getHandler(o.uri);l!==null&&(c=l)}return n.loadTextureImage(e,a.source,c)}},mh=class{constructor(e){this.parser=e,this.name=ze.EXT_TEXTURE_AVIF}loadTexture(e){let t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;let a=r.extensions[t],o=i.images[a.source],c=n.textureLoader;if(o.uri){let l=n.options.manager.getHandler(o.uri);l!==null&&(c=l)}return n.loadTextureImage(e,a.source,c)}},tc=class{constructor(e,t){this.name=t,this.parser=e}loadBufferView(e){let t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){let i=n.extensions[this.name],r=this.parser.getDependency("buffer",i.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(o){let c=i.byteOffset||0,l=i.byteLength||0,h=i.count,u=i.byteStride,d=new Uint8Array(o,c,l);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(h,u,d,i.mode,i.filter).then(function(f){return f.buffer}):a.ready.then(function(){let f=new ArrayBuffer(h*u);return a.decodeGltfBuffer(new Uint8Array(f),h,u,d,i.mode,i.filter),f})})}else return null}},gh=class{constructor(e){this.name=ze.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){let t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;let i=t.meshes[n.mesh];for(let l of i.primitives)if(l.mode!==an.TRIANGLES&&l.mode!==an.TRIANGLE_STRIP&&l.mode!==an.TRIANGLE_FAN&&l.mode!==void 0)return null;let a=n.extensions[this.name].attributes,o=[],c={};for(let l in a)o.push(this.parser.getDependency("accessor",a[l]).then(h=>(c[l]=h,c[l])));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then(l=>{let h=l.pop(),u=h.isGroup?h.children:[h],d=l[0].count,f=[];for(let g of u){let _=new Ue,m=new F,p=new Ft,v=new F(1,1,1),S=new Oi(g.geometry,g.material,d);for(let M=0;M<d;M++)c.TRANSLATION&&m.fromBufferAttribute(c.TRANSLATION,M),c.ROTATION&&p.fromBufferAttribute(c.ROTATION,M),c.SCALE&&v.fromBufferAttribute(c.SCALE,M),S.setMatrixAt(M,_.compose(m,p,v));for(let M in c)if(M==="_COLOR_0"){let E=c[M];S.instanceColor=new di(E.array,E.itemSize,E.normalized)}else M!=="TRANSLATION"&&M!=="ROTATION"&&M!=="SCALE"&&g.geometry.setAttribute(M,c[M]);ct.prototype.copy.call(S,g),this.parser.assignFinalMaterial(S),f.push(S)}return h.isGroup?(h.clear(),h.add(...f),h):f[0]}))}},Zd="glTF",Gr=12,Kd={JSON:1313821514,BIN:5130562},bh=class{constructor(e){this.name=ze.KHR_BINARY_GLTF,this.content=null,this.body=null;let t=new DataView(e,0,Gr),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Zd)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");let i=this.header.length-Gr,r=new DataView(e,Gr),a=0;for(;a<i;){let o=r.getUint32(a,!0);a+=4;let c=r.getUint32(a,!0);if(a+=4,c===Kd.JSON){let l=new Uint8Array(e,Gr+a,o);this.content=n.decode(l)}else if(c===Kd.BIN){let l=Gr+a;this.body=e.slice(l,l+o)}a+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}},xh=class{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=ze.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){let n=this.json,i=this.dracoLoader,r=e.extensions[this.name].bufferView,a=e.extensions[this.name].attributes,o={},c={},l={};for(let h in a){let u=Mh[h]||h.toLowerCase();o[u]=a[h]}for(let h in e.attributes){let u=Mh[h]||h.toLowerCase();if(a[h]!==void 0){let d=n.accessors[e.attributes[h]],f=Us[d.componentType];l[u]=f.name,c[u]=d.normalized===!0}}return t.getDependency("bufferView",r).then(function(h){return new Promise(function(u,d){i.decodeDracoFile(h,function(f){for(let g in f.attributes){let _=f.attributes[g],m=c[g];m!==void 0&&(_.normalized=m)}u(f)},o,l,kt,d)})})}},_h=class{constructor(){this.name=ze.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}},vh=class{constructor(){this.name=ze.KHR_MESH_QUANTIZATION}},nc=class extends Pn{constructor(e,t,n,i){super(e,t,n,i)}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i*3+i;for(let a=0;a!==i;a++)t[a]=n[r+a];return t}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=o*2,l=o*3,h=i-t,u=(n-t)/h,d=u*u,f=d*u,g=e*l,_=g-l,m=-2*f+3*d,p=f-d,v=1-m,S=p-d+u;for(let M=0;M!==o;M++){let E=a[_+M+o],T=a[_+M+c]*h,C=a[g+M+o],x=a[g+M]*h;r[M]=v*E+S*T+m*C+p*x}return r}},yx=new Ft,yh=class extends nc{interpolate_(e,t,n,i){let r=super.interpolate_(e,t,n,i);return yx.fromArray(r).normalize().toArray(r),r}},an={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Us={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Yd={9728:xt,9729:_t,9984:ao,9985:Rs,9986:Hi,9987:_n},Jd={33071:sn,33648:fs,10497:ui},$l={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Mh={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},vi={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Mx={CUBICSPLINE:void 0,LINEAR:Di,STEP:Li},Zl={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Sx(s){return s.DefaultMaterial===void 0&&(s.DefaultMaterial=new Cn({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:mn})),s.DefaultMaterial}function Xi(s,e,t){for(let n in t.extensions)s[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function Bn(s,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(s.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function Ax(s,e,t){let n=!1,i=!1,r=!1;for(let l=0,h=e.length;l<h;l++){let u=e[l];if(u.POSITION!==void 0&&(n=!0),u.NORMAL!==void 0&&(i=!0),u.COLOR_0!==void 0&&(r=!0),n&&i&&r)break}if(!n&&!i&&!r)return Promise.resolve(s);let a=[],o=[],c=[];for(let l=0,h=e.length;l<h;l++){let u=e[l];if(n){let d=u.POSITION!==void 0?t.getDependency("accessor",u.POSITION):s.attributes.position;a.push(d)}if(i){let d=u.NORMAL!==void 0?t.getDependency("accessor",u.NORMAL):s.attributes.normal;o.push(d)}if(r){let d=u.COLOR_0!==void 0?t.getDependency("accessor",u.COLOR_0):s.attributes.color;c.push(d)}}return Promise.all([Promise.all(a),Promise.all(o),Promise.all(c)]).then(function(l){let h=l[0],u=l[1],d=l[2];return n&&(s.morphAttributes.position=h),i&&(s.morphAttributes.normal=u),r&&(s.morphAttributes.color=d),s.morphTargetsRelative=!0,s})}function Tx(s,e){if(s.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)s.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){let t=e.extras.targetNames;if(s.morphTargetInfluences.length===t.length){s.morphTargetDictionary={};for(let n=0,i=t.length;n<i;n++)s.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function wx(s){let e,t=s.extensions&&s.extensions[ze.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+Ql(t.attributes):e=s.indices+":"+Ql(s.attributes)+":"+s.mode,s.targets!==void 0)for(let n=0,i=s.targets.length;n<i;n++)e+=":"+Ql(s.targets[n]);return e}function Ql(s){let e="",t=Object.keys(s).sort();for(let n=0,i=t.length;n<i;n++)e+=t[n]+":"+s[t[n]]+";";return e}function Sh(s){switch(s){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Ex(s){return s.search(/\.jpe?g($|\?)/i)>0||s.search(/^data\:image\/jpeg/)===0?"image/jpeg":s.search(/\.webp($|\?)/i)>0||s.search(/^data\:image\/webp/)===0?"image/webp":s.search(/\.ktx2($|\?)/i)>0||s.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}var Rx=new Ue,Ah=class{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new vx,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=-1,r=!1,a=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){let o=navigator.userAgent;n=/^((?!chrome|android).)*safari/i.test(o)===!0;let c=o.match(/Version\/(\d+)/);i=n&&c?parseInt(c[1],10):-1,r=o.indexOf("Firefox")>-1,a=r?o.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||n&&i<17||r&&a<98?this.textureLoader=new br(this.options.manager):this.textureLoader=new Mr(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ws(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){let n=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(a){let o={scene:a[0][i.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:i.asset,parser:n,userData:{}};return Xi(r,o,i),Bn(o,i),Promise.all(n._invokeAll(function(c){return c.afterRoot&&c.afterRoot(o)})).then(function(){for(let c of o.scenes)c.updateMatrixWorld();e(o)})}).catch(t)}_markDefs(){let e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let i=0,r=t.length;i<r;i++){let a=t[i].joints;for(let o=0,c=a.length;o<c;o++)e[a[o]].isBone=!0}for(let i=0,r=e.length;i<r;i++){let a=e[i];a.mesh!==void 0&&(this._addNodeRef(this.meshCache,a.mesh),a.skin!==void 0&&(n[a.mesh].isSkinnedMesh=!0)),a.camera!==void 0&&this._addNodeRef(this.cameraCache,a.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;let i=n.clone(),r=(a,o)=>{let c=this.associations.get(a);c!=null&&this.associations.set(o,c);for(let[l,h]of a.children.entries())r(h,o.children[l])};return r(n,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){let i=e(t[n]);if(i)return i}return null}_invokeAll(e){let t=Object.values(this.plugins);t.unshift(this);let n=[];for(let i=0;i<t.length;i++){let r=e(t[i]);r&&n.push(r)}return n}getDependency(e,t){let n=e+":"+t,i=this.cache.get(n);if(!i){switch(e){case"scene":i=this.loadScene(t);break;case"node":i=this._invokeOne(function(r){return r.loadNode&&r.loadNode(t)});break;case"mesh":i=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(t)});break;case"accessor":i=this.loadAccessor(t);break;case"bufferView":i=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(t)});break;case"buffer":i=this.loadBuffer(t);break;case"material":i=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(t)});break;case"texture":i=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(t)});break;case"skin":i=this.loadSkin(t);break;case"animation":i=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(t)});break;case"camera":i=this.loadCamera(t);break;default:if(i=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(e,t)}),!i)throw new Error("Unknown type: "+e);break}this.cache.add(n,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){let n=this,i=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(i.map(function(r,a){return n.getDependency(e,a)})),this.cache.add(e,t)}return t}loadBuffer(e){let t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[ze.KHR_BINARY_GLTF].body);let i=this.options;return new Promise(function(r,a){n.load(Zn.resolveURL(t.uri,i.path),r,void 0,function(){a(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){let t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){let i=t.byteLength||0,r=t.byteOffset||0;return n.slice(r,r+i)})}loadAccessor(e){let t=this,n=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0){let a=$l[i.type],o=Us[i.componentType],c=i.normalized===!0,l=new o(i.count*a);return Promise.resolve(new St(l,a,c))}let r=[];return i.bufferView!==void 0?r.push(this.getDependency("bufferView",i.bufferView)):r.push(null),i.sparse!==void 0&&(r.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(r).then(function(a){let o=a[0],c=$l[i.type],l=Us[i.componentType],h=l.BYTES_PER_ELEMENT,u=h*c,d=i.byteOffset||0,f=i.bufferView!==void 0?n.bufferViews[i.bufferView].byteStride:void 0,g=i.normalized===!0,_,m;if(f&&f!==u){let p=Math.floor(d/f),v="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+p+":"+i.count,S=t.cache.get(v);S||(_=new l(o,p*f,i.count*f/h),S=new _s(_,f/h),t.cache.add(v,S)),m=new vs(S,c,d%f/h,g)}else o===null?_=new l(i.count*c):_=new l(o,d,i.count*c),m=new St(_,c,g);if(i.sparse!==void 0){let p=$l.SCALAR,v=Us[i.sparse.indices.componentType],S=i.sparse.indices.byteOffset||0,M=i.sparse.values.byteOffset||0,E=new v(a[1],S,i.sparse.count*p),T=new l(a[2],M,i.sparse.count*c);o!==null&&(m=new St(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let C=0,x=E.length;C<x;C++){let w=E[C];if(m.setX(w,T[C*c]),c>=2&&m.setY(w,T[C*c+1]),c>=3&&m.setZ(w,T[C*c+2]),c>=4&&m.setW(w,T[C*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=g}return m})}loadTexture(e){let t=this.json,n=this.options,r=t.textures[e].source,a=t.images[r],o=this.textureLoader;if(a.uri){let c=n.manager.getHandler(a.uri);c!==null&&(o=c)}return this.loadTextureImage(e,r,o)}loadTextureImage(e,t,n){let i=this,r=this.json,a=r.textures[e],o=r.images[t],c=(o.uri||o.bufferView)+":"+a.sampler;if(this.textureCache[c])return this.textureCache[c];let l=this.loadImageSource(t,n).then(function(h){h.flipY=!1,h.name=a.name||o.name||"",h.name===""&&typeof o.uri=="string"&&o.uri.startsWith("data:image/")===!1&&(h.name=o.uri);let d=(r.samplers||{})[a.sampler]||{};return h.magFilter=Yd[d.magFilter]||_t,h.minFilter=Yd[d.minFilter]||_n,h.wrapS=Jd[d.wrapS]||ui,h.wrapT=Jd[d.wrapT]||ui,h.generateMipmaps=!h.isCompressedTexture&&h.minFilter!==xt&&h.minFilter!==_t,i.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[c]=l,l}loadImageSource(e,t){let n=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());let a=i.images[e],o=self.URL||self.webkitURL,c=a.uri||"",l=!1;if(a.bufferView!==void 0)c=n.getDependency("bufferView",a.bufferView).then(function(u){l=!0;let d=new Blob([u],{type:a.mimeType});return c=o.createObjectURL(d),c});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");let h=Promise.resolve(c).then(function(u){return new Promise(function(d,f){let g=d;t.isImageBitmapLoader===!0&&(g=function(_){let m=new Ct(_);m.needsUpdate=!0,d(m)}),t.load(Zn.resolveURL(u,r.path),g,void 0,f)})}).then(function(u){return l===!0&&o.revokeObjectURL(c),Bn(u,a),u.userData.mimeType=a.mimeType||Ex(a.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),u});return this.sourceCache[e]=h,h}assignTexture(e,t,n,i){let r=this;return this.getDependency("texture",n.index).then(function(a){if(!a)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(a=a.clone(),a.channel=n.texCoord),r.extensions[ze.KHR_TEXTURE_TRANSFORM]){let o=n.extensions!==void 0?n.extensions[ze.KHR_TEXTURE_TRANSFORM]:void 0;if(o){let c=r.associations.get(a);a=r.extensions[ze.KHR_TEXTURE_TRANSFORM].extendTexture(a,o),r.associations.set(a,c)}}return i!==void 0&&(a.colorSpace=i),e[t]=a,a})}assignFinalMaterial(e){let t=e.geometry,n=e.material,i=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,a=t.attributes.normal===void 0;if(e.isPoints){let o="PointsMaterial:"+n.uuid,c=this.cache.get(o);c||(c=new Ts,Gt.prototype.copy.call(c,n),c.color.copy(n.color),c.map=n.map,c.sizeAttenuation=!1,this.cache.add(o,c)),n=c}else if(e.isLine){let o="LineBasicMaterial:"+n.uuid,c=this.cache.get(o);c||(c=new As,Gt.prototype.copy.call(c,n),c.color.copy(n.color),c.map=n.map,this.cache.add(o,c)),n=c}if(i||r||a){let o="ClonedMaterial:"+n.uuid+":";i&&(o+="derivative-tangents:"),r&&(o+="vertex-colors:"),a&&(o+="flat-shading:");let c=this.cache.get(o);c||(c=n.clone(),r&&(c.vertexColors=!0),a&&(c.flatShading=!0),i&&(c.normalScale&&(c.normalScale.y*=-1),c.clearcoatNormalScale&&(c.clearcoatNormalScale.y*=-1)),this.cache.add(o,c),this.associations.set(c,this.associations.get(n))),n=c}e.material=n}getMaterialType(){return Cn}loadMaterial(e){let t=this,n=this.json,i=this.extensions,r=n.materials[e],a,o={},c=r.extensions||{},l=[];if(c[ze.KHR_MATERIALS_UNLIT]){let u=i[ze.KHR_MATERIALS_UNLIT];a=u.getMaterialType(),l.push(u.extendParams(o,r,t))}else{let u=r.pbrMetallicRoughness||{};if(o.color=new Te(1,1,1),o.opacity=1,Array.isArray(u.baseColorFactor)){let d=u.baseColorFactor;o.color.setRGB(d[0],d[1],d[2],kt),o.opacity=d[3]}u.baseColorTexture!==void 0&&l.push(t.assignTexture(o,"map",u.baseColorTexture,bt)),o.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,o.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(l.push(t.assignTexture(o,"metalnessMap",u.metallicRoughnessTexture)),l.push(t.assignTexture(o,"roughnessMap",u.metallicRoughnessTexture))),a=this._invokeOne(function(d){return d.getMaterialType&&d.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(d){return d.extendMaterialParams&&d.extendMaterialParams(e,o)})))}r.doubleSided===!0&&(o.side=rn);let h=r.alphaMode||Zl.OPAQUE;if(h===Zl.BLEND?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,h===Zl.MASK&&(o.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&a!==bn&&(l.push(t.assignTexture(o,"normalMap",r.normalTexture)),o.normalScale=new He(1,1),r.normalTexture.scale!==void 0)){let u=r.normalTexture.scale;o.normalScale.set(u,u)}if(r.occlusionTexture!==void 0&&a!==bn&&(l.push(t.assignTexture(o,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(o.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&a!==bn){let u=r.emissiveFactor;o.emissive=new Te().setRGB(u[0],u[1],u[2],kt)}return r.emissiveTexture!==void 0&&a!==bn&&l.push(t.assignTexture(o,"emissiveMap",r.emissiveTexture,bt)),Promise.all(l).then(function(){let u=new a(o);return r.name&&(u.name=r.name),Bn(u,r),t.associations.set(u,{materials:e}),r.extensions&&Xi(i,u,r),u})}createUniqueName(e){let t=tt.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){let t=this,n=this.extensions,i=this.primitiveCache;function r(o){return n[ze.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(o,t).then(function(c){return $d(c,o,t)})}let a=[];for(let o=0,c=e.length;o<c;o++){let l=e[o],h=wx(l),u=i[h];if(u)a.push(u.promise);else{let d;l.extensions&&l.extensions[ze.KHR_DRACO_MESH_COMPRESSION]?d=r(l):d=$d(new zt,l,t),i[h]={primitive:l,promise:d},a.push(d)}}return Promise.all(a)}loadMesh(e){let t=this,n=this.json,i=this.extensions,r=n.meshes[e],a=r.primitives,o=[];for(let c=0,l=a.length;c<l;c++){let h=a[c].material===void 0?Sx(this.cache):this.getDependency("material",a[c].material);o.push(h)}return o.push(t.loadGeometries(a)),Promise.all(o).then(function(c){let l=c.slice(0,c.length-1),h=c[c.length-1],u=[];for(let f=0,g=h.length;f<g;f++){let _=h[f],m=a[f],p,v=l[f];if(m.mode===an.TRIANGLES||m.mode===an.TRIANGLE_STRIP||m.mode===an.TRIANGLE_FAN||m.mode===void 0)p=r.isSkinnedMesh===!0?new ar(_,v):new lt(_,v),p.isSkinnedMesh===!0&&p.normalizeSkinWeights(),m.mode===an.TRIANGLE_STRIP?p.geometry=Jl(p.geometry,Nr):m.mode===an.TRIANGLE_FAN&&(p.geometry=Jl(p.geometry,Is));else if(m.mode===an.LINES)p=new cr(_,v);else if(m.mode===an.LINE_STRIP)p=new ki(_,v);else if(m.mode===an.LINE_LOOP)p=new lr(_,v);else if(m.mode===an.POINTS)p=new hr(_,v);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(p.geometry.morphAttributes).length>0&&Tx(p,r),p.name=t.createUniqueName(r.name||"mesh_"+e),Bn(p,r),m.extensions&&Xi(i,p,m),t.assignFinalMaterial(p),u.push(p)}for(let f=0,g=u.length;f<g;f++)t.associations.set(u[f],{meshes:e,primitives:f});if(u.length===1)return r.extensions&&Xi(i,u[0],r),u[0];let d=new fn;r.extensions&&Xi(i,d,r),t.associations.set(d,{meshes:e});for(let f=0,g=u.length;f<g;f++)d.add(u[f]);return d})}loadCamera(e){let t,n=this.json.cameras[e],i=n[n.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new Mt(Or.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):n.type==="orthographic"&&(t=new pi(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Bn(t,n),Promise.resolve(t)}loadSkin(e){let t=this.json.skins[e],n=[];for(let i=0,r=t.joints.length;i<r;i++)n.push(this._loadNodeShallow(t.joints[i]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(i){let r=i.pop(),a=i,o=[],c=[];for(let l=0,h=a.length;l<h;l++){let u=a[l];if(u){o.push(u);let d=new Ue;r!==null&&d.fromArray(r.array,l*16),c.push(d)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[l])}return new or(o,c)})}loadAnimation(e){let t=this.json,n=this,i=t.animations[e],r=i.name?i.name:"animation_"+e,a=[],o=[],c=[],l=[],h=[];for(let u=0,d=i.channels.length;u<d;u++){let f=i.channels[u],g=i.samplers[f.sampler],_=f.target,m=_.node,p=i.parameters!==void 0?i.parameters[g.input]:g.input,v=i.parameters!==void 0?i.parameters[g.output]:g.output;_.node!==void 0&&(a.push(this.getDependency("node",m)),o.push(this.getDependency("accessor",p)),c.push(this.getDependency("accessor",v)),l.push(g),h.push(_))}return Promise.all([Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(l),Promise.all(h)]).then(function(u){let d=u[0],f=u[1],g=u[2],_=u[3],m=u[4],p=[];for(let S=0,M=d.length;S<M;S++){let E=d[S],T=f[S],C=g[S],x=_[S],w=m[S];if(E===void 0)continue;E.updateMatrix&&E.updateMatrix();let L=n._createAnimationTracks(E,T,C,x,w);if(L)for(let R=0;R<L.length;R++)p.push(L[R])}let v=new Bi(r,void 0,p);return Bn(v,i),v})}createNodeMesh(e){let t=this.json,n=this,i=t.nodes[e];return i.mesh===void 0?null:n.getDependency("mesh",i.mesh).then(function(r){let a=n._getNodeRef(n.meshCache,i.mesh,r);return i.weights!==void 0&&a.traverse(function(o){if(o.isMesh)for(let c=0,l=i.weights.length;c<l;c++)o.morphTargetInfluences[c]=i.weights[c]}),a})}loadNode(e){let t=this.json,n=this,i=t.nodes[e],r=n._loadNodeShallow(e),a=[],o=i.children||[];for(let l=0,h=o.length;l<h;l++)a.push(n.getDependency("node",o[l]));let c=i.skin===void 0?Promise.resolve(null):n.getDependency("skin",i.skin);return Promise.all([r,Promise.all(a),c]).then(function(l){let h=l[0],u=l[1],d=l[2];d!==null&&h.traverse(function(f){f.isSkinnedMesh&&f.bind(d,Rx)});for(let f=0,g=u.length;f<g;f++)h.add(u[f]);if(h.userData.pivot!==void 0&&u.length>0){let f=h.userData.pivot,g=u[0];h.pivot=new F().fromArray(f),h.position.x-=f[0],h.position.y-=f[1],h.position.z-=f[2],g.position.set(0,0,0),delete h.userData.pivot}return h})}_loadNodeShallow(e){let t=this.json,n=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];let r=t.nodes[e],a=r.name?i.createUniqueName(r.name):"",o=[],c=i._invokeOne(function(l){return l.createNodeMesh&&l.createNodeMesh(e)});return c&&o.push(c),r.camera!==void 0&&o.push(i.getDependency("camera",r.camera).then(function(l){return i._getNodeRef(i.cameraCache,r.camera,l)})),i._invokeAll(function(l){return l.createNodeAttachment&&l.createNodeAttachment(e)}).forEach(function(l){o.push(l)}),this.nodeCache[e]=Promise.all(o).then(function(l){let h;if(r.isBone===!0?h=new ys:l.length>1?h=new fn:l.length===1?h=l[0]:h=new ct,h!==l[0])for(let u=0,d=l.length;u<d;u++)h.add(l[u]);if(r.name&&(h.userData.name=r.name,h.name=a),Bn(h,r),r.extensions&&Xi(n,h,r),r.matrix!==void 0){let u=new Ue;u.fromArray(r.matrix),h.applyMatrix4(u)}else r.translation!==void 0&&h.position.fromArray(r.translation),r.rotation!==void 0&&h.quaternion.fromArray(r.rotation),r.scale!==void 0&&h.scale.fromArray(r.scale);if(!i.associations.has(h))i.associations.set(h,{});else if(r.mesh!==void 0&&i.meshCache.refs[r.mesh]>1){let u=i.associations.get(h);i.associations.set(h,{...u})}return i.associations.get(h).nodes=e,h}),this.nodeCache[e]}loadScene(e){let t=this.extensions,n=this.json.scenes[e],i=this,r=new fn;n.name&&(r.name=i.createUniqueName(n.name)),Bn(r,n),n.extensions&&Xi(t,r,n);let a=n.nodes||[],o=[];for(let c=0,l=a.length;c<l;c++)o.push(i.getDependency("node",a[c]));return Promise.all(o).then(function(c){for(let h=0,u=c.length;h<u;h++){let d=c[h];d.parent!==null?r.add(Xd(d)):r.add(d)}let l=h=>{let u=new Map;for(let[d,f]of i.associations)(d instanceof Gt||d instanceof Ct)&&u.set(d,f);return h.traverse(d=>{let f=i.associations.get(d);f!=null&&u.set(d,f)}),u};return i.associations=l(r),r})}_createAnimationTracks(e,t,n,i,r){let a=[],o=e.name?e.name:e.uuid,c=[];function l(f){f.morphTargetInfluences&&c.push(f.name?f.name:f.uuid)}vi[r.path]===vi.weights?(l(e),e.isGroup&&e.children.forEach(l)):c.push(o);let h;switch(vi[r.path]){case vi.weights:h=In;break;case vi.rotation:h=Ln;break;case vi.translation:case vi.scale:h=Dn;break;default:n.itemSize===1?h=In:h=Dn;break}let u=i.interpolation!==void 0?Mx[i.interpolation]:Di,d=this._getArrayFromAccessor(n);for(let f=0,g=c.length;f<g;f++){let _=new h(c[f]+"."+vi[r.path],t.array,d,u);i.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(_),a.push(_)}return a}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){let n=Sh(t.constructor),i=new Float32Array(t.length);for(let r=0,a=t.length;r<a;r++)i[r]=t[r]*n;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){let i=this instanceof Ln?yh:nc;return new i(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}};function Cx(s,e,t){let n=e.attributes,i=new Bt;if(n.POSITION!==void 0){let o=t.json.accessors[n.POSITION],c=o.min,l=o.max;if(c!==void 0&&l!==void 0){if(i.set(new F(c[0],c[1],c[2]),new F(l[0],l[1],l[2])),o.normalized){let h=Sh(Us[o.componentType]);i.min.multiplyScalar(h),i.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;let r=e.targets;if(r!==void 0){let o=new F,c=new F;for(let l=0,h=r.length;l<h;l++){let u=r[l];if(u.POSITION!==void 0){let d=t.json.accessors[u.POSITION],f=d.min,g=d.max;if(f!==void 0&&g!==void 0){if(c.setX(Math.max(Math.abs(f[0]),Math.abs(g[0]))),c.setY(Math.max(Math.abs(f[1]),Math.abs(g[1]))),c.setZ(Math.max(Math.abs(f[2]),Math.abs(g[2]))),d.normalized){let _=Sh(Us[d.componentType]);c.multiplyScalar(_)}o.max(c)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(o)}s.boundingBox=i;let a=new Vt;i.getCenter(a.center),a.radius=i.min.distanceTo(i.max)/2,s.boundingSphere=a}function $d(s,e,t){let n=e.attributes,i=[];function r(a,o){return t.getDependency("accessor",a).then(function(c){s.setAttribute(o,c)})}for(let a in n){let o=Mh[a]||a.toLowerCase();o in s.attributes||i.push(r(n[a],o))}if(e.indices!==void 0&&!s.index){let a=t.getDependency("accessor",e.indices).then(function(o){s.setIndex(o)});i.push(a)}return Be.workingColorSpace!==kt&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Be.workingColorSpace}" not supported.`),Bn(s,e),Cx(s,e,t),Promise.all(i).then(function(){return e.targets!==void 0?Ax(s,e.targets,t):s})}var ic=class extends Ni{constructor(){super(),this.name="RoomEnvironment",this.position.y=-3.5;let e=new fi;e.deleteAttribute("uv");let t=new Cn({side:Pt}),n=new Cn,i=new Gi(16777215,900,28,2);i.position.set(.418,16.199,.3),this.add(i);let r=new lt(e,t);r.position.set(-.757,13.219,.717),r.scale.set(31.713,28.305,28.591),this.add(r);let a=new Oi(e,n,6),o=new ct;o.position.set(-10.906,2.009,1.846),o.rotation.set(0,-.195,0),o.scale.set(2.328,7.905,4.651),o.updateMatrix(),a.setMatrixAt(0,o.matrix),o.position.set(-5.607,-.754,-.758),o.rotation.set(0,.994,0),o.scale.set(1.97,1.534,3.955),o.updateMatrix(),a.setMatrixAt(1,o.matrix),o.position.set(6.167,.857,7.803),o.rotation.set(0,.561,0),o.scale.set(3.927,6.285,3.687),o.updateMatrix(),a.setMatrixAt(2,o.matrix),o.position.set(-2.017,.018,6.124),o.rotation.set(0,.333,0),o.scale.set(2.002,4.566,2.064),o.updateMatrix(),a.setMatrixAt(3,o.matrix),o.position.set(2.291,-.756,-2.621),o.rotation.set(0,-.286,0),o.scale.set(1.546,1.552,1.496),o.updateMatrix(),a.setMatrixAt(4,o.matrix),o.position.set(-2.193,-.369,-5.547),o.rotation.set(0,.516,0),o.scale.set(3.875,3.487,2.986),o.updateMatrix(),a.setMatrixAt(5,o.matrix),this.add(a);let c=new lt(e,Os(50));c.position.set(-16.116,14.37,8.208),c.scale.set(.1,2.428,2.739),this.add(c);let l=new lt(e,Os(50));l.position.set(-16.109,18.021,-8.207),l.scale.set(.1,2.425,2.751),this.add(l);let h=new lt(e,Os(17));h.position.set(14.904,12.198,-1.832),h.scale.set(.15,4.265,6.331),this.add(h);let u=new lt(e,Os(43));u.position.set(-.462,8.89,14.52),u.scale.set(4.38,5.441,.088),this.add(u);let d=new lt(e,Os(20));d.position.set(3.235,11.486,-12.541),d.scale.set(2.5,2,.1),this.add(d);let f=new lt(e,Os(100));f.position.set(0,20,0),f.scale.set(1,.1,1),this.add(f)}dispose(){let e=new Set;this.traverse(t=>{t.isMesh&&(e.add(t.geometry),e.add(t.material))});for(let t of e)t.dispose()}};function Os(s){return new pr({color:0,emissive:16777215,emissiveIntensity:s})}var Px=["viseme_aa","viseme_CH","viseme_DD","viseme_E","viseme_FF","viseme_I","viseme_kk","viseme_nn","viseme_O","viseme_PP","viseme_RR","viseme_sil","viseme_SS","viseme_TH","viseme_U"],Ix=["jawOpen","mouthOpen"],Qd={a:"viseme_aa",e:"viseme_E",i:"viseme_I",o:"viseme_O",u:"viseme_U",b:"viseme_PP",m:"viseme_PP",p:"viseme_PP",f:"viseme_FF",v:"viseme_FF",d:"viseme_DD",t:"viseme_DD",n:"viseme_DD",l:"viseme_DD",k:"viseme_kk",g:"viseme_kk",c:"viseme_kk",q:"viseme_kk",s:"viseme_SS",z:"viseme_SS",x:"viseme_SS",r:"viseme_RR",w:"viseme_U",y:"viseme_I",h:"viseme_E",j:"viseme_CH"},ef={th:"viseme_TH",ch:"viseme_CH",sh:"viseme_CH"},sc=80,Lx=120,Dx=200,Fx=.35;function rc(s){let e=new Map,t=new Map;return s?.traverse?.(n=>{if(!n.isMesh||!n.morphTargetDictionary||!n.morphTargetInfluences)return;let i=n.morphTargetDictionary;for(let r of Px)i[r]!==void 0&&(e.has(r)||e.set(r,[]),e.get(r).push({mesh:n,index:i[r]}));for(let r of Ix)i[r]!==void 0&&(t.has(r)||t.set(r,[]),t.get(r).push({mesh:n,index:i[r]}))}),e.size?{mode:"arkit",map:e}:t.size?{mode:"jaw",map:t}:null}function tf(s){let e=[],t=String(s||"").toLowerCase(),n=0;for(let i=0;i<t.length;){let r=i+1<t.length?t[i]+t[i+1]:"";if(ef[r]){e.push({viseme:ef[r],startMs:n,endMs:n+sc*2}),n+=sc*2,i+=2;continue}let a=t[i];Qd[a]?(e.push({viseme:Qd[a],startMs:n,endMs:n+sc}),n+=sc):/\s/.test(a)?n+=Lx:/[.,!?;:]/.test(a)&&(n+=Dx),i++}return e}function Vr(s){let e=tf(s);return e.length?e[e.length-1].endMs:0}function ac(s,e,t={}){let n=t.rate&&t.rate>0?t.rate:1,i=e?tf(s):[],r=i.length?i[i.length-1].endMs:0,a=-1,o=!1,c=e?new Map([...e.map.keys()].map(d=>[d,0])):new Map;function l(d,f){let g=e?.map.get(d);if(g)for(let{mesh:_,index:m}of g)_.morphTargetInfluences[m]=f}function h(d){if(!e||o)return;a<0&&(a=d);let f=(d-a)*n,g=null;if(f<=r){for(let _ of i)if(f>=_.startMs&&f<_.endMs){g=_.viseme;break}}for(let _ of c.keys()){let m=0;e.mode==="arkit"?m=_===g?.92:0:m=g?.45+.25*Math.abs(Math.sin(f/70)):0;let p=c.get(_)+(m-c.get(_))*Fx;c.set(_,p),l(_,p)}f>r+120&&(o=!0)}function u(){o=!0;for(let d of c.keys())c.set(d,0),l(d,0)}return{tick:h,stop:u,get done(){return o},get totalMs(){return r}}}var Th=null;function Ux(){return Th||(Th=Promise.resolve().then(()=>(sf(),nf)).then(s=>s.MeshoptDecoder)),Th}var rf={bust:{center:.86,dist:.62,fov:28},upper:{center:.72,dist:1,fov:30},full:{center:.5,dist:1.9,fov:32}},Ox=["eyeBlinkLeft","eyeBlinkRight","eyesClosed","blink"],ks=class{constructor(e,t={}){this.container=e,this._opts=t,this.scene=new Ni,this._applyBackground(t.background),this.canvas=document.createElement("canvas"),this.canvas.style.cssText="display:block;width:100%;height:100%;outline:none",e.appendChild(this.canvas);let n=e.clientWidth||320,i=e.clientHeight||360;this.camera=new Mt(30,n/i,.05,200),this.camera.position.set(0,1.5,2.2),this.renderer=new $o({canvas:this.canvas,antialias:!0,alpha:!0,powerPreference:"high-performance"}),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),this.renderer.setSize(n,i,!1),this.renderer.outputColorSpace=bt,this.renderer.toneMapping=wr,this.renderer.toneMappingExposure=1.05;let r=new Fs(this.renderer);this._envTex=r.fromScene(new ic,.04).texture,this.scene.environment=this._envTex,r.dispose(),this.scene.add(new yr(16777215,.6));let a=new mi(16777215,1.4);a.position.set(1.5,3,2.5),this.scene.add(a);let o=new mi(10075135,.5);o.position.set(-2,2,-2),this.scene.add(o),this.clock=new Ar,this.mixer=null,this.model=null,this.morph=null,this._idleAction=null,this._talkAction=null,this._speaking=!1,this._loadToken=0,this._frameHooks=new Set,this._headBone=null,this._blinkTargets=[],this._nextBlink=1+Math.random()*3,this._blinkT=-1,this._reduce=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!1,this._resizeObs=new ResizeObserver(()=>this._resize()),this._resizeObs.observe(e),this._visible=!document.hidden,this._onscreen=!0,this._render=this._render.bind(this),this._onVisibility=()=>{this._visible=!document.hidden,this._kick()},document.addEventListener("visibilitychange",this._onVisibility),this._inViewObs=new IntersectionObserver(c=>{this._onscreen=c.some(l=>l.isIntersecting),this._kick()},{threshold:0}),this._inViewObs.observe(e),this._raf=0,this._raf=requestAnimationFrame(this._render)}_kick(){this._raf||!this.renderer||!this._visible||!this._onscreen||(this.clock.getDelta(),this._raf=requestAnimationFrame(this._render))}onFrame(e){return this._frameHooks.add(e),()=>this._frameHooks.delete(e)}async load(e,t={}){let n=++this._loadToken,i=new ec;i.setMeshoptDecoder(await Ux());let r=await i.loadAsync(e);if(n!==this._loadToken)return null;if(this.model&&(this.scene.remove(this.model),this._disposeObject(this.model)),this.mixer&&(this.mixer.stopAllAction(),this.mixer.uncacheRoot(this.model)),this.mixer=null,this._idleAction=null,this._talkAction=null,this.model=r.scene,this.scene.add(this.model),this.morph=rc(this.model),this._collectRigRefs(this.model),r.animations?.length){this.mixer=new Sr(this.model);let a=af(r.animations,["idle","breathing","stand","rest"])||r.animations[0],o=af(r.animations,["talk","talking","speak","gesture","wave"]);a&&(this._idleAction=this.mixer.clipAction(a),this._idleAction.setLoop(Fr,1/0).play()),o&&o!==a&&(this._talkAction=this.mixer.clipAction(o),this._talkAction.setLoop(Fr,1/0),this._talkAction.enabled=!0,this._talkAction.setEffectiveWeight(0),this._talkAction.play())}return this._frame(t.framing||"upper"),r}setSpeaking(e){this._speaking=!!e,this._talkAction&&this._talkAction.setEffectiveWeight(e?.85:0)}_collectRigRefs(e){this._headBone=null,this._blinkTargets=[],e.traverse(t=>{if(t.isBone&&/head/i.test(t.name)&&!/headtop|end/i.test(t.name)&&!this._headBone&&(this._headBone=t,t.userData._restQ=t.quaternion.clone()),t.isMesh&&t.morphTargetDictionary)for(let n of Ox){let i=t.morphTargetDictionary[n];i!==void 0&&this._blinkTargets.push({mesh:t,index:i})}})}_frame(e){let t=rf[e]||rf.upper,n=new Bt().setFromObject(this.model),i=new F,r=new F;n.getSize(i),n.getCenter(r);let a=i.y||1.7,o=n.min.y+a*t.center,c=r.x,l=Math.max(i.x,a)||1;this.camera.fov=t.fov;let h=t.fov*Math.PI/180,u=l/2/Math.tan(h/2)*t.dist;this.camera.position.set(c,o,n.max.z+u),this.camera.near=Math.max(.01,u/100),this.camera.far=u*50,this.camera.lookAt(c,o,r.z),this.camera.updateProjectionMatrix(),this._focus=new F(c,o,r.z)}_proceduralIdle(e){if(this.mixer||this._reduce||!this.model)return;let t=Math.sin(e*1.6)*.006;if(this.model.position.y=t,this._headBone&&this._headBone.userData._restQ){let n=Math.sin(e*.6)*.05,i=Math.sin(e*.9)*.03+(this._speaking?Math.sin(e*6)*.04:0);this._headBone.quaternion.copy(this._headBone.userData._restQ),this._headBone.rotateY(n),this._headBone.rotateX(i)}}_blink(e){if(!this._blinkTargets.length||this._reduce)return;if(this._blinkT<0){this._nextBlink-=e,this._nextBlink<=0&&(this._blinkT=0,this._nextBlink=2+Math.random()*4);return}this._blinkT+=e;let t=.16,n=this._blinkT<t/2?this._blinkT/(t/2):1-(this._blinkT-t/2)/(t/2),i=Or.clamp(n,0,1);for(let{mesh:r,index:a}of this._blinkTargets)r.morphTargetInfluences[a]=i;this._blinkT>=t&&(this._blinkT=-1)}_render(){if(!this.renderer||!this._visible||!this._onscreen){this._raf=0;return}this._raf=requestAnimationFrame(this._render);let e=Math.min(this.clock.getDelta(),.05),t=this.clock.elapsedTime,n=t*1e3;this.mixer?.update(e),this._proceduralIdle(t),this._blink(e);for(let i of this._frameHooks)try{i(e,n)}catch{}this.renderer.render(this.scene,this.camera)}_resize(){if(!this.renderer||!this.camera)return;let e=this.container.clientWidth||1,t=this.container.clientHeight||1;this.renderer.setSize(e,t,!1),this.camera.aspect=e/t,this.camera.updateProjectionMatrix()}_applyBackground(e){if(!e||e==="transparent"){this.scene.background=null;return}try{this.scene.background=new Te(e)}catch{this.scene.background=null}}_disposeObject(e){e.traverse?.(t=>{t.geometry?.dispose?.(),(Array.isArray(t.material)?t.material:[t.material]).forEach(i=>{if(i){for(let r of Object.values(i))r?.isTexture&&r.dispose();i.dispose?.()}})})}dispose(){cancelAnimationFrame(this._raf),this._raf=0,this._resizeObs?.disconnect(),this._inViewObs?.disconnect(),document.removeEventListener("visibilitychange",this._onVisibility),this._frameHooks.clear(),this.model&&(this.scene.remove(this.model),this._disposeObject(this.model)),this._envTex?.dispose(),this._envTex=null,this.renderer?.dispose(),this.renderer?.forceContextLoss?.(),this.renderer=null,this.canvas?.remove(),this.scene=null,this.camera=null,this.model=null}};function af(s,e){for(let t of e){let n=s.find(i=>i.name&&i.name.toLowerCase().includes(t));if(n)return n}return null}var Bs=typeof window<"u"&&"speechSynthesis"in window,zs=class{constructor(e,t={}){this.stage=e,this.muted=!!t.muted,this.onState=t.onState||(()=>{}),this.onCaption=t.onCaption||(()=>{}),this.onError=t.onError||(()=>{}),this.agent=null,this._queue=[],this._active=null,this._frameUnsub=e.onFrame((n,i)=>this._tick(i)),this._voices=[],Bs&&(this._onVoices=this._loadVoices.bind(this),this._loadVoices(),window.speechSynthesis.addEventListener?.("voiceschanged",this._onVoices))}setAgent(e){this.agent=e}setMuted(e){this.muted=!!e,e&&Bs&&window.speechSynthesis.cancel()}speak(e,t={}){let n=String(e||"").trim();return n?(t.interrupt&&this.cancel(),new Promise(i=>{this._queue.push({text:n,resolve:i}),this._active||this._next()})):Promise.resolve()}cancel(){Bs&&window.speechSynthesis.cancel(),this._finishActive(!0);for(let e of this._queue.splice(0))e.resolve();this.onCaption(null),this.stage.setSpeaking(!1),this.onState("idle")}get speaking(){return!!this._active}_next(){let e=this._queue.shift();if(!e){this.onState("idle"),this.onCaption(null),this.stage.setSpeaking(!1);return}let t=this.agent?.voice?.rate||1,n=ac(e.text,this.stage.morph,{rate:t}),i={text:e.text,lipsync:n,resolve:e.resolve,utter:null,fallbackTimer:0};if(this._active=i,this.stage.setSpeaking(!0),this.onState("speaking"),this.onCaption(e.text),Bs&&!this.muted){let r=new SpeechSynthesisUtterance(e.text),a=this._pickVoice();a&&(r.voice=a),r.lang=this.agent?.voice?.lang||a?.lang||"en-US",r.pitch=of(this.agent?.voice?.pitch??1,0,2),r.rate=of(this.agent?.voice?.rate??1,.1,3),r.onend=()=>this._finishActive(!1),r.onerror=c=>{c?.error&&!/interrupt|cancel/i.test(c.error)?(this.onError(new Error("speech-synthesis: "+c.error)),this._runVisualFallback(i)):this._finishActive(!1)},i.utter=r;let o=Vr(e.text)*(1/(r.rate||1))+1500;i.fallbackTimer=window.setTimeout(()=>this._finishActive(!1),Math.max(2500,o));try{window.speechSynthesis.speak(r)}catch(c){this.onError(c instanceof Error?c:new Error(String(c))),this._runVisualFallback(i)}}else this._runVisualFallback(i)}_runVisualFallback(e){if(e!==this._active)return;let t=e.lipsync.totalMs?e.lipsync.totalMs+350:Math.max(1200,Vr(e.text)+350);e.fallbackTimer=window.setTimeout(()=>this._finishActive(!1),t)}_tick(e){this._active?.lipsync?.tick(e)}_finishActive(e){let t=this._active;if(t){this._active=null,t.fallbackTimer&&clearTimeout(t.fallbackTimer),t.lipsync?.stop();try{t.resolve()}catch{}e||this._next()}}_loadVoices(){Bs&&(this._voices=window.speechSynthesis.getVoices()||[])}_pickVoice(){this._voices.length||this._loadVoices();let e=this.agent?.voice||{},t=this._voices;if(!t.length)return null;for(let n of e.match||[]){let i=t.find(r=>r.name?.toLowerCase().includes(n.toLowerCase()));if(i)return i}if(e.lang){let n=t.find(i=>i.lang?.toLowerCase().startsWith(e.lang.toLowerCase().slice(0,2)));if(n)return n}return t.find(n=>n.localService)||t[0]}dispose(){this.cancel(),this._frameUnsub?.(),Bs&&window.speechSynthesis.removeEventListener?.("voiceschanged",this._onVoices)}};function of(s,e,t){return Math.max(e,Math.min(t,Number(s)))}var Hr="https://three.ws/avatars/",ji=[{id:"sol",name:"Sol",tagline:"Calm, clear product guide",file:"realistic-halfbody.glb",lipsync:"viseme",framing:"bust",voice:{lang:"en-US",pitch:1,rate:1,match:["samantha","jenny","aria","google us english"]},accent:"#6366f1"},{id:"nova",name:"Nova",tagline:"Upbeat, friendly host",file:"selfie-girl.glb",lipsync:"viseme",framing:"upper",voice:{lang:"en-US",pitch:1.12,rate:1.04,match:["jenny","aria","samantha","google us english"]},accent:"#ec4899"},{id:"vera",name:"Vera",tagline:"Composed, professional",file:"realistic-female.glb",lipsync:"viseme",framing:"bust",voice:{lang:"en-GB",pitch:1,rate:.98,match:["libby","sonia","google uk english female","serena"]},accent:"#14b8a6"},{id:"atlas",name:"Atlas",tagline:"Confident, grounded",file:"realistic-male.glb",lipsync:"viseme",framing:"bust",voice:{lang:"en-US",pitch:.92,rate:.98,match:["guy","eric","google us english","daniel"]},accent:"#3b82f6"},{id:"echo",name:"Echo",tagline:"Neutral, even-keeled",file:"default.glb",lipsync:"viseme",framing:"upper",voice:{lang:"en-US",pitch:1,rate:1,match:["google us english","samantha","guy"]},accent:"#8b5cf6"}],Gs="sol";function Wr(s){return ji.find(e=>e.id===s)||ji.find(e=>e.id===Gs)}function qr(s,e=Hr){return s?s.url?s.url:(e.endsWith("/")?e:e+"/")+s.file:null}function oc(s){return s?typeof s=="string"?{id:"custom",name:"Assistant",tagline:"Custom avatar",url:s,lipsync:"viseme",framing:"bust",voice:{lang:"en-US",pitch:1,rate:1,match:[]},accent:"#6366f1"}:{...Wr(Gs),id:"custom",name:"Assistant",...s}:null}var cf=6e3,lf=8e3,kx='script,style,noscript,template,svg,iframe,canvas,[aria-hidden="true"],[hidden],[data-concierge-ignore]';function yi(s){return String(s||"").replace(/\s+/g," ").trim()}function Bx(s,e){if(!s)return"";let t=s.cloneNode(!0);for(let n of t.querySelectorAll(kx))n.remove();for(let n of t.querySelectorAll("[data-three-concierge]"))n.remove();return yi(t.textContent).slice(0,e)}function wh(s,e={}){if(!s)return{url:"",title:"",description:"",headings:[],nav:[],content:"",name:""};let t=yi(s.title).slice(0,200),n=yi(s.querySelector('meta[name="description"]')?.getAttribute("content")||s.querySelector('meta[property="og:description"]')?.getAttribute("content")).slice(0,500),i=[...s.querySelectorAll("h1, h2, h3")].map(h=>yi(h.textContent)).filter(h=>h&&h.length<=120).slice(0,24),r=[...s.querySelectorAll("nav a, header a")].map(h=>yi(h.textContent)).filter(h=>h&&h.length<=40),a=[...new Set(r)].slice(0,24),o=s.querySelector("main")||s.querySelector('[role="main"]')||s.querySelector("article")||s.body,c=Bx(o,6e3),l=yi(s.querySelector('meta[property="og:site_name"]')?.getAttribute("content"))||(e.siteName?yi(e.siteName):"")||(typeof location<"u"?location.hostname:"");return{url:typeof location<"u"?location.href.split("#")[0]:"",title:t,description:n,headings:i,nav:a,content:c,name:l.slice(0,120)}}function cc(s,e={}){let t=wh(s,e),n=yi(e.knowledge).slice(0,8e3),i=t.content;if(n){let r=Math.max(0,6e3-Math.min(n.length,6e3));i=i.slice(0,r)}return{url:t.url,name:t.name,title:t.title,description:t.description,headings:t.headings,nav:t.nav,knowledge:n,content:i}}var Xr="https://three.ws/api/concierge",lc=20;function Eh(s){let e=String(s||"").trim();if(!e||e==="[DONE]")return null;try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}function Rh(s){let e="";return{push(t){e+=t;let n;for(;(n=e.indexOf(`
`))!==-1;){let i=e.slice(0,n);e=e.slice(n+2);let r=i.split(`
`).filter(o=>o.startsWith("data:")).map(o=>o.slice(5).trim()).join(`
-`),a=xh(r);a&&s(a)}}}}async function rc(s){let e=s.endpoint||Hr,t=(s.history||[]).slice(-20).map(h=>({role:h.role,content:String(h.content).slice(0,4e3)})),n=await fetch(e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({message:String(s.message).slice(0,2e3),history:t,site:s.site||{},persona:s.persona||void 0,lang:s.lang||(typeof navigator<"u"?navigator.language:void 0)}),signal:s.signal});if(!n.ok){let h="";try{let d=await n.json();h=d?.error||d?.message||""}catch{}let u=new Error(h||`concierge endpoint returned HTTP ${n.status}`);throw u.status=n.status,u}let i="",r={},a=null,o=_h(h=>{h.type==="chunk"&&typeof h.text=="string"?(i+=h.text,s.onChunk?.(h.text)):h.type==="done"?r={provider:h.provider,model:h.model}:h.type==="error"&&(a=new Error(h.error||"concierge stream error"))}),c=n.body.getReader(),l=new TextDecoder;for(;;){let{done:h,value:u}=await c.read();if(h)break;o.push(l.decode(u,{stream:!0}))}if(o.push(l.decode()),a&&!i)throw a;return{text:i,...r}}var Ax={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Xi(s){return String(s??"").replace(/[&<>"']/g,e=>Ax[e])}function Tx(s){let e=String(s||"").trim();return/^(https?:\/\/|mailto:|\/)/i.test(e)?e:null}function vh(s){let e=Xi(s);return e=e.replace(/`([^`]+)`/g,"<code>$1</code>"),e=e.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),e=e.replace(/(^|[\s(])\*([^*\n]+)\*(?=[\s).,!?:;]|$)/g,"$1<em>$2</em>"),e=e.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(t,n,i)=>{let r=Tx(i);return r?`<a href="${Xi(r)}" target="_blank" rel="noopener noreferrer">${n}</a>`:n}),e}function Bs(s){let e=String(s??"").replace(/\r\n/g,`
+`),a=Eh(r);a&&s(a)}}}}async function hc(s){let e=s.endpoint||Xr,t=(s.history||[]).slice(-20).map(h=>({role:h.role,content:String(h.content).slice(0,4e3)})),n=await fetch(e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({message:String(s.message).slice(0,2e3),history:t,site:s.site||{},shopping:s.shopping||void 0,persona:s.persona||void 0,lang:s.lang||(typeof navigator<"u"?navigator.language:void 0)}),signal:s.signal});if(!n.ok){let h="";try{let d=await n.json();h=d?.error||d?.message||""}catch{}let u=new Error(h||`concierge endpoint returned HTTP ${n.status}`);throw u.status=n.status,u}let i="",r={},a=null,o=Rh(h=>{h.type==="chunk"&&typeof h.text=="string"?(i+=h.text,s.onChunk?.(h.text)):h.type==="done"?r={provider:h.provider,model:h.model}:h.type==="error"&&(a=new Error(h.error||"concierge stream error"))}),c=n.body.getReader(),l=new TextDecoder;for(;;){let{done:h,value:u}=await c.read();if(h)break;o.push(l.decode(u,{stream:!0}))}if(o.push(l.decode()),a&&!i)throw a;return{text:i,...r}}var zx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function en(s){return String(s??"").replace(/[&<>"']/g,e=>zx[e])}function Gx(s){let e=String(s||"").trim();return/^(https?:\/\/|mailto:|\/)/i.test(e)?e:null}function Ch(s){let e=en(s);return e=e.replace(/`([^`]+)`/g,"<code>$1</code>"),e=e.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),e=e.replace(/(^|[\s(])\*([^*\n]+)\*(?=[\s).,!?:;]|$)/g,"$1<em>$2</em>"),e=e.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(t,n,i)=>{let r=Gx(i);return r?`<a href="${en(r)}" target="_blank" rel="noopener noreferrer">${n}</a>`:n}),e}function Vs(s){let e=String(s??"").replace(/\r\n/g,`
`),t=[],n=e.split(`
-`),i=0;for(;i<n.length;){let r=n[i];if(/^```/.test(r)){let o=[];for(i++;i<n.length&&!/^```/.test(n[i]);)o.push(n[i++]);i++,t.push(`<pre><code>${Xi(o.join(`
-`))}</code></pre>`);continue}if(/^\s*[-*]\s+/.test(r)){let o=[];for(;i<n.length&&/^\s*[-*]\s+/.test(n[i]);)o.push(`<li>${vh(n[i].replace(/^\s*[-*]\s+/,""))}</li>`),i++;t.push(`<ul>${o.join("")}</ul>`);continue}if(/^\s*\d+[.)]\s+/.test(r)){let o=[];for(;i<n.length&&/^\s*\d+[.)]\s+/.test(n[i]);)o.push(`<li>${vh(n[i].replace(/^\s*\d+[.)]\s+/,""))}</li>`),i++;t.push(`<ol>${o.join("")}</ol>`);continue}if(!r.trim()){i++;continue}let a=[];for(;i<n.length&&n[i].trim()&&!/^```|^\s*[-*]\s+|^\s*\d+[.)]\s+/.test(n[i]);)a.push(n[i++]);t.push(`<p>${vh(a.join(" "))}</p>`)}return t.join("")}function Wr(s){return String(s??"").replace(/```[\s\S]*?```/g," code sample. ").replace(/`([^`]+)`/g,"$1").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/\*([^*\n]+)\*/g,"$1").replace(/\[([^\]]+)\]\([^)\s]+\)/g,"$1").replace(/^[\s]*[-*]\s+/gm,"").replace(/^[\s]*\d+[.)]\s+/gm,"").replace(/\s+/g," ").trim()}function Yd(){return typeof window>"u"?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function ac(){return!!Yd()}function oc(s={}){let e=Yd(),t=null,n="",i=null;function r(){if(t)try{t.stop()}catch{}}return{supported:!!e,get listening(){return!!t},start(){return!e||t?Promise.resolve(""):(n="",t=new e,t.lang=s.lang||(typeof navigator<"u"?navigator.language:"en-US"),t.interimResults=!0,t.continuous=!1,t.maxAlternatives=1,s.onState?.("listening"),new Promise(a=>{i=a,t.onresult=o=>{let c="";for(let l=o.resultIndex;l<o.results.length;l++){let h=o.results[l];h.isFinal?n+=h[0].transcript:c+=h[0].transcript}s.onInterim?.(n+c)},t.onerror=o=>{o?.error&&!/no-speech|aborted/i.test(o.error)&&s.onError?.(new Error("speech-recognition: "+o.error))},t.onend=()=>{t=null,s.onState?.("idle");let o=n.trim();i?.(o),i=null};try{t.start()}catch(o){t=null,s.onState?.("idle"),s.onError?.(o instanceof Error?o:new Error(String(o))),a(""),i=null}}))},stop(){r()},dispose(){r(),t=null}}}var yh=`
+`),i=0;for(;i<n.length;){let r=n[i];if(/^```/.test(r)){let o=[];for(i++;i<n.length&&!/^```/.test(n[i]);)o.push(n[i++]);i++,t.push(`<pre><code>${en(o.join(`
+`))}</code></pre>`);continue}if(/^\s*[-*]\s+/.test(r)){let o=[];for(;i<n.length&&/^\s*[-*]\s+/.test(n[i]);)o.push(`<li>${Ch(n[i].replace(/^\s*[-*]\s+/,""))}</li>`),i++;t.push(`<ul>${o.join("")}</ul>`);continue}if(/^\s*\d+[.)]\s+/.test(r)){let o=[];for(;i<n.length&&/^\s*\d+[.)]\s+/.test(n[i]);)o.push(`<li>${Ch(n[i].replace(/^\s*\d+[.)]\s+/,""))}</li>`),i++;t.push(`<ol>${o.join("")}</ol>`);continue}if(!r.trim()){i++;continue}let a=[];for(;i<n.length&&n[i].trim()&&!/^```|^\s*[-*]\s+|^\s*\d+[.)]\s+/.test(n[i]);)a.push(n[i++]);t.push(`<p>${Ch(a.join(" "))}</p>`)}return t.join("")}function jr(s){return String(s??"").replace(/```[\s\S]*?```/g," code sample. ").replace(/`([^`]+)`/g,"$1").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/\*([^*\n]+)\*/g,"$1").replace(/\[([^\]]+)\]\([^)\s]+\)/g,"$1").replace(/^[\s]*[-*]\s+/gm,"").replace(/^[\s]*\d+[.)]\s+/gm,"").replace(/\s+/g," ").trim()}function hf(){return typeof window>"u"?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function uc(){return!!hf()}function dc(s={}){let e=hf(),t=null,n="",i=null;function r(){if(t)try{t.stop()}catch{}}return{supported:!!e,get listening(){return!!t},start(){return!e||t?Promise.resolve(""):(n="",t=new e,t.lang=s.lang||(typeof navigator<"u"?navigator.language:"en-US"),t.interimResults=!0,t.continuous=!1,t.maxAlternatives=1,s.onState?.("listening"),new Promise(a=>{i=a,t.onresult=o=>{let c="";for(let l=o.resultIndex;l<o.results.length;l++){let h=o.results[l];h.isFinal?n+=h[0].transcript:c+=h[0].transcript}s.onInterim?.(n+c)},t.onerror=o=>{o?.error&&!/no-speech|aborted/i.test(o.error)&&s.onError?.(new Error("speech-recognition: "+o.error))},t.onend=()=>{t=null,s.onState?.("idle");let o=n.trim();i?.(o),i=null};try{t.start()}catch(o){t=null,s.onState?.("idle"),s.onError?.(o instanceof Error?o:new Error(String(o))),a(""),i=null}}))},stop(){r()},dispose(){r(),t=null}}}var Ph=`
.tc-root{
--tc-accent:#6366f1;
--tc-bg:#0b0c12;
@@ -4261,6 +4261,30 @@ void main() {
.tc-foot a{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;color:var(--tc-text-dim);text-decoration:none;transition:color .15s ease}
.tc-foot a:hover{color:var(--tc-accent)}
+/* Product recommendation cards (shopping mode) */
+.tc-products{display:flex;flex-direction:column;gap:8px;margin-top:10px}
+.tc-product{display:flex;gap:10px;padding:8px;border-radius:12px;background:var(--tc-surface);border:1px solid var(--tc-border);transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease}
+.tc-product:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--tc-accent) 45%,transparent);box-shadow:0 6px 18px rgba(0,0,0,.14)}
+.tc-product-media{position:relative;flex-shrink:0;width:66px;height:66px;border-radius:9px;overflow:hidden;background:var(--tc-surface-2);display:block}
+.tc-product-media img{width:100%;height:100%;object-fit:cover;display:block}
+.tc-product-noimg{position:absolute;inset:0;background:linear-gradient(135deg,var(--tc-surface-2),color-mix(in srgb,var(--tc-accent) 14%,var(--tc-surface-2)))}
+.tc-product-badge{position:absolute;top:4px;left:4px;font-size:9.5px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:#fff;background:#ef4444;padding:1px 5px;border-radius:5px}
+.tc-product-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
+.tc-product-title{font-size:13px;font-weight:600;line-height:1.25;color:var(--tc-text);text-decoration:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
+.tc-product-title:hover{color:var(--tc-accent)}
+.tc-product-meta{display:flex;align-items:center;gap:8px;margin-top:auto}
+.tc-product-price{font-size:13px;font-weight:650;color:var(--tc-text)}
+.tc-product-oos{font-size:10.5px;color:var(--tc-text-dim);text-transform:uppercase;letter-spacing:.03em}
+.tc-product-actions{display:flex;gap:6px;margin-top:4px}
+.tc-product-view,.tc-product-add{font-size:12px;font-weight:600;padding:5px 12px;border-radius:8px;text-decoration:none;transition:filter .15s ease,background .15s ease,transform .1s ease;white-space:nowrap}
+.tc-product-view{color:var(--tc-text);background:var(--tc-surface-2);border:1px solid var(--tc-border)}
+.tc-product-view:hover{border-color:color-mix(in srgb,var(--tc-accent) 55%,transparent);color:var(--tc-accent)}
+.tc-product-add{color:#fff;border:none;background:linear-gradient(135deg,color-mix(in srgb,var(--tc-accent) 88%,#fff 12%),color-mix(in srgb,var(--tc-accent) 80%,#000 20%))}
+.tc-product-add:hover{filter:brightness(1.08)}
+.tc-product-add:active{transform:scale(.95)}
+.tc-product-add:disabled{opacity:.7;cursor:default}
+.tc-product-add.is-added{background:#22c55e;filter:none}
+
/* Picker */
.tc-picker{position:absolute;inset:auto 0 0 0;top:0;z-index:5;background:color-mix(in srgb,var(--tc-bg) 88%,transparent);backdrop-filter:blur(8px);
display:flex;flex-direction:column;padding:14px;overflow-y:auto;opacity:0;pointer-events:none;transition:opacity .2s ease}
@@ -4284,8 +4308,11 @@ void main() {
.tc-panel,.tc-msg,.tc-teaser,.tc-launcher,.tc-stage{transition:none;animation:none}
.tc-pulse,.tc-typing i,.tc-caret{animation:none}
}
-`,Zd=!1;function cc(s=typeof document<"u"?document:null){if(Zd||!s)return;Zd=!0;let e=s.createElement("style");e.id="three-concierge-style",e.textContent=yh,s.head.appendChild(e)}var $d="tc:avatar",Qd="tc:muted",ef="tc:thread",tf="tc:teased",kn={spark:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456z"/></svg>',close:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg>',sound:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"/></svg>',soundOff:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M17.25 9.75L19.5 12m0 0l2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"/></svg>',swap:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"/></svg>',collapse:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 15.75l7.5-7.5 7.5 7.5"/></svg>',mic:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"/></svg>',send:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.2" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"/></svg>'};function lc(s,e){try{return window[s].getItem(e)}catch{return null}}function hc(s,e,t){try{window[s].setItem(e,t)}catch{}}function Mh(s){let e=[],t=s,n,i=/[^.!?\n]*[.!?\n]+["')\]]?\s*/g,r=0;for(;(n=i.exec(t))!==null;){let a=n[0].trim();a&&e.push(a),r=i.lastIndex}return{sentences:e,rest:t.slice(r)}}var an=class{constructor(e={}){this.config={endpoint:e.endpoint||Hr,assetBase:e.assetBase||zr,avatars:Array.isArray(e.avatars)&&e.avatars.length?qi.filter(n=>e.avatars.includes(n.id)):qi,name:e.name||"",siteName:e.siteName||"",greeting:e.greeting||"",suggestions:Array.isArray(e.suggestions)?e.suggestions.slice(0,4):[],knowledge:e.knowledge||"",persona:e.persona||"",accent:e.accent||"",position:e.position==="bottom-left"?"bottom-left":"bottom-right",theme:["dark","light"].includes(e.theme)?e.theme:"auto",open:!!e.open,muted:!!e.muted,picker:e.picker!==!1,teaser:e.teaser!==!1,zIndex:e.zIndex,lang:e.lang||""},this._custom=e.customAvatar?nc(e.customAvatar):null;let t=lc("localStorage",$d);this.avatar=this._custom||nf(this.config.avatars,e.avatar||t),this.open=!1,this.busy=!1,this.muted=this.config.muted||lc("localStorage",Qd)==="1",this.messages=this._restoreThread(),this._listeners=new Map,this._stage=null,this._narrator=null,this._mic=null,this._abort=null,this._destroyed=!1,!(typeof window>"u"||typeof document>"u")&&(this._build(),this.config.open?this.setOpen(!0):this.config.teaser&&this._scheduleTeaser(),this._emit("ready",{avatar:this.avatar.id}))}on(e,t){return this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(t),()=>this._listeners.get(e)?.delete(t)}_emit(e,t){for(let n of this._listeners.get(e)||[])try{n(t)}catch{}}_build(){cc();let e=document.createElement("div");e.className="tc-root",e.setAttribute("data-three-concierge",""),e.setAttribute("data-tc-pos",this.config.position),this.config.zIndex&&(e.style.zIndex=String(this.config.zIndex)),this.config.accent&&e.style.setProperty("--tc-accent",this.config.accent),this._applyTheme(e);let t=this.config.name||this.avatar.name;e.innerHTML=`
- <section class="tc-panel" role="dialog" aria-modal="false" aria-label="${Xi(t)}, site assistant" hidden>
+`,uf=!1;function fc(s=typeof document<"u"?document:null){if(uf||!s)return;uf=!0;let e=s.createElement("style");e.id="three-concierge-style",e.textContent=Ph,s.head.appendChild(e)}var pc=4;var Vx={shipping:"shipping-policy",returns:"refund-policy",privacy:"privacy-policy",terms:"terms-of-service"},Hx=new Set(["the","a","an","and","or","of","for","to","in","on","is","are","do","does","i","you","me","my","we","it","this","that","with","can","have","get","want","need","show","find","looking","look","any","some","what","which","whats","about","please","would","like","buy","purchase","shop","product","products","item","items","store"]);function Ki(s){let e=String(s||"").trim();if(!e)return"";try{return new URL(e.includes("://")?e:`https://${e}`).hostname.toLowerCase()}catch{return""}}function Yi(s){let e=Ki(s);return e?`https://${e}`:""}function mc(s=typeof window<"u"?window:void 0){let e=s?.Shopify;if(!e)return null;let t=Ki(e.shop||s.location?.hostname);return t?{shop:t,currency:e.currency?.active||"USD"}:null}function ff(s,e=220){let t=String(s||"").replace(/<[^>]+>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#39;|&rsquo;|&lsquo;/g,"'").replace(/&quot;|&ldquo;|&rdquo;/g,'"').replace(/\s+/g," ").trim();return e&&t.length>e?t.slice(0,e-1).trimEnd()+"\u2026":t}function Ih(s){let e=Number.parseFloat(s);return Number.isFinite(e)?e:0}function yn(s,e="USD"){let t=typeof s=="number"?s:Ih(s);try{return new Intl.NumberFormat(void 0,{style:"currency",currency:e}).format(t)}catch{return`${t.toFixed(2)} ${e}`}}function Lh(s,e,t="USD"){if(!s||!s.handle)return null;let n=Array.isArray(s.variants)?s.variants:[],i=n.map(f=>Ih(f.price)).filter(f=>f>0),r=i.length?Math.min(...i):0,a=i.length?Math.max(...i):0,o=n.some(f=>f.available!==!1),c=n.find(f=>f.available!==!1)||n[0],h=n.map(f=>Ih(f.compare_at_price)).filter(f=>f>0).some(f=>f>r),u=s.image?.src||Array.isArray(s.images)&&s.images[0]?.src||"",d=Array.isArray(s.tags)?s.tags.map(f=>String(f).trim()).filter(Boolean):String(s.tags||"").split(",").map(f=>f.trim()).filter(Boolean);return{id:s.id,handle:s.handle,title:String(s.title||"").trim(),url:`${e}/products/${s.handle}`,type:String(s.product_type||"").trim(),vendor:String(s.vendor||"").trim(),tags:d,priceMin:r,priceMax:a,currency:t,available:o,onSale:h,image:u?String(u).replace(/^http:/,"https:"):"",variantId:c?.id||n[0]?.id||null,summary:ff(s.body_html)}}async function df(s,{fetchImpl:e,signal:t}){let n=await e(s,{signal:t,headers:{accept:"application/json"},credentials:"omit"});if(!n.ok)throw new Error(`GET ${s} \u2192 HTTP ${n.status}`);return n.json()}async function gc({shop:s,fetchImpl:e=typeof fetch<"u"?fetch:void 0,signal:t,currency:n="USD",limit:i=250,maxProducts:r=500}={}){let a=Ki(s),o=Yi(a);if(!o)throw new Error("fetchCatalog: a Shopify shop domain is required");if(!e)throw new Error("fetchCatalog: no fetch implementation available");let c=[];for(let h=1;c.length<r;h++){let u;try{let d=await df(`${o}/products.json?limit=${i}&page=${h}`,{fetchImpl:e,signal:t});u=Array.isArray(d?.products)?d.products:[]}catch(d){if(h===1)throw d;break}if(!u.length)break;for(let d of u){let f=Lh(d,o,n);if(f&&c.push(f),c.length>=r)break}if(u.length<i)break}let l=[];try{let h=await df(`${o}/collections.json?limit=250`,{fetchImpl:e,signal:t});l=(Array.isArray(h?.collections)?h.collections:[]).filter(u=>u?.handle&&u?.title).map(u=>({title:String(u.title).trim(),handle:u.handle,url:`${o}/collections/${u.handle}`}))}catch{}return{store:a,origin:o,currency:n,products:c,collections:l}}async function bc({shop:s,fetchImpl:e=typeof fetch<"u"?fetch:void 0,signal:t}={}){let n=Yi(s);if(!n||!e)return{};let i={};return await Promise.all(Object.entries(Vx).map(async([r,a])=>{try{let o=await e(`${n}/policies/${a}`,{signal:t,credentials:"omit"});if(!o.ok)return;let c=await o.text(),l=ff(c,1400);l&&l.length>40&&(i[r]=l)}catch{}})),i}function Wx(s){return String(s||"").toLowerCase().replace(/[^a-z0-9\s]/g," ").split(/\s+/).filter(e=>e.length>=2&&!Hx.has(e))}function Dh(s){let e=String(s||"").toLowerCase(),t=null,n=e.match(/(?:under|below|less than|up to|max)\s*\$?\s*(\d+(?:\.\d+)?)/);n&&(t=Number.parseFloat(n[1]));let i=/\b(cheap|cheapest|budget|affordable|inexpensive|lowest)\b/.test(e),r=/\b(premium|luxury|best|top|high[- ]?end|nicest)\b/.test(e),a=/\b(sale|discount|deal|deals|clearance|reduced)\b/.test(e);return{maxPrice:t,sort:i?"price-asc":r?"price-desc":null,onSale:a}}function xc(s,e,t=4){let n=Array.isArray(s)?s:[],i=Wx(e),r=Dh(e),a=String(e||"").toLowerCase().trim(),o=r.maxPrice?n.filter(h=>h.priceMin<=r.maxPrice):n,l=o.map(h=>{let u=h.title.toLowerCase(),d=h.type.toLowerCase(),f=h.vendor.toLowerCase(),g=h.tags.join(" ").toLowerCase(),_=h.summary.toLowerCase(),m=0;for(let p of i)u.includes(p)?m+=6:d.includes(p)?m+=4:g.includes(p)?m+=3:f.includes(p)?m+=2:_.includes(p)&&(m+=1);return a.length>=4&&u.includes(a)&&(m+=8),r.onSale&&h.onSale&&(m+=4),r.onSale&&!h.onSale&&(m-=2),h.available||(m-=3),{p:h,score:m}}).filter(h=>h.score>0);return!l.length&&(r.sort||r.onSale||r.maxPrice)&&(l=o.map(h=>({p:h,score:h.available?1:0})),r.onSale&&(l=l.filter(h=>h.p.onSale))),l.sort((h,u)=>r.sort==="price-asc"?h.p.priceMin-u.p.priceMin||u.score-h.score:r.sort==="price-desc"?u.p.priceMin-h.p.priceMin||u.score-h.score:u.score-h.score||h.p.priceMin-u.p.priceMin),l.slice(0,t).map(h=>h.p)}function Fh(s){let e=s?.products||[];if(!e.length)return"";let t=[...new Set(e.map(c=>c.type).filter(Boolean))].slice(0,12),n=e.map(c=>c.priceMin).filter(c=>c>0),i=n.length?Math.min(...n):0,r=n.length?Math.max(...n):0,a=s.currency||"USD",o=[`${e.length} products`];return t.length&&o.push(`categories: ${t.join(", ")}`),n.length&&o.push(`prices from ${yn(i,a)} to ${yn(r,a)}`),o.join(" \xB7 ").slice(0,500)}function qx(s){let e=s.priceMax>s.priceMin?`${yn(s.priceMin,s.currency)}\u2013${yn(s.priceMax,s.currency)}`:yn(s.priceMin,s.currency),t=[`- ${s.title} (${e}${s.available?"":", sold out"}${s.onSale?", on sale":""})`];return s.type&&t.push(`type: ${s.type}`),s.summary&&t.push(s.summary),t.push(`link: ${s.url}`),t.join(" \xB7 ")}function _c(s,e,t={},n=""){if(!s)return null;let i=s.currency||"USD",r=(s.collections||[]).slice(0,24).map(h=>h.title),a=n.toLowerCase(),o=/ship|deliver|postage|arrive|dispatch/.test(a),c=/return|refund|exchange|money back|warranty/.test(a),l=[];return t.shipping&&(o||!c)&&l.push(`Shipping policy: ${t.shipping}`),t.returns&&(c||!o)&&l.push(`Returns policy: ${t.returns}`),!l.length&&t.shipping&&l.push(`Shipping policy: ${t.shipping}`),{store:s.store||"",currency:i,summary:Fh(s),collections:r,policies:l.join(`
+
+`).slice(0,1400*2),products:(e||[]).map(qx).join(`
+`)}}var pf="tc:avatar",mf="tc:muted",gf="tc:thread",bf="tc:teased",xf="tc:shop",Xx=1800*1e3,zn={spark:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456z"/></svg>',close:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg>',sound:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"/></svg>',soundOff:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M17.25 9.75L19.5 12m0 0l2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"/></svg>',swap:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"/></svg>',collapse:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 15.75l7.5-7.5 7.5 7.5"/></svg>',mic:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"/></svg>',send:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.2" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"/></svg>'};function Kr(s,e){try{return window[s].getItem(e)}catch{return null}}function Yr(s,e,t){try{window[s].setItem(e,t)}catch{}}function Nh(s){let e=[],t=s,n,i=/[^.!?\n]*[.!?\n]+["')\]]?\s*/g,r=0;for(;(n=i.exec(t))!==null;){let a=n[0].trim();a&&e.push(a),r=i.lastIndex}return{sentences:e,rest:t.slice(r)}}var on=class{constructor(e={}){this.config={endpoint:e.endpoint||Xr,assetBase:e.assetBase||Hr,avatars:Array.isArray(e.avatars)&&e.avatars.length?ji.filter(i=>e.avatars.includes(i.id)):ji,name:e.name||"",siteName:e.siteName||"",greeting:e.greeting||"",suggestions:Array.isArray(e.suggestions)?e.suggestions.slice(0,4):[],knowledge:e.knowledge||"",persona:e.persona||"",accent:e.accent||"",position:e.position==="bottom-left"?"bottom-left":"bottom-right",theme:["dark","light"].includes(e.theme)?e.theme:"auto",open:!!e.open,muted:!!e.muted,picker:e.picker!==!1,teaser:e.teaser!==!1,zIndex:e.zIndex,lang:e.lang||"",shop:Ki(e.shop),shopping:e.shopping,currency:e.currency||"",maxProducts:Number.isFinite(e.maxProducts)&&e.maxProducts>0?Math.min(e.maxProducts,8):4};let t=mc();!this.config.shop&&t&&(this.config.shop=t.shop),!this.config.currency&&t&&(this.config.currency=t.currency),this.config.shopping=e.shopping===!1?!1:!!(e.shopping||this.config.shop),this._onStore=!!(t&&this.config.shop&&t.shop===this.config.shop),this._catalog=null,this._policies={},this._catalogPromise=null,this._custom=e.customAvatar?oc(e.customAvatar):null;let n=Kr("localStorage",pf);this.avatar=this._custom||_f(this.config.avatars,e.avatar||n),this.open=!1,this.busy=!1,this.muted=this.config.muted||Kr("localStorage",mf)==="1",this.messages=this._restoreThread(),this._listeners=new Map,this._stage=null,this._narrator=null,this._mic=null,this._abort=null,this._destroyed=!1,!(typeof window>"u"||typeof document>"u")&&(this._build(),this.config.open?this.setOpen(!0):this.config.teaser&&this._scheduleTeaser(),this._emit("ready",{avatar:this.avatar.id}))}on(e,t){return this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(t),()=>this._listeners.get(e)?.delete(t)}_emit(e,t){for(let n of this._listeners.get(e)||[])try{n(t)}catch{}}_build(){fc();let e=document.createElement("div");e.className="tc-root",e.setAttribute("data-three-concierge",""),e.setAttribute("data-tc-pos",this.config.position),this.config.zIndex&&(e.style.zIndex=String(this.config.zIndex)),this.config.accent&&e.style.setProperty("--tc-accent",this.config.accent),this._applyTheme(e);let t=this.config.name||this.avatar.name;e.innerHTML=`
+ <section class="tc-panel" role="dialog" aria-modal="false" aria-label="${en(t)}, site assistant" hidden>
<header class="tc-head">
<div class="tc-head-id">
<span class="tc-head-dot" aria-hidden="true"></span>
@@ -4295,10 +4322,10 @@ void main() {
</div>
</div>
<div class="tc-head-actions">
- <button type="button" class="tc-icon-btn tc-btn-mute" aria-label="Toggle voice" aria-pressed="false">${kn.sound}</button>
- ${this.config.picker&&!this._custom?`<button type="button" class="tc-icon-btn tc-btn-swap" aria-label="Choose a different avatar">${kn.swap}</button>`:""}
- <button type="button" class="tc-icon-btn tc-btn-compact" aria-label="Toggle avatar view" aria-pressed="false">${kn.collapse}</button>
- <button type="button" class="tc-icon-btn tc-btn-close" aria-label="Close assistant">${kn.close}</button>
+ <button type="button" class="tc-icon-btn tc-btn-mute" aria-label="Toggle voice" aria-pressed="false">${zn.sound}</button>
+ ${this.config.picker&&!this._custom?`<button type="button" class="tc-icon-btn tc-btn-swap" aria-label="Choose a different avatar">${zn.swap}</button>`:""}
+ <button type="button" class="tc-icon-btn tc-btn-compact" aria-label="Toggle avatar view" aria-pressed="false">${zn.collapse}</button>
+ <button type="button" class="tc-icon-btn tc-btn-close" aria-label="Close assistant">${zn.close}</button>
</div>
</header>
<div class="tc-stage is-loading" aria-hidden="true">
@@ -4310,8 +4337,8 @@ void main() {
<div class="tc-thread" aria-live="polite"></div>
<div class="tc-input">
<textarea rows="1" maxlength="2000" placeholder="Ask anything\u2026" aria-label="Your question"></textarea>
- ${ac()?`<button type="button" class="tc-mic" aria-label="Ask by voice" aria-pressed="false">${kn.mic}</button>`:""}
- <button type="button" class="tc-send" aria-label="Send" disabled>${kn.send}</button>
+ ${uc()?`<button type="button" class="tc-mic" aria-label="Ask by voice" aria-pressed="false">${zn.mic}</button>`:""}
+ <button type="button" class="tc-send" aria-label="Send" disabled>${zn.send}</button>
</div>
<footer class="tc-foot"><a href="https://three.ws/concierge" target="_blank" rel="noopener noreferrer">powered by three.ws</a></footer>
<div class="tc-picker" role="listbox" aria-label="Choose your concierge" hidden>
@@ -4321,9 +4348,21 @@ void main() {
</section>
<button type="button" class="tc-launcher" aria-label="Open site assistant" aria-expanded="false">
<span class="tc-pulse" aria-hidden="true"></span>
- ${kn.spark}
+ ${zn.spark}
</button>
- `,document.body.appendChild(e),this.root=e,this.$={panel:e.querySelector(".tc-panel"),launcher:e.querySelector(".tc-launcher"),headName:e.querySelector(".tc-head-name"),mute:e.querySelector(".tc-btn-mute"),swap:e.querySelector(".tc-btn-swap"),compact:e.querySelector(".tc-btn-compact"),close:e.querySelector(".tc-btn-close"),stage:e.querySelector(".tc-stage"),stageCanvas:e.querySelector(".tc-stage-canvas"),caption:e.querySelector(".tc-stage-caption"),thread:e.querySelector(".tc-thread"),textarea:e.querySelector("textarea"),mic:e.querySelector(".tc-mic"),send:e.querySelector(".tc-send"),picker:e.querySelector(".tc-picker"),pickerGrid:e.querySelector(".tc-picker-grid")},this.$.headName.textContent=t,this._syncMuteButton(),this._renderThread(),this.$.launcher.addEventListener("click",()=>this.toggle()),this.$.close.addEventListener("click",()=>this.setOpen(!1)),this.$.mute.addEventListener("click",()=>this.setMuted(!this.muted)),this.$.swap?.addEventListener("click",()=>this.togglePicker()),this.$.compact.addEventListener("click",()=>this._toggleCompact()),this.$.send.addEventListener("click",()=>this._submit()),this.$.textarea.addEventListener("input",()=>this._syncInput()),this.$.textarea.addEventListener("keydown",n=>{n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),this._submit())}),this._onKeydown=n=>{n.key==="Escape"&&this.open&&(this.$.picker.hidden?this.setOpen(!1):this.togglePicker(!1))},e.addEventListener("keydown",this._onKeydown),this.$.mic&&(this._mic=oc({lang:this.config.lang||void 0,onInterim:n=>{this.$.textarea.value=n,this._syncInput()},onState:n=>{this.$.mic.classList.toggle("is-live",n==="listening"),this.$.mic.setAttribute("aria-pressed",n==="listening"?"true":"false")},onError:n=>this._emit("error",n)}),this.$.mic.addEventListener("click",()=>this._toggleMic())),this.config.theme==="auto"&&(window.matchMedia&&(this._mq=window.matchMedia("(prefers-color-scheme: dark)"),this._onScheme=()=>this._applyTheme(e),this._mq.addEventListener?.("change",this._onScheme)),this._themeObs=new MutationObserver(()=>this._applyTheme(e)),this._themeObs.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}))}_applyTheme(e){let t=this.config.theme;if(t==="auto"){let n=document.documentElement.getAttribute("data-theme");n==="dark"||n==="light"?t=n:t=window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}e.setAttribute("data-tc-theme",t)}setOpen(e){if(!(this._destroyed||e===this.open)){if(this.open=e,this.root.classList.toggle("is-open",e),this.$.launcher.setAttribute("aria-expanded",String(e)),this.$.launcher.setAttribute("aria-label",e?"Close site assistant":"Open site assistant"),e)this._killTeaser(),this.$.panel.hidden=!1,requestAnimationFrame(()=>this.root.classList.add("is-open")),this._ensureStage(),this.$.textarea.focus({preventScroll:!0}),this._scrollThread(!1);else{this._narrator?.cancel(),this._mic?.stop();let t=this.$.panel;setTimeout(()=>{this.open||(t.hidden=!0)},240),this.$.launcher.focus({preventScroll:!0})}this._emit(e?"open":"close",{})}}toggle(){this.setOpen(!this.open)}_toggleCompact(){let e=this.root.classList.toggle("is-compact");this.$.compact.setAttribute("aria-pressed",String(e))}_scheduleTeaser(){lc("sessionStorage",tf)==="1"||this.messages.length||(this._teaserTimer=setTimeout(()=>{if(this.open||this._destroyed)return;hc("sessionStorage",tf,"1");let e=document.createElement("div");e.className="tc-teaser",e.setAttribute("role","status"),e.innerHTML=`<span></span><button type="button" class="tc-teaser-close" aria-label="Dismiss">${kn.close}</button>`,e.querySelector("span").textContent=this._greetingText(),this.root.insertBefore(e,this.$.launcher),requestAnimationFrame(()=>e.classList.add("is-in")),e.addEventListener("click",t=>{t.target.closest(".tc-teaser-close")?e.remove():(e.remove(),this.setOpen(!0))}),this._teaser=e,this._teaserHide=setTimeout(()=>this._killTeaser(),12e3)},6e3))}_killTeaser(){clearTimeout(this._teaserTimer),clearTimeout(this._teaserHide),this._teaser?.remove(),this._teaser=null}_greetingText(){if(this.config.greeting)return this.config.greeting;let e=this.config.siteName||document.querySelector('meta[property="og:site_name"]')?.content||"";return e?`Hi! Ask me anything about ${e}.`:"Hi! Ask me anything about this site."}async _ensureStage(){if(!(this._stage||this._stageLoading)){this._stageLoading=!0;try{this._stage=new Ns(this.$.stageCanvas,{background:"transparent"}),this._narrator=new Os(this._stage,{muted:this.muted,onCaption:e=>this._setCaption(e),onError:()=>{}}),this._narrator.setAgent(this.avatar),await this._stage.load(Vr(this.avatar,this.config.assetBase),{framing:this.avatar.framing||"bust"}),this.$.stage.classList.remove("is-loading")}catch(e){this.root.classList.add("is-compact"),this.$.compact.style.display="none",this._emit("error",e instanceof Error?e:new Error(String(e)))}finally{this._stageLoading=!1}}}_setCaption(e){let t=this.$.caption;t&&(e?(t.textContent=e,t.classList.add("is-in")):t.classList.remove("is-in"))}async setAvatar(e){let t=nf(this.config.avatars,e);if(!(!t||t.id===this.avatar.id)&&(this.avatar=t,hc("localStorage",$d,t.id),this.config.name||(this.$.headName.textContent=t.name),this._narrator?.cancel(),this._narrator?.setAgent(t),this._renderPicker(),this._emit("agentchange",{avatar:t.id}),this._stage)){this.$.stage.classList.add("is-loading");try{await this._stage.load(Vr(t,this.config.assetBase),{framing:t.framing||"bust"})}catch(n){this._emit("error",n instanceof Error?n:new Error(String(n)))}this.$.stage.classList.remove("is-loading")}}togglePicker(e){(e!==void 0?e:this.$.picker.hidden)?(this._renderPicker(),this.$.picker.hidden=!1,requestAnimationFrame(()=>this.$.picker.classList.add("is-in"))):(this.$.picker.classList.remove("is-in"),setTimeout(()=>{this.$.picker.hidden=!0},200))}_renderPicker(){let e=this.$.pickerGrid;if(e){e.textContent="";for(let t of this.config.avatars){let n=document.createElement("button");n.type="button",n.className="tc-picker-card"+(t.id===this.avatar.id?" is-current":""),n.setAttribute("role","option"),n.setAttribute("aria-selected",String(t.id===this.avatar.id)),n.innerHTML='<span class="tc-picker-name"></span><span class="tc-picker-tag"></span>',n.querySelector(".tc-picker-name").textContent=t.name,n.querySelector(".tc-picker-tag").textContent=t.tagline,n.addEventListener("click",()=>{this.setAvatar(t.id),this.togglePicker(!1)}),e.appendChild(n)}}}setMuted(e){this.muted=!!e,hc("localStorage",Qd,e?"1":"0"),this._narrator?.setMuted(this.muted),this._syncMuteButton()}_syncMuteButton(){let e=this.$?.mute;e&&(e.innerHTML=this.muted?kn.soundOff:kn.sound,e.setAttribute("aria-pressed",String(this.muted)),e.setAttribute("aria-label",this.muted?"Unmute voice":"Mute voice"))}async _toggleMic(){if(!this._mic)return;if(this._mic.listening){this._mic.stop();return}this._narrator?.cancel();let e=await this._mic.start();e&&(this.$.textarea.value=e,this._syncInput(),this._submit())}_restoreThread(){try{let e=lc("sessionStorage",ef),t=e?JSON.parse(e):[];return Array.isArray(t)?t.filter(n=>n&&(n.role==="user"||n.role==="assistant")&&typeof n.content=="string"):[]}catch{return[]}}_persistThread(){hc("sessionStorage",ef,JSON.stringify(this.messages.slice(-40)))}_renderThread(){let e=this.$.thread;if(e.textContent="",!this.messages.length){let t=document.createElement("div");t.className="tc-empty";let n=document.createElement("p");n.className="tc-empty-title",n.textContent=this._greetingText(),t.appendChild(n);let i=this.config.suggestions.length?this.config.suggestions:wx(this.config.siteName);if(i.length){let r=document.createElement("div");r.className="tc-chips";for(let a of i.slice(0,4)){let o=document.createElement("button");o.type="button",o.className="tc-chip",o.textContent=a,o.addEventListener("click",()=>this.ask(a)),r.appendChild(o)}t.appendChild(r)}e.appendChild(t);return}for(let t of this.messages)e.appendChild(this._bubble(t.role,t.content));this._scrollThread(!1)}_bubble(e,t,{error:n=!1}={}){let i=document.createElement("div");return i.className=`tc-msg is-${e==="user"?"user":"bot"}${n?" is-error":""}`,e==="user"?i.textContent=t:i.innerHTML=Bs(t),i}_scrollThread(e=!0){let t=this.$.thread;t.scrollTo({top:t.scrollHeight,behavior:e&&!matchMedia("(prefers-reduced-motion: reduce)").matches?"smooth":"auto"})}_syncInput(){let e=this.$.textarea;e.style.height="auto",e.style.height=Math.min(e.scrollHeight,110)+"px",this.$.send.disabled=this.busy||!e.value.trim()}_submit(){let e=this.$.textarea.value.trim();!e||this.busy||(this.$.textarea.value="",this._syncInput(),this.ask(e))}async ask(e){let t=String(e||"").trim();if(!t||this.busy||this._destroyed)return"";this.setOpen(!0),this._narrator?.cancel(),this.messages.length||(this.$.thread.textContent=""),this.messages.push({role:"user",content:t}),this.$.thread.appendChild(this._bubble("user",t)),this._persistThread(),this._emit("message",{role:"user",content:t}),this._scrollThread(),this.busy=!0,this.$.send.disabled=!0;let n=document.createElement("div");n.className="tc-typing",n.setAttribute("aria-label","Assistant is thinking"),n.innerHTML="<i></i><i></i><i></i>",this.$.thread.appendChild(n),this._scrollThread();let i=document.createElement("div");i.className="tc-msg is-bot";let r="",a="",o=!1;this._abort=new AbortController;let c="";try{c=(await rc({endpoint:this.config.endpoint,message:t,history:this.messages.slice(0,-1),site:ic(document,{knowledge:this.config.knowledge,siteName:this.config.siteName}),persona:this.config.persona||void 0,lang:this.config.lang||void 0,signal:this._abort.signal,onChunk:u=>{o||(o=!0,n.remove(),this.$.thread.appendChild(i)),r+=u,i.innerHTML=Bs(r)+'<span class="tc-caret" aria-hidden="true"></span>',this._scrollThread(),a+=u;let{sentences:d,rest:f}=Mh(a);a=f;for(let g of d){let _=Wr(g);_&&this._narrator?.speak(_)}}})).text.trim();let h=Wr(a);h&&this._narrator?.speak(h),n.remove(),c?(o||this.$.thread.appendChild(i),i.innerHTML=Bs(c),this.messages.push({role:"assistant",content:c}),this._persistThread(),this._emit("message",{role:"assistant",content:c})):(i.remove(),this._renderErrorBubble(t,"I could not come up with an answer just now."))}catch(l){if(n.remove(),i.remove(),l?.name!=="AbortError"){let h=l?.status===429?"I am getting a lot of questions right now, give me a few seconds and try again.":"Something went wrong reaching my brain. Check your connection and try again.";this._renderErrorBubble(t,h),this._emit("error",l instanceof Error?l:new Error(String(l)))}}finally{this.busy=!1,this._abort=null,this._syncInput(),this._scrollThread(),this.$.textarea.focus({preventScroll:!0})}return c}_renderErrorBubble(e,t){let n=this._bubble("assistant",t,{error:!0});this.$.thread.appendChild(n);let i=document.createElement("button");i.type="button",i.className="tc-retry",i.textContent="Try again",i.addEventListener("click",()=>{if(i.remove(),n.remove(),this.messages[this.messages.length-1]?.role==="user"){this.messages.pop(),this._persistThread();let r=this.$.thread.querySelectorAll(".tc-msg.is-user");r[r.length-1]?.remove()}this.ask(e)}),this.$.thread.appendChild(i)}reset(){this._abort?.abort(),this._narrator?.cancel(),this.messages=[],this._persistThread(),this._renderThread()}dispose(){this._destroyed||(this._destroyed=!0,this._abort?.abort(),this._killTeaser(),this._mq?.removeEventListener?.("change",this._onScheme),this._themeObs?.disconnect(),this._mic?.dispose(),this._narrator?.dispose(),this._stage?.dispose(),this.root?.remove(),this._listeners.clear())}};function nf(s,e){return s.find(t=>t.id===e)||s.find(t=>t.id===ks)||s[0]||Gr(e)}function wx(s){return[`What is ${s||"this site"}?`,"How do I get started?","What does it cost?"]}var uc=(s,e)=>s.hasAttribute(e),qr=class extends HTMLElement{connectedCallback(){if(!this._widget){this.style.display="none",this._widget=new an({endpoint:this.getAttribute("endpoint")||void 0,avatar:this.getAttribute("avatar")||void 0,avatars:this.getAttribute("avatars")?.split(",").map(e=>e.trim()).filter(Boolean),customAvatar:this.getAttribute("custom-avatar")||void 0,assetBase:this.getAttribute("asset-base")||void 0,name:this.getAttribute("name")||void 0,siteName:this.getAttribute("site-name")||void 0,greeting:this.getAttribute("greeting")||void 0,suggestions:this.getAttribute("suggestions")?.split("|").map(e=>e.trim()).filter(Boolean),knowledge:this.getAttribute("knowledge")||void 0,persona:this.getAttribute("persona")||void 0,accent:this.getAttribute("accent")||void 0,position:this.getAttribute("position")||void 0,theme:this.getAttribute("theme")||void 0,lang:this.getAttribute("lang")||void 0,open:uc(this,"open"),muted:uc(this,"muted"),picker:!uc(this,"no-picker"),teaser:!uc(this,"no-teaser"),zIndex:this.getAttribute("z-index")?Number(this.getAttribute("z-index")):void 0});for(let e of["ready","open","close","message","agentchange","error"])this._widget.on(e,t=>{this.dispatchEvent(new CustomEvent(`three-concierge:${e}`,{detail:t,bubbles:!0,composed:!0}))})}}disconnectedCallback(){this._widget?.dispose(),this._widget=null}ask(e){return this._widget?.ask(e)}open(){this._widget?.setOpen(!0)}close(){this._widget?.setOpen(!1)}reset(){this._widget?.reset()}setAvatar(e){return this._widget?.setAvatar(e)}setMuted(e){this._widget?.setMuted(e)}get controller(){return this._widget}};function dc(s="three-concierge"){return typeof customElements<"u"&&!customElements.get(s)&&customElements.define(s,qr),s}var Ex="0.1.0";typeof window<"u"&&dc();function Rx(s){return new an(s)}function sf(){if(typeof document>"u"||window.__threeWsConcierge)return;let s=document.currentScript||document.querySelector("script[data-concierge]");if(!s||!s.hasAttribute("data-concierge"))return;let e=s.dataset;window.__threeWsConcierge=new an({endpoint:e.endpoint||void 0,avatar:e.avatar||void 0,avatars:e.avatars?.split(",").map(t=>t.trim()).filter(Boolean),customAvatar:e.customAvatar||void 0,assetBase:e.assetBase||void 0,name:e.name||void 0,siteName:e.siteName||void 0,greeting:e.greeting||void 0,suggestions:e.suggestions?.split("|").map(t=>t.trim()).filter(Boolean),knowledge:e.knowledge||void 0,persona:e.persona||void 0,accent:e.accent||void 0,position:e.position||void 0,theme:e.theme||void 0,lang:e.lang||void 0,open:"open"in e,muted:"muted"in e,picker:!("noPicker"in e),teaser:!("noTeaser"in e),zIndex:e.zIndex?Number(e.zIndex):void 0})}typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",sf,{once:!0}):sf());var Cx=an;typeof window<"u"&&(window.ThreeWsConcierge=Sh,window.Concierge=window.Concierge||an);
+ `,document.body.appendChild(e),this.root=e,this.$={panel:e.querySelector(".tc-panel"),launcher:e.querySelector(".tc-launcher"),headName:e.querySelector(".tc-head-name"),mute:e.querySelector(".tc-btn-mute"),swap:e.querySelector(".tc-btn-swap"),compact:e.querySelector(".tc-btn-compact"),close:e.querySelector(".tc-btn-close"),stage:e.querySelector(".tc-stage"),stageCanvas:e.querySelector(".tc-stage-canvas"),caption:e.querySelector(".tc-stage-caption"),thread:e.querySelector(".tc-thread"),textarea:e.querySelector("textarea"),mic:e.querySelector(".tc-mic"),send:e.querySelector(".tc-send"),picker:e.querySelector(".tc-picker"),pickerGrid:e.querySelector(".tc-picker-grid")},this.$.headName.textContent=t,this._syncMuteButton(),this._renderThread(),this.$.launcher.addEventListener("click",()=>this.toggle()),this.$.close.addEventListener("click",()=>this.setOpen(!1)),this.$.mute.addEventListener("click",()=>this.setMuted(!this.muted)),this.$.swap?.addEventListener("click",()=>this.togglePicker()),this.$.compact.addEventListener("click",()=>this._toggleCompact()),this.$.send.addEventListener("click",()=>this._submit()),this.$.textarea.addEventListener("input",()=>this._syncInput()),this.$.textarea.addEventListener("keydown",n=>{n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),this._submit())}),this._onKeydown=n=>{n.key==="Escape"&&this.open&&(this.$.picker.hidden?this.setOpen(!1):this.togglePicker(!1))},e.addEventListener("keydown",this._onKeydown),this.$.mic&&(this._mic=dc({lang:this.config.lang||void 0,onInterim:n=>{this.$.textarea.value=n,this._syncInput()},onState:n=>{this.$.mic.classList.toggle("is-live",n==="listening"),this.$.mic.setAttribute("aria-pressed",n==="listening"?"true":"false")},onError:n=>this._emit("error",n)}),this.$.mic.addEventListener("click",()=>this._toggleMic())),this.config.theme==="auto"&&(window.matchMedia&&(this._mq=window.matchMedia("(prefers-color-scheme: dark)"),this._onScheme=()=>this._applyTheme(e),this._mq.addEventListener?.("change",this._onScheme)),this._themeObs=new MutationObserver(()=>this._applyTheme(e)),this._themeObs.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}))}_applyTheme(e){let t=this.config.theme;if(t==="auto"){let n=document.documentElement.getAttribute("data-theme");n==="dark"||n==="light"?t=n:t=window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}e.setAttribute("data-tc-theme",t)}setOpen(e){if(!(this._destroyed||e===this.open)){if(this.open=e,this.root.classList.toggle("is-open",e),this.$.launcher.setAttribute("aria-expanded",String(e)),this.$.launcher.setAttribute("aria-label",e?"Close site assistant":"Open site assistant"),e)this._killTeaser(),this.$.panel.hidden=!1,requestAnimationFrame(()=>this.root.classList.add("is-open")),this._ensureStage(),this._ensureCatalog(),this.$.textarea.focus({preventScroll:!0}),this._scrollThread(!1);else{this._narrator?.cancel(),this._mic?.stop();let t=this.$.panel;setTimeout(()=>{this.open||(t.hidden=!0)},240),this.$.launcher.focus({preventScroll:!0})}this._emit(e?"open":"close",{})}}toggle(){this.setOpen(!this.open)}_toggleCompact(){let e=this.root.classList.toggle("is-compact");this.$.compact.setAttribute("aria-pressed",String(e))}_scheduleTeaser(){Kr("sessionStorage",bf)==="1"||this.messages.length||(this._teaserTimer=setTimeout(()=>{if(this.open||this._destroyed)return;Yr("sessionStorage",bf,"1");let e=document.createElement("div");e.className="tc-teaser",e.setAttribute("role","status"),e.innerHTML=`<span></span><button type="button" class="tc-teaser-close" aria-label="Dismiss">${zn.close}</button>`,e.querySelector("span").textContent=this._greetingText(),this.root.insertBefore(e,this.$.launcher),requestAnimationFrame(()=>e.classList.add("is-in")),e.addEventListener("click",t=>{t.target.closest(".tc-teaser-close")?e.remove():(e.remove(),this.setOpen(!0))}),this._teaser=e,this._teaserHide=setTimeout(()=>this._killTeaser(),12e3)},6e3))}_killTeaser(){clearTimeout(this._teaserTimer),clearTimeout(this._teaserHide),this._teaser?.remove(),this._teaser=null}_greetingText(){if(this.config.greeting)return this.config.greeting;let e=this.config.siteName||document.querySelector('meta[property="og:site_name"]')?.content||"";return this.config.shopping?e?`Hi! I can help you find the right thing at ${e} \u2014 ask away.`:"Hi! Tell me what you're shopping for and I'll help you find it.":e?`Hi! Ask me anything about ${e}.`:"Hi! Ask me anything about this site."}_ensureCatalog(){return!this.config.shopping||!this.config.shop?Promise.resolve(null):this._catalog?Promise.resolve(this._catalog):this._catalogPromise?this._catalogPromise:(this._catalogPromise=this._loadCatalog().finally(()=>{this._catalogPromise=null}),this._catalogPromise)}async _loadCatalog(){let e=this.config.shop,t=this._readCatalogCache(e);if(t)return this._catalog=t.catalog,this._policies=t.policies||{},this._catalog;this._catalogAbort=new AbortController;try{let[n,i]=await Promise.all([gc({shop:e,currency:this.config.currency||"USD",signal:this._catalogAbort.signal}),bc({shop:e,signal:this._catalogAbort.signal}).catch(()=>({}))]);return this.config.currency&&(n.currency=this.config.currency),this._catalog=n,this._policies=i||{},this._writeCatalogCache(e,n,this._policies),this._emit("catalog",{store:n.store,products:n.products.length}),n}catch(n){return this._emit("error",n instanceof Error?n:new Error(String(n))),this._catalog={store:e,origin:Yi(e),currency:this.config.currency||"USD",products:[],collections:[]},this._catalog}}_readCatalogCache(e){try{let t=Kr("sessionStorage",`${xf}:${e}`);if(!t)return null;let n=JSON.parse(t);return!n||Date.now()-n.t>Xx||!n.catalog?.products?.length?null:n}catch{return null}}_writeCatalogCache(e,t,n){t?.products?.length&&Yr("sessionStorage",`${xf}:${e}`,JSON.stringify({t:Date.now(),catalog:t,policies:n}))}async _ensureStage(){if(!(this._stage||this._stageLoading)){this._stageLoading=!0;try{this._stage=new ks(this.$.stageCanvas,{background:"transparent"}),this._narrator=new zs(this._stage,{muted:this.muted,onCaption:e=>this._setCaption(e),onError:()=>{}}),this._narrator.setAgent(this.avatar),await this._stage.load(qr(this.avatar,this.config.assetBase),{framing:this.avatar.framing||"bust"}),this.$.stage.classList.remove("is-loading")}catch(e){this.root.classList.add("is-compact"),this.$.compact.style.display="none",this._emit("error",e instanceof Error?e:new Error(String(e)))}finally{this._stageLoading=!1}}}_setCaption(e){let t=this.$.caption;t&&(e?(t.textContent=e,t.classList.add("is-in")):t.classList.remove("is-in"))}async setAvatar(e){let t=_f(this.config.avatars,e);if(!(!t||t.id===this.avatar.id)&&(this.avatar=t,Yr("localStorage",pf,t.id),this.config.name||(this.$.headName.textContent=t.name),this._narrator?.cancel(),this._narrator?.setAgent(t),this._renderPicker(),this._emit("agentchange",{avatar:t.id}),this._stage)){this.$.stage.classList.add("is-loading");try{await this._stage.load(qr(t,this.config.assetBase),{framing:t.framing||"bust"})}catch(n){this._emit("error",n instanceof Error?n:new Error(String(n)))}this.$.stage.classList.remove("is-loading")}}togglePicker(e){(e!==void 0?e:this.$.picker.hidden)?(this._renderPicker(),this.$.picker.hidden=!1,requestAnimationFrame(()=>this.$.picker.classList.add("is-in"))):(this.$.picker.classList.remove("is-in"),setTimeout(()=>{this.$.picker.hidden=!0},200))}_renderPicker(){let e=this.$.pickerGrid;if(e){e.textContent="";for(let t of this.config.avatars){let n=document.createElement("button");n.type="button",n.className="tc-picker-card"+(t.id===this.avatar.id?" is-current":""),n.setAttribute("role","option"),n.setAttribute("aria-selected",String(t.id===this.avatar.id)),n.innerHTML='<span class="tc-picker-name"></span><span class="tc-picker-tag"></span>',n.querySelector(".tc-picker-name").textContent=t.name,n.querySelector(".tc-picker-tag").textContent=t.tagline,n.addEventListener("click",()=>{this.setAvatar(t.id),this.togglePicker(!1)}),e.appendChild(n)}}}setMuted(e){this.muted=!!e,Yr("localStorage",mf,e?"1":"0"),this._narrator?.setMuted(this.muted),this._syncMuteButton()}_syncMuteButton(){let e=this.$?.mute;e&&(e.innerHTML=this.muted?zn.soundOff:zn.sound,e.setAttribute("aria-pressed",String(this.muted)),e.setAttribute("aria-label",this.muted?"Unmute voice":"Mute voice"))}async _toggleMic(){if(!this._mic)return;if(this._mic.listening){this._mic.stop();return}this._narrator?.cancel();let e=await this._mic.start();e&&(this.$.textarea.value=e,this._syncInput(),this._submit())}_restoreThread(){try{let e=Kr("sessionStorage",gf),t=e?JSON.parse(e):[];return Array.isArray(t)?t.filter(n=>n&&(n.role==="user"||n.role==="assistant")&&typeof n.content=="string"):[]}catch{return[]}}_persistThread(){Yr("sessionStorage",gf,JSON.stringify(this.messages.slice(-40)))}_renderThread(){let e=this.$.thread;if(e.textContent="",!this.messages.length){let t=document.createElement("div");t.className="tc-empty";let n=document.createElement("p");n.className="tc-empty-title",n.textContent=this._greetingText(),t.appendChild(n);let i=this.config.suggestions.length?this.config.suggestions:this.config.shopping?Kx():jx(this.config.siteName);if(i.length){let r=document.createElement("div");r.className="tc-chips";for(let a of i.slice(0,4)){let o=document.createElement("button");o.type="button",o.className="tc-chip",o.textContent=a,o.addEventListener("click",()=>this.ask(a)),r.appendChild(o)}t.appendChild(r)}e.appendChild(t);return}for(let t of this.messages)e.appendChild(this._bubble(t.role,t.content,{products:t.products}));this._scrollThread(!1)}_bubble(e,t,{error:n=!1,products:i=null}={}){let r=document.createElement("div");return r.className=`tc-msg is-${e==="user"?"user":"bot"}${n?" is-error":""}`,e==="user"?r.textContent=t:(r.innerHTML=Vs(t),Array.isArray(i)&&i.length&&this._renderProductCards(r,i)),r}_renderProductCards(e,t){let n=document.createElement("div");n.className="tc-products",n.setAttribute("role","list"),n.setAttribute("aria-label","Recommended products");for(let i of t){let r=i.priceMax>i.priceMin?`${yn(i.priceMin,i.currency)} \u2013 ${yn(i.priceMax,i.currency)}`:yn(i.priceMin,i.currency),a=document.createElement("div");a.className="tc-product",a.setAttribute("role","listitem"),a.innerHTML=`
+ <a class="tc-product-media" href="${en(i.url)}" target="_top" rel="noopener" aria-label="${en(i.title)}">
+ ${i.image?`<img loading="lazy" src="${en(i.image)}" alt="">`:'<span class="tc-product-noimg" aria-hidden="true"></span>'}
+ ${i.onSale?'<span class="tc-product-badge">Sale</span>':""}
+ </a>
+ <div class="tc-product-body">
+ <a class="tc-product-title" href="${en(i.url)}" target="_top" rel="noopener">${en(i.title)}</a>
+ <div class="tc-product-meta">
+ <span class="tc-product-price">${en(r)}</span>
+ ${i.available?"":'<span class="tc-product-oos">Sold out</span>'}
+ </div>
+ <div class="tc-product-actions"></div>
+ </div>`;let o=a.querySelector(".tc-product-actions"),c=document.createElement("a");if(c.className="tc-product-view",c.href=i.url,c.target="_top",c.rel="noopener",c.textContent="View",o.appendChild(c),this._onStore&&i.available&&i.variantId){let l=document.createElement("button");l.type="button",l.className="tc-product-add",l.textContent="Add to cart",l.addEventListener("click",()=>this._addToCart(i,l)),o.appendChild(l)}n.appendChild(a)}e.appendChild(n),this._scrollThread()}async _addToCart(e,t){if(!this._onStore||!e.variantId)return;let n=Yi(this.config.shop);t.disabled=!0;let i=t.textContent;t.textContent="Adding\u2026";try{let r=await fetch(`${n}/cart/add.js`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({items:[{id:e.variantId,quantity:1}]})});if(!r.ok)throw new Error(`cart/add \u2192 HTTP ${r.status}`);t.textContent="Added \u2713",t.classList.add("is-added"),this._emit("addtocart",{product:e});try{document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}))}catch{}setTimeout(()=>{t.isConnected&&(t.textContent=i,t.classList.remove("is-added"),t.disabled=!1)},2400)}catch(r){t.textContent="Try again",t.disabled=!1,this._emit("error",r instanceof Error?r:new Error(String(r)))}}_scrollThread(e=!0){let t=this.$.thread;t.scrollTo({top:t.scrollHeight,behavior:e&&!matchMedia("(prefers-reduced-motion: reduce)").matches?"smooth":"auto"})}_syncInput(){let e=this.$.textarea;e.style.height="auto",e.style.height=Math.min(e.scrollHeight,110)+"px",this.$.send.disabled=this.busy||!e.value.trim()}_submit(){let e=this.$.textarea.value.trim();!e||this.busy||(this.$.textarea.value="",this._syncInput(),this.ask(e))}async ask(e){let t=String(e||"").trim();if(!t||this.busy||this._destroyed)return"";this.setOpen(!0),this._narrator?.cancel(),this.messages.length||(this.$.thread.textContent=""),this.messages.push({role:"user",content:t}),this.$.thread.appendChild(this._bubble("user",t)),this._persistThread(),this._emit("message",{role:"user",content:t}),this._scrollThread(),this.busy=!0,this.$.send.disabled=!0;let n=document.createElement("div");n.className="tc-typing",n.setAttribute("aria-label","Assistant is thinking"),n.innerHTML="<i></i><i></i><i></i>",this.$.thread.appendChild(n),this._scrollThread();let i=document.createElement("div");i.className="tc-msg is-bot";let r="",a="",o=!1,c=null,l=[];if(this.config.shopping)try{let u=await this._ensureCatalog();u?.products?.length&&(l=xc(u.products,t,this.config.maxProducts),c=_c(u,l,this._policies,t))}catch{}this._abort=new AbortController;let h="";try{h=(await hc({endpoint:this.config.endpoint,message:t,history:this.messages.slice(0,-1),site:cc(document,{knowledge:this.config.knowledge,siteName:this.config.siteName}),shopping:c||void 0,persona:this.config.persona||void 0,lang:this.config.lang||void 0,signal:this._abort.signal,onChunk:f=>{o||(o=!0,n.remove(),this.$.thread.appendChild(i)),r+=f,i.innerHTML=Vs(r)+'<span class="tc-caret" aria-hidden="true"></span>',this._scrollThread(),a+=f;let{sentences:g,rest:_}=Nh(a);a=_;for(let m of g){let p=jr(m);p&&this._narrator?.speak(p)}}})).text.trim();let d=jr(a);d&&this._narrator?.speak(d),n.remove(),h?(o||this.$.thread.appendChild(i),i.innerHTML=Vs(h),l.length&&this._renderProductCards(i,l),this.messages.push({role:"assistant",content:h,products:l.length?l.map(Yx):void 0}),this._persistThread(),this._emit("message",{role:"assistant",content:h,products:l})):(i.remove(),this._renderErrorBubble(t,"I could not come up with an answer just now."))}catch(u){if(n.remove(),i.remove(),u?.name!=="AbortError"){let d=u?.status===429?"I am getting a lot of questions right now, give me a few seconds and try again.":"Something went wrong reaching my brain. Check your connection and try again.";this._renderErrorBubble(t,d),this._emit("error",u instanceof Error?u:new Error(String(u)))}}finally{this.busy=!1,this._abort=null,this._syncInput(),this._scrollThread(),this.$.textarea.focus({preventScroll:!0})}return h}_renderErrorBubble(e,t){let n=this._bubble("assistant",t,{error:!0});this.$.thread.appendChild(n);let i=document.createElement("button");i.type="button",i.className="tc-retry",i.textContent="Try again",i.addEventListener("click",()=>{if(i.remove(),n.remove(),this.messages[this.messages.length-1]?.role==="user"){this.messages.pop(),this._persistThread();let r=this.$.thread.querySelectorAll(".tc-msg.is-user");r[r.length-1]?.remove()}this.ask(e)}),this.$.thread.appendChild(i)}reset(){this._abort?.abort(),this._narrator?.cancel(),this.messages=[],this._persistThread(),this._renderThread()}dispose(){this._destroyed||(this._destroyed=!0,this._abort?.abort(),this._catalogAbort?.abort(),this._killTeaser(),this._mq?.removeEventListener?.("change",this._onScheme),this._themeObs?.disconnect(),this._mic?.dispose(),this._narrator?.dispose(),this._stage?.dispose(),this.root?.remove(),this._listeners.clear())}};function _f(s,e){return s.find(t=>t.id===e)||s.find(t=>t.id===Gs)||s[0]||Wr(e)}function jx(s){return[`What is ${s||"this site"}?`,"How do I get started?","What does it cost?"]}function Kx(){return["What do you recommend?","Help me find a gift","What's on sale?","Do you ship internationally?"]}function Yx(s){return{handle:s.handle,title:s.title,url:s.url,image:s.image,priceMin:s.priceMin,priceMax:s.priceMax,currency:s.currency,available:s.available,onSale:s.onSale,variantId:s.variantId}}var vc=(s,e)=>s.hasAttribute(e),Jr=class extends HTMLElement{connectedCallback(){if(!this._widget){this.style.display="none",this._widget=new on({endpoint:this.getAttribute("endpoint")||void 0,avatar:this.getAttribute("avatar")||void 0,avatars:this.getAttribute("avatars")?.split(",").map(e=>e.trim()).filter(Boolean),customAvatar:this.getAttribute("custom-avatar")||void 0,assetBase:this.getAttribute("asset-base")||void 0,name:this.getAttribute("name")||void 0,siteName:this.getAttribute("site-name")||void 0,greeting:this.getAttribute("greeting")||void 0,suggestions:this.getAttribute("suggestions")?.split("|").map(e=>e.trim()).filter(Boolean),knowledge:this.getAttribute("knowledge")||void 0,shop:this.getAttribute("shop")||void 0,shopping:this.hasAttribute("shopping")?this.getAttribute("shopping")!=="false":void 0,currency:this.getAttribute("currency")||void 0,maxProducts:this.getAttribute("max-products")?Number(this.getAttribute("max-products")):void 0,persona:this.getAttribute("persona")||void 0,accent:this.getAttribute("accent")||void 0,position:this.getAttribute("position")||void 0,theme:this.getAttribute("theme")||void 0,lang:this.getAttribute("lang")||void 0,open:vc(this,"open"),muted:vc(this,"muted"),picker:!vc(this,"no-picker"),teaser:!vc(this,"no-teaser"),zIndex:this.getAttribute("z-index")?Number(this.getAttribute("z-index")):void 0});for(let e of["ready","open","close","message","agentchange","catalog","addtocart","error"])this._widget.on(e,t=>{this.dispatchEvent(new CustomEvent(`three-concierge:${e}`,{detail:t,bubbles:!0,composed:!0}))})}}disconnectedCallback(){this._widget?.dispose(),this._widget=null}ask(e){return this._widget?.ask(e)}open(){this._widget?.setOpen(!0)}close(){this._widget?.setOpen(!1)}reset(){this._widget?.reset()}setAvatar(e){return this._widget?.setAvatar(e)}setMuted(e){this._widget?.setMuted(e)}get controller(){return this._widget}};function yc(s="three-concierge"){return typeof customElements<"u"&&!customElements.get(s)&&customElements.define(s,Jr),s}var Jx="0.1.0";typeof window<"u"&&yc();function $x(s){return new on(s)}function vf(){if(typeof document>"u"||window.__threeWsConcierge)return;let s=document.currentScript||document.querySelector("script[data-concierge]");if(!s||!s.hasAttribute("data-concierge"))return;let e=s.dataset;window.__threeWsConcierge=new on({endpoint:e.endpoint||void 0,avatar:e.avatar||void 0,avatars:e.avatars?.split(",").map(t=>t.trim()).filter(Boolean),customAvatar:e.customAvatar||void 0,assetBase:e.assetBase||void 0,name:e.name||void 0,siteName:e.siteName||void 0,greeting:e.greeting||void 0,suggestions:e.suggestions?.split("|").map(t=>t.trim()).filter(Boolean),knowledge:e.knowledge||void 0,shop:e.shop||void 0,shopping:"shopping"in e?e.shopping!=="false":void 0,currency:e.currency||void 0,maxProducts:e.maxProducts?Number(e.maxProducts):void 0,persona:e.persona||void 0,accent:e.accent||void 0,position:e.position||void 0,theme:e.theme||void 0,lang:e.lang||void 0,open:"open"in e,muted:"muted"in e,picker:!("noPicker"in e),teaser:!("noTeaser"in e),zIndex:e.zIndex?Number(e.zIndex):void 0})}typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",vf,{once:!0}):vf());var Zx=on;typeof window<"u"&&(window.ThreeWsConcierge=Uh,window.Concierge=window.Concierge||on);
/*! Bundled license information:
three/build/three.core.js:
diff --git a/public/features.json b/public/features.json
index dca206fc1..c06294349 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-23T05:53:57.481Z",
+ "generated_at": "2026-07-23T07:41:45.568Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
@@ -65,6 +65,16 @@
"tags": [],
"showcase": true
},
+ {
+ "path": "/sign-language",
+ "title": "Sign Language Avatars",
+ "description": "three.ws avatars sign in American Sign Language: fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D.",
+ "added": "2026-07-20",
+ "auth": null,
+ "indexable": true,
+ "tags": [],
+ "showcase": true
+ },
{
"path": "/objects",
"title": "Object Library",
@@ -3477,6 +3487,16 @@
"tags": [],
"showcase": false
},
+ {
+ "path": "/tutorials/shopify-shopping-assistant",
+ "title": "Tutorial · 3D AI Shopping Assistant for Shopify",
+ "description": "Add a chat assistant with a 3D face to your Shopify store: it reads your live catalog, recommends real products as cards with add-to-cart, and answers shipping and returns, all from one script tag.",
+ "added": "2026-07-23",
+ "auth": null,
+ "indexable": true,
+ "tags": [],
+ "showcase": false
+ },
{
"path": "/tutorials/shopify-store-guide",
"title": "Tutorial · 3D Store Guide for Shopify (No Code)",
diff --git a/public/llms-full.txt b/public/llms-full.txt
index 648322773..60c95ebbf 100644
--- a/public/llms-full.txt
+++ b/public/llms-full.txt
@@ -43,6 +43,12 @@ URL: https://three.ws/character-library
106 professionally rigged 3D characters, free to use. Every one drives the full animation library and drops into the Studio, Animation Studio, and embed viewer in one click.
+### Sign Language Avatars
+
+URL: https://three.ws/sign-language
+
+three.ws avatars sign in American Sign Language: fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D.
+
### Object Library
URL: https://three.ws/objects
@@ -2116,6 +2122,12 @@ URL: https://three.ws/tour-builder
A live, no-code playground: point and click on a demo storefront to build a 3D guide that walks and narrates it, preview it instantly, then copy the exact snippet into your Shopify theme.
+### Tutorial · 3D AI Shopping Assistant for Shopify
+
+URL: https://three.ws/tutorials/shopify-shopping-assistant
+
+Add a chat assistant with a 3D face to your Shopify store: it reads your live catalog, recommends real products as cards with add-to-cart, and answers shipping and returns, all from one script tag.
+
### Tutorial · 3D Store Guide for Shopify (No Code)
URL: https://three.ws/tutorials/shopify-store-guide
diff --git a/public/llms.txt b/public/llms.txt
index c8c586b17..8bc7ca8fc 100644
--- a/public/llms.txt
+++ b/public/llms.txt
@@ -16,6 +16,7 @@ Entry points into the product.
- [Avatar Gallery](https://three.ws/gallery): Every public 3D avatar in the system, browsable as a grid.
- [Animation Gallery](https://three.ws/animations): Browse and preview public animations authored by the three.ws community. Apply any clip to your avatar in the Animation Studio.
- [Character Library](https://three.ws/character-library): 106 professionally rigged 3D characters, free to use. Every one drives the full animation library and drops into the Studio, Animation Studio, and embed viewer in one click.
+- [Sign Language Avatars](https://three.ws/sign-language): three.ws avatars sign in American Sign Language: fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D.
- [Object Library](https://three.ws/objects): Hundreds of free CC0 3D objects and props: furniture, lighting, electronics, decor. Public domain, no attribution required. Preview live, place it in your room with AR, or download the GLB.
- [Diorama](https://three.ws/diorama): Speak a little world into being — describe a scene and watch it assemble into an explorable 3D diorama you can walk through, then take it into AR.
- [Mocap Studio](https://three.ws/mocap-studio): Drive a 3D avatar with your webcam — real-time facial motion capture in the browser, no rig and no download.
@@ -369,6 +370,7 @@ Docs, tutorials, and reference.
- [Tutorial · Read an agent's reputation](https://three.ws/tutorials/agent-reputation): Read any registered agent's ERC-8004 reputation from the UI, the REST API, the MCP tool, the SDK, or the contract.
- [Tutorial · Read a Solana agent's reputation](https://three.ws/tutorials/solana-agent-reputation): Read a Solana agent's A–D trust grade and the attestations behind it, then leave your own on-chain vouch.
- [Tour Builder — design a 3D store guide, no code](https://three.ws/tour-builder): A live, no-code playground: point and click on a demo storefront to build a 3D guide that walks and narrates it, preview it instantly, then copy the exact snippet into your Shopify theme.
+- [Tutorial · 3D AI Shopping Assistant for Shopify](https://three.ws/tutorials/shopify-shopping-assistant): Add a chat assistant with a 3D face to your Shopify store: it reads your live catalog, recommends real products as cards with add-to-cart, and answers shipping and returns, all from one script tag.
- [Tutorial · 3D Store Guide for Shopify (No Code)](https://three.ws/tutorials/shopify-store-guide): Design a walking 3D store guide in the Tour Builder playground, preview it, and paste it into Shopify — point, click, done, no code.
- [Tutorial · Customize Your Shopify 3D Store Guide](https://three.ws/tutorials/shopify-store-guide-advanced): Hand-tune the store guide: exact section targeting, multi-page tours, real spoken voices, your own avatar, autostart, deep links, and the JavaScript API.
- [Status](https://three.ws/status): Live operational status and 90-day uptime history for the platform, API, and x402 surfaces — probed every 5 minutes.
diff --git a/public/nav-data.js b/public/nav-data.js
index 7e8547cb6..adcb14136 100644
--- a/public/nav-data.js
+++ b/public/nav-data.js
@@ -101,6 +101,13 @@ export const NAV_GROUPS = [
badgeTone: 'live',
desc: 'Brand brief → rigged avatar + studio renders for your AI agent',
},
+ {
+ title: 'Sign Language',
+ href: '/sign-language',
+ badge: 'New',
+ badgeTone: 'live',
+ desc: 'Avatars that sign in ASL — fingerspell anything, signed chat replies, webcam sign input',
+ },
],
},
{
diff --git a/public/sitemap/index.html b/public/sitemap/index.html
index c3221105e..415266792 100644
--- a/public/sitemap/index.html
+++ b/public/sitemap/index.html
@@ -65,7 +65,7 @@
<main class="sm-wrap">
<div class="sm-hero">
<h1>Sitemap</h1>
- <p>All 524 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
+ <p>All 526 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
<div class="sm-formats">
<a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a>
<a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>
@@ -77,7 +77,7 @@
</div>
<div class="sm-filter">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
- <input id="sm-filter-input" type="search" placeholder="Filter 524 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
+ <input id="sm-filter-input" type="search" placeholder="Filter 526 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
<kbd aria-hidden="true">/</kbd>
</div>
<p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>
@@ -85,6 +85,14 @@
<h2 id="sm-new-title">Newest<a class="sm-new-more" href="/changelog">full changelog &rarr;</a></h2>
<p class="sm-section-desc">The 9 most recently launched pages, straight to the live surface.</p>
<ul class="sm-list">
+ <li>
+ <a href="/tutorials/shopify-shopping-assistant">
+ <span class="sm-new-date">Jul 23, 2026</span>
+ <span class="sm-title">Tutorial · 3D AI Shopping Assistant for Shopify</span>
+ <span class="sm-path">/tutorials/shopify-shopping-assistant</span>
+ <span class="sm-desc">Add a chat assistant with a 3D face to your Shopify store: it reads your live catalog, recommends real products as cards with add-to-cart, and answers shipping and returns, all from one script tag.</span>
+ </a>
+ </li>
<li>
<a href="/blog/all-90-trades">
<span class="sm-new-date">Jul 23, 2026</span>
@@ -117,6 +125,14 @@
<span class="sm-desc">An executable tutorial: an AI art director turns a one-line brief into a themed set of real 3D props with parallel function calls, inspects each render with vision, and rebuilds what fails. Read it with interactive galleries, or download the notebook and run it.</span>
</a>
</li>
+ <li>
+ <a href="/sign-language">
+ <span class="sm-new-date">Jul 20, 2026</span>
+ <span class="sm-title">Sign Language Avatars</span>
+ <span class="sm-path">/sign-language</span>
+ <span class="sm-desc">three.ws avatars sign in American Sign Language: fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D.</span>
+ </a>
+ </li>
<li>
<a href="/ledger">
<span class="sm-new-date">Jul 20, 2026</span>
@@ -141,22 +157,6 @@
<span class="sm-desc">106 professionally rigged 3D characters, free to use. Every one drives the full animation library and drops into the Studio, Animation Studio, and embed viewer in one click.</span>
</a>
</li>
- <li>
- <a href="/motion-swap">
- <span class="sm-new-date">Jul 19, 2026</span>
- <span class="sm-title">Motion Swap — Replace Yourself in Video with Your Avatar</span>
- <span class="sm-path">/motion-swap</span>
- <span class="sm-desc">Upload a video of yourself and get it back with your 3D avatar performing your motion instead of you. Server-side pose tracking and person masking, browser-side compositing and export — stay off camera without staying off video.</span>
- </a>
- </li>
- <li>
- <a href="/daily-match">
- <span class="sm-new-date">Jul 19, 2026</span>
- <span class="sm-title">Daily Match</span>
- <span class="sm-path">/daily-match</span>
- <span class="sm-desc">Which agent ships the most real output today? Live daily standings over real agent activity: actions, trades, skill sales, and coin launches. Resets at 00:00 UTC.</span>
- </a>
- </li>
</ul>
</section>
<nav class="sm-toc" aria-label="Sections">
@@ -174,7 +174,7 @@
</nav>
<section class="sm-section" id="main">
<header>
- <h2>Main<span class="sm-count" data-count>35</span></h2>
+ <h2>Main<span class="sm-count" data-count>36</span></h2>
<p class="sm-section-desc">Entry points into the product.</p>
</header>
<ul class="sm-list">
@@ -213,6 +213,13 @@
<span class="sm-desc">106 professionally rigged 3D characters, free to use. Every one drives the full animation library and drops into the Studio, Animation Studio, and embed viewer in one click.</span>
</a>
</li>
+ <li>
+ <a href="/sign-language">
+ <span class="sm-title">Sign Language Avatars</span>
+ <span class="sm-path">/sign-language</span>
+ <span class="sm-desc">three.ws avatars sign in American Sign Language: fingerspell any word or number, get signed chat replies, and sign back to the AI with your webcam — the whole loop, live in 3D.</span>
+ </a>
+ </li>
<li>
<a href="/objects">
<span class="sm-title">Object Library</span>
@@ -1936,7 +1943,7 @@
<section class="sm-section" id="learn">
<header>
- <h2>Learn<span class="sm-count" data-count>122</span></h2>
+ <h2>Learn<span class="sm-count" data-count>123</span></h2>
<p class="sm-section-desc">Docs, tutorials, and reference.</p>
</header>
<ul class="sm-list">
@@ -2626,6 +2633,13 @@
<span class="sm-desc">A live, no-code playground: point and click on a demo storefront to build a 3D guide that walks and narrates it, preview it instantly, then copy the exact snippet into your Shopify theme.</span>
</a>
</li>
+ <li>
+ <a href="/tutorials/shopify-shopping-assistant">
+ <span class="sm-title">Tutorial · 3D AI Shopping Assistant for Shopify</span>
+ <span class="sm-path">/tutorials/shopify-shopping-assistant</span>
+ <span class="sm-desc">Add a chat assistant with a 3D face to your Shopify store: it reads your live catalog, recommends real products as cards with add-to-cart, and answers shipping and returns, all from one script tag.</span>
+ </a>
+ </li>
<li>
<a href="/tutorials/shopify-store-guide">
<span class="sm-title">Tutorial · 3D Store Guide for Shopify (No Code)</span>
diff --git a/src/avatar-pose.js b/src/avatar-pose.js
index 57d126daa..a91e22ca3 100644
--- a/src/avatar-pose.js
+++ b/src/avatar-pose.js
@@ -68,9 +68,12 @@ export class PoseStage {
* @param {HTMLElement} host container the canvas fills (the av-stage element)
* @param {{ glbUrl: string }} opts
*/
- constructor(host, { glbUrl }) {
+ constructor(host, { glbUrl, framing = 'full' }) {
this.host = host;
this.glbUrl = glbUrl;
+ // 'full' = whole body (studio default); 'portrait' = tighter on the
+ // upper body, where hand signing reads clearly.
+ this.framing = framing;
this.renderer = null;
this.scene = null;
@@ -171,9 +174,16 @@ export class PoseStage {
// Drop the model so its feet sit at y=0, then look at the upper torso.
this.model.position.y -= box.min.y;
- const target = new Vector3(0, height * 0.55, 0);
- const dist = height * 1.6;
- this.camera.position.set(0, height * 0.62, dist);
+ // Portrait framing sits the camera at chest height and pulls in so the
+ // raised hand and face fill the frame — the signing is the point. It
+ // also centers on the model's true x/z, since a close camera amplifies
+ // any off-origin authoring the full-body distance hides.
+ const portrait = this.framing === 'portrait';
+ const cx = portrait ? center.x : 0;
+ const cz = portrait ? center.z : 0;
+ const target = new Vector3(cx, height * (portrait ? 0.72 : 0.55), cz);
+ const dist = height * (portrait ? 1.2 : 1.6);
+ this.camera.position.set(cx, height * (portrait ? 0.76 : 0.62), cz + dist);
this.camera.near = Math.max(0.01, dist / 100);
this.camera.far = dist * 20;
this.camera.updateProjectionMatrix();
diff --git a/src/sign-language-page.js b/src/sign-language-page.js
new file mode 100644
index 000000000..9aacba063
--- /dev/null
+++ b/src/sign-language-page.js
@@ -0,0 +1,180 @@
+// /sign-language — the dedicated home for three.ws's signing avatars.
+//
+// A live avatar that signs on arrival, an input that spells or signs anything
+// you type, a webcam demo that transcribes your own fingerspelling, and a plain
+// explanation of what works today. This is the front door for the feature that
+// otherwise lives inside the Animation Studio panel and the chat toggles.
+//
+// The 3D + animation stack is the same PoseStage the studio uses; SignSpeaker
+// (src/sign-speech.js) drives it exactly like a text-to-speech engine.
+
+import { PoseStage } from './avatar-pose.js';
+import { SignSpeaker } from './sign-speech.js';
+import { normalizeWord } from './fingerspelling.js';
+import { log } from './shared/log.js';
+
+const HERO_AVATAR = '/avatars/cz.glb';
+
+// Phrases the hero cycles through so a first-time visitor immediately sees the
+// avatar signing real content, not a static pose.
+const DEMO_PHRASES = ['HELLO', 'WELCOME TO THREE WS', 'ASK ME ANYTHING', 'NICE TO MEET YOU'];
+
+const $ = (sel, root = document) => root.querySelector(sel);
+
+async function boot() {
+ const stageHost = $('#sl-stage');
+ if (!stageHost) return;
+
+ const stage = new PoseStage(stageHost, { glbUrl: HERO_AVATAR, framing: 'portrait' });
+ let speaker = null;
+ let heroTimer = 0;
+ let heroIndex = 0;
+ let heroActive = true;
+
+ const status = $('#sl-status');
+ const setStatus = (msg) => {
+ if (status) status.textContent = msg || '';
+ };
+
+ try {
+ const { supported } = await stage.mount();
+ stage.start();
+ if (!supported) {
+ setStatus('This avatar can’t sign, but the tools below still work.');
+ return;
+ }
+ speaker = new SignSpeaker({ manager: stage.anim });
+ } catch (err) {
+ log.warn('[sign-language] stage mount failed', err?.message);
+ setStatus('Live preview unavailable — the spelling tools below still work.');
+ }
+
+ // ── Hero auto-signing loop ────────────────────────────────────────────────
+ async function heroTick() {
+ if (!heroActive || !speaker) return;
+ const phrase = DEMO_PHRASES[heroIndex % DEMO_PHRASES.length];
+ heroIndex++;
+ setStatus(`Signing: “${phrase.toLowerCase()}”`);
+ try {
+ const { clip } = await speaker.speak(phrase);
+ heroTimer = window.setTimeout(heroTick, clip.duration * 1000 + 1400);
+ } catch {
+ heroTimer = window.setTimeout(heroTick, 3000);
+ }
+ }
+ const stopHero = () => {
+ heroActive = false;
+ clearTimeout(heroTimer);
+ speaker?.cancel();
+ };
+ if (speaker) heroTick();
+
+ // ── Spell-anything input ──────────────────────────────────────────────────
+ const spellInput = $('#sl-spell-input');
+ const spellBtn = $('#sl-spell-btn');
+ const spellIt = async () => {
+ if (!speaker) return;
+ const raw = spellInput.value.trim();
+ const norm = normalizeWord(raw);
+ if (!norm) {
+ setStatus('Type letters or numbers to sign.');
+ return;
+ }
+ stopHero();
+ heroActive = false;
+ setStatus(`Signing: “${norm.toLowerCase()}”`);
+ try {
+ await speaker.speak(raw);
+ setStatus('Type anything and watch the avatar sign it.');
+ } catch (e) {
+ setStatus(e?.message || 'Could not sign that.');
+ }
+ };
+ spellBtn?.addEventListener('click', spellIt);
+ spellInput?.addEventListener('keydown', (e) => {
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ spellIt();
+ }
+ });
+ // Quick-phrase chips.
+ document.querySelectorAll('[data-sl-phrase]').forEach((chip) => {
+ chip.addEventListener('click', () => {
+ if (spellInput) spellInput.value = chip.dataset.slPhrase;
+ spellIt();
+ });
+ });
+
+ // ── Webcam sign-in demo ───────────────────────────────────────────────────
+ wireWebcamDemo(setStatus);
+}
+
+function wireWebcamDemo(setStatus) {
+ const btn = $('#sl-cam-btn');
+ const previewWrap = $('#sl-cam-preview');
+ const resultEl = $('#sl-cam-result');
+ if (!btn) return;
+
+ let input = null;
+ let active = false;
+
+ btn.addEventListener('click', async () => {
+ if (active) {
+ btn.disabled = true;
+ btn.textContent = 'Reading…';
+ try {
+ const { text, confidence } = await input.stop();
+ if (text) {
+ resultEl.textContent = text;
+ resultEl.dataset.state = confidence != null && confidence < 0.4 ? 'low' : 'ok';
+ } else {
+ resultEl.textContent = 'No fingerspelling read — try again, a little slower.';
+ resultEl.dataset.state = 'low';
+ }
+ } catch (e) {
+ resultEl.textContent = e?.message || 'Transcription failed.';
+ resultEl.dataset.state = 'low';
+ }
+ active = false;
+ btn.disabled = false;
+ btn.textContent = '🎥 Start signing';
+ btn.classList.remove('is-live');
+ previewWrap.hidden = true;
+ previewWrap.innerHTML = '';
+ return;
+ }
+ try {
+ if (!input) {
+ const { SignInput } = await import('./sign-input.js');
+ input = new SignInput({
+ onState: (s, d) => {
+ if (s === 'capturing') setStatus(`Reading your signing… ${d?.frames ?? 0} frames`);
+ else if (s === 'transcribing') setStatus('Transcribing…');
+ else setStatus('');
+ },
+ });
+ }
+ await input.start();
+ previewWrap.innerHTML = '';
+ const v = input.videoElement;
+ v.className = 'sl-cam-video';
+ previewWrap.appendChild(v);
+ previewWrap.hidden = false;
+ active = true;
+ btn.textContent = '⏹ Stop & read';
+ btn.classList.add('is-live');
+ resultEl.textContent = '';
+ resultEl.removeAttribute('data-state');
+ } catch (e) {
+ resultEl.textContent = e?.message || 'Camera unavailable — check browser permissions.';
+ resultEl.dataset.state = 'low';
+ input?.cancel();
+ }
+ });
+}
+
+if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', boot);
+} else {
+ boot();
+}
diff --git a/tests/api-concierge.test.js b/tests/api-concierge.test.js
index 4b4b3fae9..48f11d957 100644
--- a/tests/api-concierge.test.js
+++ b/tests/api-concierge.test.js
@@ -220,6 +220,53 @@ describe('/api/concierge', () => {
);
});
+ it('shopping payload switches the system prompt to a store assistant grounded in products', async () => {
+ let capturedBody = null;
+ providerChainMock.mockReturnValue([
+ { name: 'groq', model: 'llama-3.3-70b', url: 'https://groq.test/v1/chat/completions', headers: {} },
+ ]);
+ vi.stubGlobal(
+ 'fetch',
+ vi.fn(async (url, opts) => {
+ capturedBody = JSON.parse(opts.body);
+ return { ok: true, body: fakeStreamBody(['The Merino scarf is a great pick.']) };
+ }),
+ );
+
+ const res = mkRes();
+ await handler(
+ mkReq({
+ body: {
+ message: 'do you have a warm wool scarf?',
+ site: { url: 'https://larkspur.example', name: 'Larkspur' },
+ shopping: {
+ store: 'larkspur-supply.myshopify.com',
+ currency: 'USD',
+ summary: '42 products · categories: Scarves, Hats · prices from $28.00 to $180.00',
+ collections: ['Winter', 'New Arrivals'],
+ policies: 'Shipping policy: We ship worldwide within 3 business days.',
+ products: '- Merino Wool Scarf ($48.00) · type: Scarves · A soft blue scarf · link: https://larkspur-supply.myshopify.com/products/merino-wool-scarf',
+ },
+ },
+ }),
+ res,
+ );
+ vi.unstubAllGlobals();
+
+ const sys = capturedBody.messages[0].content;
+ expect(capturedBody.messages[0].role).toBe('system');
+ expect(sys).toContain('shopping assistant');
+ expect(sys).toContain('larkspur-supply.myshopify.com'); // store name
+ expect(sys).toContain('Merino Wool Scarf'); // retrieved product grounds the answer
+ expect(sys).toContain('shown as cards'); // told the shopper sees cards
+ expect(sys).toContain('ship worldwide within 3 business days'); // policy grounded
+ expect(sys).toContain('Winter'); // collections offered as a fallback
+
+ expect(recordEventMock).toHaveBeenCalledWith(
+ expect.objectContaining({ meta: expect.objectContaining({ shopping: true }) }),
+ );
+ });
+
it('fails over past a billing-dead rung (with auth cooldown) to the next provider', async () => {
providerChainMock.mockReturnValue([
{ name: 'openrouter', model: 'oss-120b', url: 'https://or.test/v1', headers: {} },
diff --git a/vercel.json b/vercel.json
index 5baf75766..ff425193e 100644
--- a/vercel.json
+++ b/vercel.json
@@ -3868,6 +3868,10 @@
"src": "/character-library/?",
"dest": "/character-library.html"
},
+ {
+ "src": "/sign-language/?",
+ "dest": "/sign-language.html"
+ },
{
"src": "/objects/?",
"dest": "/objects.html"
diff --git a/vite.config.js b/vite.config.js
index 55721546b..eee1e6910 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -577,6 +577,7 @@ const appConfig = {
'pose-mini': resolve(__dirname, 'pages/pose-mini.html'),
animations: resolve(__dirname, 'pages/animations.html'),
'character-library': resolve(__dirname, 'pages/character-library.html'),
+ 'sign-language': resolve(__dirname, 'pages/sign-language.html'),
objects: resolve(__dirname, 'pages/objects.html'),
'avatar-engines': resolve(__dirname, 'pages/avatar-engines.html'),
splat: resolve(__dirname, 'pages/splat.html'),