diff --git a/docs/genre-research.md b/docs/genre-research.md new file mode 100644 index 0000000..c13a0be --- /dev/null +++ b/docs/genre-research.md @@ -0,0 +1,835 @@ +# Genre Tones & NAM Model Sourcing — Complete Reference + +**Project:** pi-multifx-pedal (Raspberry Pi 4B) +**Generated:** 2026-06-13 +**Format:** All NAM models should be Architecture 2 (WaveNet) unless noted. +**Target:** Feather/small class models (< 10 MB) for real-time RPi 4B inference. + +--- + +## Overview + +This document covers 12 core genres plus Blues (Bank 12, documented separately in `docs/blues-genre-research.md`). For each genre: + +- 2–3 iconic bands that define the sound +- Their guitar gear (amp, cab, pedals) +- Key settings (gain structure, EQ, effects) +- NAM A2 captures to source from ToneHunt/tone3000.com +- Cabinet IR recommendations +- Mapping to existing models in the pedal's library + +--- + +## 1. CLASSIC ROCK + +### Genre Summary + +Classic Rock is built on cranked, non-master-volume tube amps pushed into power-amp saturation. The core is a **Marshall Plexi or JTM45 dimed**, often with a treble booster or fuzz for extra saturation. Big, mid-forward, aggressive upper-mids with rolled-off low end. + +**NAM Rig Architecture:** + +| Path | Model | FX | Usage | +|------|-------|----|-------| +| Clean | `Fender_TwinVerb_Clean.nam` + MXR_M77_Feather (treble boost) | None | Hendrix cleans, Page clean intros | +| Crunch | `JCM2000_Crunch.nam` (gain 30–50%) | None | AC/DC rhythm, Zeppelin rhythm | +| Lead/Boost | TS808_Feather in front of JCM2000 | Slapback delay | Page solos | +| Fuzz | Model Tone Bender / Fuzz Face via Feather or dedicated NAM | None | Hendrix, early Zeppelin | + +--- + +### Led Zeppelin — Jimmy Page + +**Guitars:** 1959 Gibson Les Paul Standard (main 1958–1973), 1959 Fender Telecaster (first album), Danelectro 3021, Gibson EDS-1275 double-neck + +**Signal Chain:** Guitar → Sola Sound Tone Bender MkII (fuzz) → Vox Cry Baby wah → Maestro Echoplex EP-3 (tape echo) → Marshall Super Lead 1959 100W Plexi → Marshall 4x12 w/ Celestion G12M 25W Greenbacks + +**Amp Settings (Marshall Super Lead — bridged channels dimed):** +| Control | Setting | +|---------|---------| +| Volume I | 10 (maxed) | +| Volume II | 10 (maxed) | +| Treble | 8–10 | +| Middle | 5–7 | +| Bass | 2–4 | +| Presence | 7–9 | + +**Gain Structure:** Power-amp saturation from full-volume Plexi. Tone Bender fuzz for "How Many More Times." No master volume — all from cranked amp. +**Key EQ:** Mid-forward, aggressive upper-mids, rolled-off low end to stay tight with Les Paul's natural bass. + +**NAM Model Recommendations:** +- From existing library: `JCM2000_Crunch.nam` at lower gain as Plexi substitute +- ToneHunt A2 captures to source: + - "Marshall Plexi Super Lead 1959 - KT66" + - "Marshall JTM45 Bluesbreaker - Full Crank" + - "Supro Thunderbolt 1965" (Led Zeppelin I cleans) + - "Marshall Super Lead 1969 100W - Vintage" + +**IR Recommendation:** Marshall 4x12 G12M Greenback, SM57 4" off-center at cone edge. Packs: York Audio Marshall 412 G12M-25 or ML Sound Lab MIK 412 G12M. + +**Technique:** Hybrid picking, aggressive right-hand attack. Neck pickup for rhythm, bridge for lead. Double/triple tracking for massive layered sound. + +--- + +### AC/DC — Angus Young + +**Guitars:** 1968 Gibson SG Standard ("The Beast"), 1963 Gibson SG Junior (P-90s) + +**Signal Chain:** Guitar → Schaffer-Vega Diversity System (wireless + preamp/comp) → Marshall Super Lead 1959 100W Plexi (Jose Arredondo modded) → Marshall 4x12 w/ G12M Greenbacks + +**Amp Settings (Marshall 1959 #39 — modded):** +| Control | Setting | +|---------|---------| +| Volume | 8–10 | +| Bass | 0–2 (nearly off) | +| Middle | 5–6 | +| Treble | 5–7 | +| Presence | 5–8 | + +**NAM Model Recommendations:** +- From library: `JCM2000_Crunch.nam` — gain ~30%, bass low, mids high +- ToneHunt A2: "Marshall Plexi 1959 - AC/DC Rhythm", "Marshall JTM45 Cranked - 1967", "Jose Marshall Fmod 100W" + +**IR:** Marshall 4x12 G12M Greenback, SM57 at center of cone, 4" from grill. York Audio Marshall 412 M25. + +**Technique:** Downstrokes only. Volume knob cleans up for A section, cranked for chorus. Neck pickup live, bridge on recordings. + +--- + +### Jimi Hendrix + +**Guitars:** 1968 Fender Stratocaster (right-handed flipped, reverse headstock) + +**Signal Chain:** Guitar → Dallas Arbiter Fuzz Face (Germanium) → Vox Cry Baby wah → Roger Mayer Octavia → Uni-Vibe → Marshall Super Lead 1959 100W Plexi → Marshall 4x12 w/ G12M Greenbacks + +**Amp Settings (Marshall JTM100 / 1959):** +| Control | Setting | +|---------|---------| +| Volume | 10 (dimed) | +| Tone | ~6–7 | +| Presence | 7–9 | +| Bass | 5–6 | +| Middle | 5–7 | +| Treble | 6–8 | + +**NAM Model Recommendations:** +- From library: `Fender_TwinVerb_Clean.nam` as clean platform with modeled Fuzz Face. `JCM2000_Crunch.nam` at full gain for Plexi. +- ToneHunt A2: "Marshall Plexi Super Lead - Jimi Hendrix Profile", "Marshall JTM100 Cranked - 1968", "Fuzz Face Germanium - Direct Capture", "Uni-Vibe Rotary Speaker" + +**IR:** Marshall 4x12 G12M Greenback, 75Hz resonance. ML Sound Lab MIK 412 G12M or York Audio 412 M25. + +**Technique:** Thumb-over-neck F chord (Hendrix grip). Volume knob swells. Wide vibrato, extreme bends. + +--- + +## 2. PUNK + +### Genre Summary + +Punk tone is about **aggressive, raw midrange** — cranked amps, minimal effects, and aggressive downpicking. Three distinct approaches: Ramones (dimed Plexi, no pedals), Dead Kennedys (RAT into JCM800), Bad Religion (boosted Dual Rectifier + JCM800 dual-amp wall). + +| Channel | Model | Boost | Notes | +|---------|-------|-------|-------| +| Ramones | `JCM2000_Crunch.nam` (gain >60%) | None | Bass=0, mids/treble=10 | +| DK | `JCM2000_Crunch.nam` (gain 40%) | SD1_Feather (gain 9:00, level 3:00, tone 9:00) | Simulates RAT's dark distortion | +| Bad Religion | `5150_BlockLetter_Boosted.nam` (gain ~50%) | SD1_Feather (drive 0, level max, tone 12:00) | Or stack JCM2000 + 5150 for dual-amp wall | + +--- + +### Ramones — Johnny Ramone + +**Guitars:** Mosrite Ventures II (main 1974–1990) + +**Signal Chain:** Guitar → (nothing) → Marshall Super Lead 1959 100W Plexi → Marshall 4x12 w/ G12M Greenbacks + +**Amp Settings:** Both channels bridged and dimed. Volume I=10, II=10, Treble=10, Middle=10, Bass=0–2, Presence=10. + +**NAM:** "Marshall Plexi Super Lead - Full Tilt", "Marshall JTM45 Cranked - No Master". From library: `JCM2000_Crunch.nam` gain ~60–70%, bass=0, mids/treble full. + +**IR:** Marshall 4x12 G12M Greenback, SM57 dead center. York Audio 412 G12M-25. + +**Technique:** Downstrokes exclusively. Mosrite single-coil bridge pickup. + +--- + +### Dead Kennedys — East Bay Ray + +**Guitars:** 1965 Fender Stratocaster (main), Mosrite Ventures II (early) + +**Signal Chain:** Guitar → ProCo RAT (LM308) → MXR Phase 90 → Boss CE-2 Chorus → Marshall JCM800 2203 → Marshall 4x12 w/ G12M Greenbacks + +**Amp Settings:** Preamp 4–6, Master 7–8, Bass 3–4, Middle 7–8 (key — counteracts RAT's scoop), Treble 6–7, Presence 5–6. + +**NAM:** "Marshall JCM800 2203 - Cranked", "ProCo RAT LM308 - Direct Capture". From library: `JCM2000_Crunch.nam` (gain 40%) + `BOSS_SD1_Feather.nam` (gain low, level high, tone 30%). + +**IR:** Marshall 4x12 G12M Greenback, SM57 slightly off-center. + +--- + +### Bad Religion — Brett Gurewitz / Greg Hetson + +**Guitars:** Gibson Les Paul / PRS (Brett), Fender Strat HSS / Les Paul (Greg) + +**Signal Chain:** Brett: Guitar → Boss SD-1 → Mesa Dual Rectifier (Modern Red) → Mesa 4x12 V30. Greg: Guitar → Boss SD-1 → Marshall JCM800 2203 → Marshall 4x12 G12T-75. + +**Amp Settings (Dual Rectifier):** Gain 12:00–2:00, Bass 9:00–10:00, Mid 1:00–3:00 (KEY — not scooped), Treble 1:00–2:00, Presence 11:00–1:00. + +**NAM:** "Mesa Dual Rectifier - Modern Red", "Marshall JCM800 2203 - Bad Religion". From library: `5150_BlockLetter_Boosted.nam` (gain ~50%) + `BOSS_SD1_Feather.nam` (drive 0, level max, tone 12:00). + +**IR:** Mesa 4x12 V30 (Brett), Marshall 4x12 G12T-75 (Greg). Blend V30 + T75 at 50/50 for single-IR solution. + +**Technique:** Two-guitar layering — run two NAM instances (Dual Rec + JCM800) for the wall. + +--- + +## 3. METAL + +### Genre Summary + +Three distinct metal tones: Sabbath (cranked Laney + treble booster), Metallica (Mark IIC+ with V-scoop + OD boost), Slayer (boosted JCM800 with G12T-75 buzzsaw). + +| Channel | Model | Boost/Pre | IR | +|---------|-------|-----------|-----| +| Sabbath | `JCM2000_Crunch.nam` (gain 60–80%) | `MXR_M77_Feather.nam` as treble booster (bass low, treble pushed) | G12H-30 (York Audio 412 G12H-30) | +| Metallica | `5150_BlockLetter_Boosted.nam` (gain ~50%) | `TS808_Feather.nam` (drive 0, level max, tone 12:00) | Mesa V30 (York Audio Mesa 412 V30) | +| Slayer | `JCM2000_Crunch.nam` (gain 70–80%) | `BOSS_SD1_Feather.nam` (drive 2, level 10, tone 2:00) | G12T-75 (York Audio 412 T75) | + +--- + +### Black Sabbath — Tony Iommi + +**Guitars:** 1964 Gibson SG Special (P-90s), 1965 Gibson SG Custom (humbuckers) + +**Signal Chain:** Guitar → Dallas Rangemaster (treble booster) → Dallas Arbiter Fuzz Face (early years) → Laney LA100BL Supergroup (100W) → Laney 4x12 w/ Celestion G12H-30 + +**Amp Settings (Laney LA100BL — dimed):** Volume=10, Treble=10, Middle=8–10, Bass=0–2, Presence=7–9. + +**NAM:** +- From library: `MXR_M77_Feather.nam` as Rangemaster substitute (bass rolled off, gain moderate) → `JCM2000_Crunch.nam` +- ToneHunt A2: "Laney LA100BL Supergroup - Cranked", "Marshall Super Lead 1959 - Rangemaster Boost", "Dallas Rangemaster Treble Booster - Preamp" + +**IR:** Laney 4x12 w/ Celestion G12H-30 — darker, more low-end than Greenbacks. G12H-30 is essential. York Audio 412 G12H-30. + +**Technique:** Iommi downtuned (Eb → D → C# standard). Tritone riffs. Three-finger fretting. Light gauge strings (8–38!). + +--- + +### Metallica — James Hetfield + +**Guitars:** Gibson Explorer, ESP JH-1/MX-220 + +**Signal Chain:** Guitar → Maxon OD-808 (clean boost) → Mesa Boogie Mark IIC+ → Mesa 4x12 Straight w/ Celestion V30s + +**Amp Settings (Mark IIC+):** Lead Drive=6–7, Lead Master=3–4, Bass=2–3, Middle=3–4, Treble=6–7, Presence=7–8. Graphic EQ V-shape: +6 (80Hz), -6 (240Hz), +3 (750Hz), -9 (2200Hz), +6 (6600Hz). + +**NAM:** +- From library: `5150_BlockLetter_Boosted.nam` (gain ~40–50%) + `TS808_Feather.nam` (drive 0, level max, tone 12:00) +- ToneHunt A2: "Mesa Mark IIC+ - Lead Channel", "Mesa Mark IIC+ - Master of Puppets Rhythm", "Fortin Natas - Boosted" + +**IR:** Mesa 4x12 Straight w/ V30, SM57 at 1" from grill, edge of cone. York Audio Mesa 412 V30. + +**Technique:** Downpicking at extreme speed. Palm muting on bridge. Gallop rhythm: 8th + two 16ths. + +--- + +### Slayer — Kerry King / Jeff Hanneman + +**Guitars:** B.C. Rich Warlock/KKW (Kerry), ESP JV-200 (Jeff). Both Floyd Rose. + +**Signal Chain:** Both: Guitar → Boss SD-1 (or TS9) → Marshall JCM800 2203 → Marshall 4x12 w/ Celestion G12T-75s + +**Amp Settings (JCM800 2203):** Preamp=7–8, Master=7–9, Bass=6–8 (Jeff heavy, Kerry moderate), Middle=5–7, Treble=7–8, Presence=7–8. + +**NAM:** +- From library: `JCM2000_Crunch.nam` (gain 70–80%) + `BOSS_SD1_Feather.nam` (drive 2, level 10, tone 2:00). `Engl_Savage.nam` for post-2000 Slayer. +- ToneHunt A2: "Marshall JCM800 2203 - Boosted SD1", "Marshall JCM800 2204 - 50W Slayer Rhythm", "Marshall JCM800 2203 - DIO Modded" + +**IR:** Marshall 4x12 w/ G12T-75 — brighter, more aggressive than V30s. SM57 dead center, 1/2" off grill. York Audio 412 T75. + +**Technique:** Kerry: downpicking + tremolo picking on low E. Two-guitar layering hard-panned left/right. + +--- + +## 4. HARDCORE + +### Genre Summary + +Hardcore guitar tone is **aggressive, mid-forward, and raw** — high-gain tube amps boosted with overdrive or distortion pedals. Three approaches: Converge (modded Marshall + Mesa blend with RAT), Hatebreed (5150 tightened with OD808), Minor Threat (JMP + RAT for classic hardcore crunch). + +| Channel | Model | Boost | IR | +|---------|-------|-------|-----| +| Converge | Marshall 2204 + Mesa Rec blend | RAT | Greenbacks + V30 blend | +| Hatebreed | 5150/6505+ (gain 6-7) | OD808 (drive 0, level max) | Mesa 4x12 V30 | +| Minor Threat | JMP 2204 (gain 7-8) | RAT (dist 9:00, filter 11:00) | Marshall 1960BV G12M | + +--- + +### Converge — Kurt Ballou + +**Guitars:** Gibson Les Paul Custom / ESP Eclipse (.012-.056, D standard) + +**Signal Chain:** Guitar -> ProCo RAT (main) -> Boss HM-2 -> ISP Decimator gate -> 70s Marshall Super Lead 100W (GodCity mod) + Mesa Triple Rectifier -> Mesa 4x12 V30 + Marshall 1960BV G12M + +**Amp Settings:** Gain 6-7, Bass 5, Mids 7-8, Treble 6, Presence 5. Mid-forward. + +**NAM:** "Kurt Ballou Marshall Super Lead", "Mesa Boogie Dual Rec Vintage", "Marshall 2204 RAT". IRs: York Audio 1960BV G12M-25 + Mesa 4x12 V30. + +--- + +### Hatebreed — Wayne Lozinak + +**Guitars:** ESP/LTD EC-series (Drop C#/.012-.060) + +**Signal Chain:** Guitar -> Maxon OD808 (drive 0, tone 12:00, level max) -> Boss NS-2 gate -> Peavey 5150/6505+ -> Peavey 5150 4x12 slant / Mesa 4x12 V30 + +**Amp Settings (5150):** Pre-gain 6-7, Low 4-5, Mid 7-8 (surprisingly high), High 6-7, Presence 6-7. + +**NAM:** "Peavey 5150 Maxon OD808", "EVH 5153 Stealth". IR: ML Sound Lab Zilla 4x12, OwnHammer 412 MAR CB. + +--- + +### Minor Threat — Lyle Preslar + +**Guitars:** Gibson SG Standard + +**Signal Chain:** Guitar -> ProCo RAT (dist 9:00, filter 11:00) -> Marshall JMP 50W (2204) -> Marshall 1960A 4x12 G12M Greenbacks + +**Amp Settings:** Volume 7-8 (power tube saturation). RAT for distortion. + +**NAM:** "Marshall JMP 2204 RAT", "Marshall Plexi 1959 Greenback". IR: York Audio 1960BV G12M-25. + +--- + +## 5. EMO + +### Genre Summary + +Emo tone splits clean/edge and driven: Fender clean or Vox chime for verses, pushed with Klon/TS for choruses. Mid-forward, articulate, with modulation (chorus/phase). + +| Must-Have Models | Must-Have IRs | +|------------------|---------------| +| Fender DeVille, Vox AC30, Fender Twin, Matchless DC30 | AC30 2x12 Blue, Fender Twin JBL, Marshall 1960BV | + +--- + +### Jimmy Eat World - Jim Adkins + +**Guitars:** Fender Telecaster (ash/maple) + +**Signal Chain:** Guitar -> Klon Centaur (always-on, gain 9:00, output 2:00) -> Ibanez TS9 (leads) -> Boss CE-2 Chorus -> Holy Grail reverb -> Boss DD-3 delay -> Fender Hot Rod DeVille 4x10 / Vox AC30 + +**Amp Settings:** DeVille clean, vol 4-5, treble 6, mids 5, bass 4, reverb 3. Klon pushes into gentle breakup. + +**NAM:** "Fender Hot Rod DeVille clean", "Vox AC30 Top Boost", "Matchless DC30". IR: York Audio AC30 2x12 Blue. + +--- + +### Dashboard Confessional - Chris Carrabba + +**Guitars:** Takamine EN-10C / Gibson J-45 acoustic, Fender Telecaster (electric) + +**Signal Chain:** Guitar -> Boss CE-2 Chorus -> Boss DD-6 delay -> Fulltone OCD (gain 9:00, LP mode) -> Holy Grail reverb -> Vox AC30 / Fender Twin Reverb + +**NAM:** "Vox AC30 Clean", "Fender Twin Reverb clean". IR: York Audio AC30 Blue, OwnHammer 212 VOX-AC CB. + +--- + +### My Chemical Romance - Ray Toro / Frank Iero + +**Guitars:** Ray: Gibson Les Paul Custom / PRS CE24. Frank: Epiphone Wilshire / Fender Tele. D Standard/Drop C. + +**Signal Chain:** Ray -> Mesa Triple Rectifier (vintage mode). Frank -> Marshall JCM800 2203 (modded). Both plus Vox AC30 (cleans). Dual-amp wall. + +**Amp Settings (Dual-amp):** Ray: Recto vintage, gain 5-6, bass 4, mids 6, treble 6, SD-1 boost. Frank: JCM800 preamp 6-7, bass 4, mids 8, treble 7, TS9 boost. + +**NAM:** "Mesa Dual Rectifier Vintage", "Marshall JCM800 2203", "Bogner Uberschall". IR: York Audio Mesa 412 V30 + Marshall 1960BV blended. + +--- + +## 6. MIDWEST EMO + +### Genre Summary + +Clean, bright, compressed Fender tones with heavy use of chorus, phaser, and compressor for the signature "twinkly" clean guitar sound. Capo-heavy, tapping, arpeggiated. + +| Must-Have Models | Must-Have IRs | +|------------------|---------------| +| Fender Twin, Fender DeVille, Roland JC-120, JCM800 (low gain) | Fender Twin JBL, Fender 4x10 Jensen, JC-120 | + +--- + +### American Football - Mike Kinsella / Steve Holmes + +**Guitars:** Fender Telecaster (Kinsella), Gibson Les Paul / Rickenbacker 360 (Holmes). Capo extensively. + +**Signal Chain:** Guitar -> MXR Dyna Comp (always-on) -> Boss CE-2 Chorus -> MXR Phase 90 -> Boss DD-3 delay -> Ibanez TS9 (driven) -> Fender Twin Reverb / Fender Deluxe Reverb / Roland JC-120 + +**Amp Settings:** Twin volume 4-5, treble 6, mids 4, bass 4, reverb 4. Comp sustain 11:00, attack 2:00. + +**NAM:** "Fender Twin Reverb Clean", "Roland JC-120", "Fender Deluxe Reverb". IR: York Audio Fender Twin JBL. + +--- + +### Tiny Moving Parts - Dylan Mattheisen + +**Guitars:** Fender Telecaster, capo 5th-7th fret + +**Signal Chain:** Guitar -> Boss CS-3 Compressor (always-on, sustain 1:00, attack 3:00) -> EarthQuaker Plumes (mode 1, gain 10:00, level 2:00) -> Boss CE-5 Chorus -> Boss RV-6 reverb -> Fender Hot Rod DeVille 4x10 + +**NAM:** "Fender HRDx 4x10 Clean", "Fender Twin Reverb". IR: ML Sound Lab Fender 4x10 Super. + +--- + +### Algernon Cadwallader - Peter Helmis + +**Guitars:** Fender Telecaster, capo 3rd-7th fret + +**Signal Chain:** Guitar -> MXR Dyna Comp (always-on) -> Ibanez TS9 (driven) -> Boss CE-2 Chorus -> Holy Grail reverb -> Fender Hot Rod DeVille 4x10 / Marshall JCM800 (driven) + +**NAM:** "Fender Blues DeVille", "Marshall JCM800 2203", "Fender Deluxe Reverb". IR: York Audio Fender Twin JBL + Marshall 1960BV blend. + +--- + +## 7. DJENT + +### Genre Summary + +Extended-range guitars (7- and 8-string), tight palm-muted chugs, high-gain preamp with boost pedal tightening the low end. Noise gate always on. Modern high-gain IRs with V30 speakers. + +| Band | Amp | Boost | IR | +|------|-----|-------|-----| +| Meshuggah | Fractal Axe-Fx / Randall Warhead | Boss HM-2 (modded) | Mesa OS 4x12 V30 | +| Periphery | Mesa Mark V / EVH 5150 III | Precision Drive / OD808 | Mesa 4x12 OS V30 | +| TesseracT | Fractal Axe-Fx / ENGL Powerball | OD808 | Mesa OS 4x12, Bogner Uberkab | + +--- + +### Meshuggah + +**Guitars:** Ibanez 8-string custom (28.75" scale), tuned F#-B-E-A-d-g-b-e + +**Signal Chain:** Guitar -> Fractal Axe-Fx II/III (amp sim + cab sim) -> FOH. Historically: Boss HM-2 -> Randall Warhead -> Randall 4x12 + +**Key Settings:** Gain 5-7/10, Bass 3-4, Mids 6-7, Treble 6-8, Presence 7-8. Tight threshold noise gate. Tube screamer boost tightens low end. + +**NAM:** "Fractal Axe-Fx III 5150", "Randall Warhead", "Boss HM-2 into clean amp". IR: Mesa OS 4x12 V30, York Audio Mesa 412 OS. + +--- + +### Periphery — Misha Mansoor + +**Guitars:** PRS, Ibanez, Strandberg 7-string (various drop tunings) + +**Signal Chain:** Guitar -> Horizon Precision Drive / OD808 (drive 0, level 10, tone 11:00) -> Mesa Mark V (IIC+ mode) / EVH 5150 III -> Mesa 4x12 V30 + +**Amp Settings (Mark V, IIC+ mode):** Gain 5-7, Bass 4, Mids 5-6, Treble 6-7, Presence 5-6. Graphic EQ: V-shape with cut at 240Hz, boost at 750Hz and 6kHz. + +**NAM:** "Mesa Mark V IIC+", "EVH 5150 III Stealth", "Horizon Precision Drive into 5150". IR: OwnHammer 412 MDRN, Mesa 412 OS. + +--- + +### TesseracT + +**Guitars:** Ibanez, Strandberg, Mayones 7- and 8-string + +**Signal Chain:** Guitar -> Fractal Axe-Fx III (amp+cab sim). Previously: Mesa Dual Rectifier, ENGL Powerball. + +**Key Settings:** Amp block modeled on EVH 5153 or PVH 6160. Gain 4-6, Bass 4-5, Mids 5-6 (less scooped), Treble 6-7, Presence 4-5. Bass cut around 80Hz. + +**NAM:** "ENGL Powerball II", "Mesa Dual Rectifier (modern)", "EVH 5150 III 50W", "Fractal PVH 6160 Block". IR: Mesa OS 4x12 V30, ENGL 4x12 V30, OwnHammer 412 OS. + +**ToneHunt tags:** djent, modern metal, 8-string, 7-string, 5150, Mark V, Rectifier, Fractal + +--- + +## 8. ACOUSTIC + +### Genre Summary + +Acoustic instruments don't use traditional guitar cabs. For NAM modeling on the pi-multifx-pedal: use **DI preamp captures** (Neve 1073, API 512c, AER Compact 60) and **room IRs** instead of cab IRs. Minimal compression and reverb. + +| Artist | Primary | Signal Path | +|--------|---------|-------------| +| Simon & Garfunkel | Martin D-28 | Neumann U47 -> Neve console -> tape | +| Nick Drake | Martin 0-18 | Neumann U67 -> tape | +| John Fahey | Martin 0-18 | RCA 44 ribbon -> tube console -> tape | + +--- + +### Simon & Garfunkel — Paul Simon + +**Guitars:** Martin D-28 (dreadnought), Martin 0-18, Guild F-30, Ramirez classical + +**Studio Chain:** Martin D-28 -> Neumann U47 -> Neve console -> tape. No amplification — all purely acoustic recording. + +**NAM:** DI preamp captures: "Neve 1073 DI", "API 512c DI", "LA-2A compressor". Room IR for natural ambience. + +--- + +### Nick Drake + +**Guitars:** Martin 0-18 (1950s), Levin Goliath + +**Studio Chain:** Martin 0-18 -> Neumann U67 or AKG C24 stereo pair -> tape. Dark, intimate, close-miked. + +**NAM:** "Neumann U67 preamp", "Neve 1073 preamp", "Fairchild 670 compressor", "Studer A800 tape saturation". + +--- + +### John Fahey + +**Guitars:** Martin 0-18, Martin 00-18, Gibson J-45 + +**Studio Chain:** Martin -> RCA 44 ribbon mic or Neumann U47 -> tube console -> tape. Fingerpicks (metal), alternate tunings. + +**NAM:** "RCA 44 ribbon mic preamp", "Universal Audio 610 preamp", "Pultec EQP-1A EQ", "Tape saturation (Studer/Ampex)". + +**IR:** Room IRs, church/hall IR, plate reverb IR. No cab. + +**ToneHunt tags:** acoustic DI, preamp, tube preamp, Neve, API, ribbon mic, studio preamp + +--- + +## 9. GRUNGE + +### Genre Summary + +Raw, unpolished — fuzz/distortion into overdriven tube amp. Heavy midrange (NOT scooped). Drop D tunings common. Wah, phaser, chorus for atmosphere. + +| Path | Model | FX | Usage | +|------|-------|----|-------| +| Clean | `Vox_AC15_TopBoost.nam` or `Fender_TwinVerb_Clean.nam` | Chorus | Nirvana verses | +| Crunch/Fuzz | `JCM2000_Crunch.nam` (gain 60%) + Big Muff | Phase 90 | Soundgarden, AIC rhythm | +| Lead | `5150_BlockLetter_Boosted.nam` (gain 50%) | Wah, slapback delay | Solos | + +--- + +### Nirvana — Kurt Cobain + +**Guitars:** Fender Mustang, Fender Jag-Stang, Univox Hi-Flier + +**Signal Chain:** Guitar -> Boss DS-2 (dist max, tone 7-9) / EHX Big Muff Pi -> Vox AC30 (Top Boost) -> 2x12 combo + +**Amp Settings:** AC30 volume cranked 8-10, Treble 6-8, Bass 5-6, Cut 4-5. + +**NAM:** "Vox AC30 Top Boost", "Vox AC30 Big Muff" (combined capture ideal), "Boss DS-2 into AC30". From library: `Vox_AC15_TopBoost.nam`. + +**IR:** Vox AC30 2x12 Blue Alnico. York Audio AC30 Blue. Marshall Greenbacks for later era. + +**Technique:** Fizzy, woolly distortion. Mustang bridge pickup. Loose low end intentionally. + +--- + +### Soundgarden — Kim Thayil + +**Guitars:** Guild S-100, Gibson SG. Drop C# / open D tunings. + +**Signal Chain:** Guitar -> Ibanez TS9 (boost) -> Boss DS-1 / Big Muff -> Mesa Dual Rectifier (Modern) -> Mesa OS 4x12 V30 + +**Amp Settings:** Gain 6-7, Bass 6-7, Mids 5-6, Treble 6-7, Presence 5-6. TS9 (drive 0, level 10). + +**NAM:** "Mesa Dual Rectifier (Modern)", "Marshall JCM800 2203", "Ibanez TS9 into Dual Rectifier". IR: York Audio Mesa 412 OS. + +--- + +### Alice in Chains — Jerry Cantrell + +**Guitars:** G&L Rampage, Gibson Les Paul Custom + +**Signal Chain:** Guitar -> MXR Micro Amp (clean boost) -> Dunlop Crybaby wah -> MXR Phase 90 -> Bogner Fish preamp -> Marshall power amp -> Marshall 4x12 Greenbacks + +**Amp Settings (Bogner Fish):** Gain 6-8, Bass 6, Mids 7-8 (very high!), Treble 5-6, Presence 4-5. + +**NAM:** "Bogner Fish preamp", "Marshall JCM800 2203", "Mesa Mark III lead", "Soldano SLO-100". IR: Marshall 4x12 Greenbacks. York Audio Marshall 412 Greenback. + +**Technique:** Dark, thick, heavy "sludge" tone. Mid-forward. Drop D tuning. Wah used as filter. + +**ToneHunt tags:** grunge, 90s, vox ac30, dual rectifier, bogner, soldano, big muff, marshall jcm800 + +--- + +## 10. ALTERNATIVE ROCK + +### Genre Summary + +Dynamic contrast — shifting between clean, jangly verses and explosive, distorted choruses. Guitars used texturally: chiming cleans, wall-of-fuzz distortion, arpeggiated delay washes. Spans Vox chime, Marshall crunch, and Mesa high-gain. + +| Path | Model | FX | Usage | +|------|-------|----|-------| +| Clean/Jangle | `Fender_TwinVerb_Clean.nam` or `Vox_AC15_TopBoost.nam` | Comp, subtle chorus | Radiohead verses, Pixies surf-clean | +| Crunch | `JCM2000_Crunch.nam` (gain 40-50%) | Boost/OD | Smashing Pumpkins rhythm, Pixies verses | +| Distorted | `Orange_Rockerverb.nam` or `JCM900_Lead.nam` | Fuzz (Big Muff), RAT | Pumpkins wall, Pixies chorus | +| Lead | As above + MXR_M77_Feather or TS808_Feather | Delay, reverb | Solos, atmospheric leads | + +--- + +### Radiohead — Jonny Greenwood / Ed O'Brien + +**Guitars:** Jonny: Fender Telecaster Plus (lace sensors), Fender Starcaster, Jazzmaster. Ed: Fender Tele Deluxe (wide-range humbuckers). + +**Signal Chain (Jonny):** Tele -> Ross Compressor (always-on) -> ProCo RAT -> DOD 440 Envelope Filter -> EHX Small Stone Phaser -> DigiTech Whammy -> Marshall ShredMaster -> Vox AC30 (Top Boost) -> 2x12 cab + +**Signal Chain (Ed):** Tele Deluxe -> Boss SD-1 (boost) -> Line 6 DL4 (delay/loop) -> EHX Holy Grail -> Boss RE-20 Space Echo -> Vox AC30 / Fender Twin + +**Amp Settings (Vox AC30):** Top Boost Volume 5-6, Treble 7-8, Bass 4-5, Cut 4-5, Reverb 2-3. + +**NAM:** +- From library: `Vox_AC15_TopBoost.nam` for AC30 clean/pushed (pair with Ross Comp simulation), `Fender_TwinVerb_Clean.nam` for Ed's clean, `JCM2000_Crunch.nam` for ShredMaster at gain ~50-60%, `BOSS_SD1_Feather.nam` as clean boost. +- ToneHunt A2: "Vox AC30 Top Boost - Compressed Clean", "Marshall ShredMaster - Distortion", "ProCo RAT LM308 - Vintage", "Ross Compressor - Studio", "DOD 440 Envelope Filter", "Small Stone Phaser - Vintage" + +**IR:** Vox AC30 2x12 Celestion Blue AlNiCo. York Audio Vox AC30 Blue. + +**Technique:** Ross Compressor always-on (non-negotiable). Whammy for melodic pitch shifts. Ed's looping on DL4. + +--- + +### Smashing Pumpkins — Billy Corgan + +**Guitars:** 1975 Gibson Les Paul Custom (DiMarzio Super Distortion bridge) + +**Signal Chain:** Les Paul -> EHX Op-Amp Big Muff Pi -> Marshall ShredMaster -> Boss CS-2 Comp -> EHX Small Clone Chorus -> MXR Phase 90 -> A/DA Flanger -> Marshall JCM800 2203 (cranked) -> Marshall 4x12 G12M Greenbacks + +**Amp Settings (JCM800 2203):** Preamp 8-10, Master 5-7, Bass 3-4, Middle 7-8 (not scooped!), Treble 6-7, Presence 7-8. + +**NAM:** +- From library: `JCM2000_Crunch.nam` (gain 80-90%), `JCM900_Lead.nam` for later albums, `Fender_TwinVerb_Clean.nam` for clean intros, `Mesa_MarkIV_Lead.nam` (Adore era). +- ToneHunt A2: "EHX Op-Amp Big Muff Pi - Direct Capture" (ESSENTIAL), "Marshall JCM800 2203 - Cranked with Big Muff", "EHX Small Clone Chorus - Vintage", "A/DA Flanger - Vintage", "Boss CS-2 Comp - Sustain Mode" + +**IR:** Marshall 4x12 G12M Greenbacks. Greenbacks essential. York Audio 412 G12M-25. + +**Technique:** Dozens of layered guitar tracks for the wall. Big Muff: Volume=2:00, Tone=12:00-1:00, Sustain=3:00. Aggressive downstrokes with 2mm pick. + +--- + +### Pixies — Joey Santiago / Frank Black + +**Guitars:** Joey: 1965 Fender Jaguar (main). Frank: Fender Telecaster. + +**Signal Chain (Joey):** Jaguar -> ProCo RAT (dist 10:00-11:00, filter rolled back) -> Marshall JCM800 2203/2204 -> Marshall 4x12 G12M Greenbacks + +**Signal Chain (Frank):** Tele -> direct into Fender Twin Reverb (clean, spring reverb) + +**Amp Settings (JCM800):** Preamp 6-7, Master 7-8, Bass 3-4, Middle 7-8, Treble 6-7, Presence 5-6. + +**NAM:** +- From library: `Fender_TwinVerb_Clean.nam` for Frank's surf-clean, `JCM2000_Crunch.nam` (gain 50-60%), `BOSS_SD1_Feather.nam` as RAT sub (drive low, level high, tone 9:00). +- ToneHunt A2: "ProCo RAT - Low Gain - Filter Rolled Back" (essential), "Marshall JCM800 2204 - 50W Medium Gain", "Fender Twin Reverb - Surf Clean", "Fender Twin Reverb - Spring Reverb Cranked" + +**IR:** Marshall 4x12 G12M Greenback (Joey), Fender Twin 2x12 JBL (Frank). + +**Technique:** Loud-Quiet-Loud dynamic. Joey's Jaguar on bridge pickup. No chorus/flanger — dry and direct. Slapback delay for surf feel. + +**ToneHunt tags:** alternative rock, 90s alternative, vox ac30, marshall jcm800, fender twin, big muff opamp, radiohead, smashing pumpkins, pixies + +--- + +## 11. GARAGE ROCK + +### Genre Summary + +Raw, stripped-down, lo-fi aesthetic. Vintage gear, minimal signal chains, dimed small amps. Philosophy: less is more. Cheap pawn-shop guitars, vintage amps cranked, fuzz pedals for color. Small-speaker cabs (1x8, 1x10, 1x12). + +| Path | Model | FX | Usage | +|------|-------|----|-------| +| Clean/Breakup | `Fender_TwinVerb_Clean.nam` or `Vox_AC15_TopBoost.nam` | None or light reverb | White Stripes rhythm, Strokes verses | +| Fuzz | `Orange_Rockerverb.nam` (cranked) or Fuzz Face NAM | Octave fuzz | White Stripes main, Black Keys | +| Crunch | `JCM2000_Crunch.nam` (gain 40-60%) | TS808 boost | Strokes leads, Black Keys rhythm | + +--- + +### The White Stripes — Jack White + +**Guitars:** 1964 Montgomery Ward Airline "JB Hutto" res-o-glass (fiberglass, single pickup) + +**Signal Chain:** Guitar -> MXR Micro Amp (clean boost) / Dunlop Fuzz Face (Germanium) -> Fender Twin Reverb (dimed!) + +**Amp Settings (Fender Twin):** Volume=10 (DIMED!), Treble=10, Bass=4-5, Reverb=2-3. NO effects loop. + +**NAM:** +- From library: `Fender_TwinVerb_Clean.nam` pushed hard with `MXR_M77_Feather.nam` or `Precision_Drive_Feather.nam` as clean boost (set to high level). +- ToneHunt A2: "Fender Twin Reverb - Dimed - Power Tube Saturation" (ESSENTIAL), "Dunlop Fuzz Face Germanium - Gated", "DigiTech Whammy - Octave Down", "MXR Micro Amp - Clean Boost", "Airline Res-O-Glass - Bridge Pickup DI" + +**IR:** Fender Twin Reverb 2x12 combo — NOT a separate cab. York Audio Fender Twin JBL. + +**Technique:** Dimed Twin Reverb. Thin guitar picks (~0.5mm). Guitar volume knob is the control. No distortion pedals (except fuzz). + +--- + +### The Strokes — Albert Hammond Jr. / Nick Valensi + +**Guitars:** Nick: Epiphone Riviera P-94 (semi-hollow). Albert: Fender Stratocaster. + +**Signal Chain (Nick):** Riviera -> JHS Angry Charlie (Marshall-in-a-box) / ProCo RAT -> Fender Hot Rod DeLuxe 1x12 + +**Signal Chain (Albert):** Strat -> Boss DS-1 (dist low, level high) / MXR Distortion+ -> Fender Hot Rod DeLuxe 1x12 + +**Amp Settings (HRDlx):** Volume 4-5 (edge of breakup), Treble 6-7, Middle 6-7, Bass 4-5, Reverb 2-3. + +**NAM:** +- From library: `Fender_TwinVerb_Clean.nam` (HRDlx approximation), `JCM2000_Crunch.nam` (Angry Charlie = Marshall-in-a-box), `TS808_Feather.nam` as OD boost. +- ToneHunt A2: "Fender Hot Rod DeLuxe - Edge of Breakup" (essential), "JHS Angry Charlie V3", "Boss DS-1 - Low Gain Boost Mode", "Epiphone Riviera P-94 - Bridge Pickup DI" + +**IR:** Fender Hot Rod DeLuxe 1x12 Celestion G12P-80. NOT a 4x12 sound! York Audio 112 Deluxe Reverb. + +**Technique:** Nick: barre chords, lower register riffs. Albert: single-note arpeggios, upper register. Overdrives as boosts into cleanish amp. + +--- + +### The Black Keys — Dan Auerbach + +**Guitars:** 1960s Silvertone 1423 (single pickup), Harmony Silhouette, Gibson Les Paul Junior (P-90) + +**Signal Chain (early):** Silvertone -> direct into small dimed amp (Ampeg Jet J-12 / Silvertone 1481 1x8 / Fender Tremolux). No pedals. + +**Signal Chain (modern):** Les Paul -> Boss SD-1 (drive 2-3, level max) / Fulltone OCD (LP mode) -> Fender Tremolux + +**Amp Settings (Ampeg Jet):** Volume 7-8 (cranked), Treble 7-8, Bass 4-5. + +**NAM:** +- From library: `Fender_TwinVerb_Clean.nam` for modern tones, `JCM2000_Crunch.nam` for bigger sound (pair with 1x12 IR), `BOSS_SD1_Feather.nam` (drive 2, level 10, tone 12:00). +- ToneHunt A2: "Fender Tremolux 6G6-B - Dimed" (essential), "Ampeg Jet J-12 - Cranked", "Silvertone 1481 - 5W Cranked", "Fulltone OCD V2 - LP Mode", "Silvertone 1423 - Bridge Pickup DI" + +**IR:** Small 1x8 or 1x12 combo. NOT 4x12! Silverton 1481 1x8, Ampeg Jet 1x12, Fender Tremolux 2x10. + +**Technique:** Small amps cranked = the formula. Picking dynamics control gain. Slide guitar in open tunings. Heavy pick attack. + +**ToneHunt tags:** garage rock, garage revival, dimed, fender tremolux, silvertone, ampeg jet, fuzz face germanium, small wattage + +--- + +## 12. POP + +### Genre Summary + +Textural and supportive — guitar is one element in a dense, produced arrangement. Clean tones dominate with heavy compression, chorus, and reverb. Drive used sparingly for color. DI preamp captures often more relevant than amp captures. + +| Path | Model | FX | Usage | +|------|-------|----|-------| +| Clean Shimmer | `Fender_TwinVerb_Clean.nam` or `Vox_AC15_TopBoost.nam` | Comp, chorus, reverb | Taylor Swift, Paramore verses | +| Edge/Breakup | `Magnatone_Super59_Pushed.nam` or `JCM2000_Clean.nam` | Subtle drive, studio reverb | Paramore pop-punk, Billie Eilish layers | +| Lead/Solo | `JCM2000_Crunch.nam` (gain 30-40%) | Boost, delay | Paramore solos, pop rock choruses | + +--- + +### Taylor Swift + +**Guitars:** Acoustic: Martin D-28, Gibson J-45. Electric: Fender Telecaster, Fender Stratocaster, Gibson ES-335. + +**Studio Chain:** Tele -> Universal Audio Apollo (Neve preamp) -> LA-2A/1176 compressor -> Amp sim (Fender Twin / Vox AC30) -> EMT 140 Plate reverb + +**Amp Settings (Fender Twin):** Volume 3-4 (clean, no breakup), Treble 5-6, Middle 4-5, Bass 4-5, Reverb 2-3. + +**NAM:** +- From library: `Fender_TwinVerb_Clean.nam`, `Fender_TwinVerb_Vibrato.nam`, `Vox_AC15_TopBoost.nam`, `Magnatone_Super59_Pushed.nam`. +- ToneHunt A2: "Fender Twin Reverb - Clean Studio Compressed", "Neve 1073 DI - Preamp", "LA-2A - Optical Compressor", "EMT 140 Plate Reverb", "Roland JC-120 - Jazz Chorus Clean", "Acoustic DI - Martin D-28 Pure Direct" + +**IR:** Fender Twin 2x12 JBL, boutique-1x12, vintage-1x12. Room IRs for acoustic. + +--- + +### Billie Eilish — Finneas + +**Guitars:** Acoustic: Gibson J-45, Martin D-28. Electric: Fender Telecaster, Gibson ES-335 (occasional). + +**Studio Chain:** Guitar -> Universal Audio Apollo (Neve preamp) -> Logic Pro X (compressors, Space Designer reverb). Distortion almost never used. + +**NAM:** +- From library: `Fender_TwinVerb_Clean.nam`, `Vox_AC15_TopBoost.nam`, `Magnatone_Super59_Pushed.nam`. +- ToneHunt A2: "Neve 1073 DI - Preamp" (essential), "LA-2A - Optical Compressor", "Strymon BigSky - Cloud Reverb", "Eventide H9 - Blackhole Reverb", "Studer A800 - Tape Saturation", "Roland JC-120 - Stereo Chorus", "EHX Mel9 - Tape Clavinet" + +**IR:** Room IRs, vintage-1x12 or boutique-1x12 for generic polished sound. No cab for Billie — DI + space. + +**Technique:** Guitar as texture. Reverse reverb signature. Extreme dynamic control. Sub-bass from synth, not guitar. + +--- + +### Paramore — Taylor York / Josh Farro + +**Guitars (Josh Farro — Pop-Punk era):** Gibson Les Paul Standard (humbuckers) + +**Guitars (Taylor York — Modern):** Fender Tele Deluxe (wide-range humbuckers), Fender Jazzmaster, Fender Bass VI + +**Signal Chain (Josh — Pop-Punk):** Les Paul -> Ibanez TS9 (drive 10:00, level 2:00) -> Mesa Dual Rectifier (vintage mode) -> Mesa 4x12 V30 + +**Signal Chain (Taylor — Modern):** Tele Deluxe -> Strymon Deco (saturation + doubletrack) -> Chase Bliss Warped Vinyl -> Fender Twin Reverb (clean) + +**Amp Settings (Mesa Rectifier — Josh):** Gain 5-6, Bass 4-5, Middle 5-6, Treble 5-6, Presence 4-5. TS9 boost. + +**NAM (Pop-Punk):** "Mesa Dual Rectifier - Vintage - TS9 Boost", "Marshall JCM800 2203 - Pop Punk". From library: `5150_BlockLetter_Boosted.nam` (gain 40-50%) + `TS808_Feather.nam`, `6505_Red_NoBoost.nam`. + +**NAM (Modern):** `Fender_TwinVerb_Clean.nam`, `Vox_AC15_TopBoost.nam`, `Magnatone_Super59_Pushed.nam`. ToneHunt A2: "Fender Jazzmaster - Neck Pickup Clean", "Strymon Deco - Saturation + Doubletrack", "Fender Bass VI - Direct", "Boss CE-2 Chorus - Vintage", "Roland JC-120 - Stereo Chorus" + +**IR (Pop-Punk):** Mesa 4x12 V30. **IR (Modern):** Fender Twin 2x12, Vox AC30 2x12 Blue. + +**ToneHunt tags:** pop, pop rock, clean electric, studio compressor, la2a, neve preamp, plate reverb, fender twin, paramore, taylor swift + +--- + +## NAM Download Priorities + +### Models to Source from ToneHunt (A2) + +Based on gaps identified across all 12 genres, prioritize these captures: + +| Priority | Model Capture | Genres | Notes | +|----------|---------------|--------|-------| +| 1 | Fender Twin Reverb - Clean Studio Compressed | Alt, Pop, Midwest Emo | Universal clean platform | +| 2 | Marshall Plexi Super Lead 1959 - Cranked | Classic Rock, Punk | Core rock sound | +| 3 | Vox AC30 Top Boost - Edge of Breakup | Alt, Grunge, Emo | Chime and crunch | +| 4 | EHX Op-Amp Big Muff Pi | Alt (Pumpkins), Grunge | Essential for these genres | +| 5 | ProCo RAT - Vintage LM308 | Alt (Pixies), Hardcore, Punk | Versatile distortion | +| 6 | Mesa Boogie Dual Rectifier - Modern | Metal, Hardcore, Djent | High-gain standard | +| 7 | Marshall JCM800 2203 - Boosted | Metal (Slayer), Punk | Thrash buzzsaw | +| 8 | Fender Twin Reverb - Dimed | Garage Rock (White Stripes) | Unique sound | +| 9 | Neve 1073 DI - Preamp | Pop, Acoustic | Studio recording standard | +| 10 | Fender Hot Rod DeLuxe - Edge of Breakup | Garage Rock (Strokes) | 1x12 combo character | + +### IRs to Source + +| Priority | IR Pack | Genres | Notes | +|----------|---------|--------|-------| +| 1 | York Audio Vox AC30 Blue | Alt, Grunge, Emo | Core chime cab | +| 2 | York Audio Marshall 412 G12M-25 | Classic Rock, Punk, Alt | Greenback standard | +| 3 | York Audio Mesa 412 V30 | Metal, Hardcore, Djent | V30 modern metal | +| 4 | York Audio Fender Twin JBL | Pop, Alt, Garage, Midwest Emo | Clean Fender sparkle | +| 5 | York Audio 412 G12H-30 | Metal (Sabbath) | Essential for Iommi | +| 6 | York Audio 412 T75 | Metal (Slayer) | Thrash buzzsaw cab | +| 7 | York Audio 112 Deluxe Reverb | Garage Rock (Strokes) | 1x12 combo character | + +### Existing Library Adequacy + +| Genre | Adequacy | Key Existing Models | +|-------|----------|---------------------| +| Classic Rock | Good | JCM2000_Crunch, TS808_Feather, MXR_M77_Feather | +| Punk | Good | 5150_BlockLetter_Boosted, JCM2000_Crunch, BOSS_SD1_Feather | +| Metal | Good | 5150, 6505, Engl_Savage, Splawn_ProMod, TS808_Feather | +| Hardcore | Adequate | 5150, BOSS_SD1_Feather (needs RAT capture) | +| Emo | Adequate | Fender_TwinVerb_Clean, Vox_AC15_TopBoost (needs DeVille) | +| Midwest Emo | Adequate | Fender_TwinVerb_Clean (needs JC-120) | +| Djent | Weak | 5150, Engl_Savage (needs Mark V/5150 III captures) | +| Acoustic | Weak | None suitable — needs DI preamp captures | +| Grunge | Good | Vox_AC15_TopBoost, Fender_TwinVerb_Clean, 5150 | +| Alternative Rock | Adequate | JCM2000_Crunch, Vox_AC15, Fender_Twin (needs Big Muff) | +| Garage Rock | Adequate | Fender_TwinVerb_Clean, MXR_M77_Feather (needs small-amp captures) | +| Pop | Good | Fender_TwinVerb_Clean, Vox_AC15_TopBoost (clean platform covered) | + +--- + +## RPi 4B Performance Summary + +| Genre | Typical Model Size | Avg Models per Preset | DSP Needs | RPi Load | +|-------|-------------------|----------------------|-----------|----------| +| Classic Rock | 3-8 MB | 1-2 (amp + boost) | Slapback delay | Low | +| Punk | 3-8 MB | 1-2 (amp + boost) | None | Low | +| Metal | 5-10 MB | 2 (amp + boost) | Noise gate | Medium | +| Hardcore | 3-8 MB | 2 (amp + boost) | Noise gate | Low-Med | +| Emo | 3-6 MB | 1-2 (clean + boost) | Chorus/reverb | Low | +| Midwest Emo | 3-6 MB | 1 (clean) | Comp/chorus/phase | Low | +| Djent | 8-15 MB | 2 (amp + boost) | Noise gate | Medium-High | +| Acoustic | 1-3 MB | 1 (DI preamp) | Reverb | Very low | +| Grunge | 5-10 MB | 2 (amp + fuzz) | Phase/wah | Medium | +| Alternative | 3-8 MB | 2-3 (amp + fuzz/boost) | Mod (phaser, chorus) | Medium | +| Garage Rock | 2-5 MB | 1-2 (dimed amp + boost) | None to minimal | Low | +| Pop | 2-5 MB | 1 (clean amp) | Comp/reverb/chorus | Very low | + + + diff --git a/docs/nam-ir-inventory.md b/docs/nam-ir-inventory.md index bc62381..0236de5 100644 --- a/docs/nam-ir-inventory.md +++ b/docs/nam-ir-inventory.md @@ -1,6 +1,6 @@ # NAM Model & Cabinet IR Inventory -> **Generated:** 2026-06-13 (updated with Bank 3 A2 captures) +> **Generated:** 2026-06-13 (updated with Bank 7 — Bass, Orange, Others) > **Source:** pelennor2170/NAM_models community collection on GitHub (GPL v3) + Tone3000 Supabase storage > **Format:** Mix of WaveNet A1 and SlimmableContainer A2 models, verified JSON, all < 700 KB (feather class for RPi 4B) @@ -104,11 +104,29 @@ Downloaded from Tone3000 Supabase storage. All are WaveNet A1 (v0.5.0/v0.5.4), v ### Bank 6 — Ambient/Post-Rock Captures (Tone3000 A1 — WaveNet) -| File | Size | Source Model | Best For | -|------|------|-------------|----------| -| `Roland_JC120_Jazz_Chorus.nam` | 276 KB | Roland JC-120 Jazz Chorus | Pristine clean, ambient washes, jazz | -| `Vox_AC30_Chimey.nam` | 290 KB | Vox AC30 Chimey | Sparkling clean, chimey post-rock | -| `Fender_Twin_Reverb_G05.nam` | 288 KB | Tim R Fender Twin Reverb Ch1 BR G05 | Clean/country, pedal platform | +|| File | Size | Source Model | Best For | +||------|------|-------------|----------| +|| `Roland_JC120_Jazz_Chorus.nam` | 276 KB | Roland JC-120 Jazz Chorus | Pristine clean, ambient washes, jazz | +|| `Vox_AC30_Chimey.nam` | 290 KB | Vox AC30 Chimey | Sparkling clean, chimey post-rock | +|| `Fender_Twin_Reverb_G05.nam` | 288 KB | Tim R Fender Twin Reverb Ch1 BR G05 | Clean/country, pedal platform | + +### Bank 7 — Bass, Orange & Others (Tone3000 A2 — SlimmableContainer) + +Downloaded from Tone3000 Supabase storage. All are SlimmableContainer (A2) v0.7.0, ~288-295 KB. +Covers the missing categories: Bass amps, Orange Rocker 30, Fender Bassman, Hiwatt DR103, Supro. + +|| File | Size | Source Model | Category | Best For | +||------|------|-------------|----------|----------| +|| `Ampeg_PF20T_A2.nam` | 288 KB | Ampeg PF20T | Bass | Clean bass tube amp, warm lows | +|| `Aguilar_Tone_Hammer_500_A2.nam` | 293 KB | Aguilar Tone Hammer 500 | Bass | Modern bass preamp, punchy mids | +|| `GK_800RB_Line_A2.nam` | 295 KB | Gallien-Krueger 800RB | Bass | Classic solid-state bass, aggressive | +|| `Aguilar_DB751_Cab_A2.nam` | 292 KB | Aguilar DB751 | Bass | Bass amp DI, full-range presence | +|| `Orange_Rocker30_Dirty_A2.nam` | 295 KB | Orange Rocker 30 Dirty | Orange | Classic rock crunch, stoner/alt rock | +|| `Orange_Rocker30_Natural_A2.nam` | 289 KB | Orange Rocker 30 Natural | Orange | Clean edge, dynamic garage tones | +|| `Fender_Bassman_Dimed_A2.nam` | 289 KB | Fender Bassman dimed | Others | Blues/rock breakup, classic Bassman growl | +|| `Hiwatt_DR103_Bright_A2.nam` | 287 KB | Hiwatt DR-103 Bright Normal | Others | Prog/classic rock, The Who territory | +|| `Hiwatt_DR103_Cornish_A2.nam` | 288 KB | Hiwatt DR103 + Cornish PGS | Others | Boosted prog rock, Gilmour-esque leads | +|| `Supro_Black_Magick_M3_A2.nam` | 288 KB | Supro Black Magick M3 | Others | Garage/blues, Jack White-style grit | ### Legacy Models (Linear Architecture — synthetic, ~35-85 KB) @@ -287,8 +305,8 @@ The following Archive.org sources returned 404 when last checked (2026-06-13): ## File Locations ``` -~/.pedal/ -├── models/ # 54 models (22 core + 9 blues + 5 A2 bonus + 1 ML cab + 17 Tone3000 rock/high-gain/ambient) +`~/.pedal/` +├── models/ # 64 models (22 core + 9 blues + 5 A2 bonus + 1 ML cab + 17 Tone3000 rock/high-gain/ambient + 10 Bank 7 bass/orange/others) │ ├── Fender_TwinVerb_Clean.nam │ ├── Fender_TwinVerb_Vibrato.nam │ ├── Vox_AC15_TopBoost.nam @@ -356,6 +374,18 @@ The following Archive.org sources returned 404 when last checked (2026-06-13): │ ├── Vox_AC30_Chimey.nam # 290 KB — AC30 chimey clean │ ├── Fender_Twin_Reverb_G05.nam # 288 KB — Twin Reverb clean │ │ +│ ├── Bank 7 — Bass, Orange & Others: +│ ├── Ampeg_PF20T_A2.nam # 288 KB — Bass clean tube +│ ├── Aguilar_Tone_Hammer_500_A2.nam # 293 KB — Bass modern preamp +│ ├── GK_800RB_Line_A2.nam # 295 KB — Bass solid-state +│ ├── Aguilar_DB751_Cab_A2.nam # 292 KB — Bass amp DI +│ ├── Orange_Rocker30_Dirty_A2.nam # 295 KB — Rock crunch +│ ├── Orange_Rocker30_Natural_A2.nam # 289 KB — Clean edge +│ ├── Fender_Bassman_Dimed_A2.nam # 289 KB — Blues/rock breakup +│ ├── Hiwatt_DR103_Bright_A2.nam # 287 KB — Classic rock +│ ├── Hiwatt_DR103_Cornish_A2.nam # 288 KB — Boosted classic rock +│ ├── Supro_Black_Magick_M3_A2.nam # 288 KB — Garage/blues +│ │ │ ├── nam/ # Legacy location (symlinked from models/) │ ├── Fender_TwinVerb_Clean.nam → ../models/Fender_TwinVerb_Clean.nam @@ -381,12 +411,13 @@ The following Archive.org sources returned 404 when last checked (2026-06-13): ## Verification -All 54 models were: +All 64 models were: - 22 models from `https://raw.githubusercontent.com/pelennor2170/NAM_models/main/` - 9 blues models from Tone3000 / ToneHunt Supabase storage - 5 clean/plexi A2 models from Tone3000 Supabase storage - 1 bonus ML Sound Lab model from GitHub: fnpngn/IR -- 17 rock/high-gain/ambient models from Tone3000 Supabase storage (new) +- 17 rock/high-gain/ambient models from Tone3000 Supabase storage +- 10 bass/orange/others A2 models from Tone3000 Supabase storage - All verified as valid `.nam` JSON files (WaveNet A1, WaveNet A2, or SlimmableContainer A2 architecture) To verify models load correctly: diff --git a/frontend-react/src/App.jsx b/frontend-react/src/App.jsx index cd35121..4e1a7a9 100644 --- a/frontend-react/src/App.jsx +++ b/frontend-react/src/App.jsx @@ -497,6 +497,49 @@ function FXBlock({ title, type, active = true, bypassed = false, params = [], on ); } +// ── Signal Arrow Connector ────────────────────────────────── +function SignalArrow({ active = true, variant = 'right', animated = true }) { + const color = active ? T.green : T.textDim; + + if (variant === 'right') { + return ( + + + + {active && animated && ( + + + + )} + + ); + } + + if (variant === 'split') { + return ( + + + + + + + ); + } + + if (variant === 'merge') { + return ( + + + + + + + ); + } + + return null; +} + // ── Slide Panel ────────────────────────────────────────────── function SlidePanel({ children, onClose }) { return ( @@ -634,15 +677,38 @@ function RigScreen({ state, connected, refresh }) {
Signal Chain
- {["IN", state?.bypass ? "BYP" : (state?.nam_loaded ? "NAM" : "AMP"), state?.ir_loaded ? "IR" : "CAB", "OUT"].map((s, i, arr) => ( -
-
{s}
- {i < arr.length - 1 &&
} -
- ))} + {(() => { + const chain = ["IN", state?.bypass ? "BYP" : (state?.nam_loaded ? "NAM" : "AMP"), state?.ir_loaded ? "IR" : "CAB", "OUT"]; + const is4CM = state?.routing_mode === '4cm'; + const bp = state?.routing_breakpoint || 7; + const active = !state?.bypass; + return chain.map((s, i, arr) => ( +
+ {is4CM && s === "AMP" && ( + + )} + {is4CM && s === "CAB" && ( + + )} +
+ {s} + {is4CM && s === "AMP" && 4CM} + {is4CM && s === "BYP" && 4CM} +
+ {is4CM && s === "AMP" && ( +
+ + LOOP + +
+ )} + {i < arr.length - 1 && !(is4CM && s === "AMP") && } +
+ )); + })()}
@@ -782,15 +848,56 @@ function FXScreen({ state, connected }) { {/* Signal path */} {fxList && fxList.length > 0 && (
- {["IN", ...fxList.map(f => f.type.toUpperCase()), "OUT"].map((s, i, arr) => ( -
-
{s}
- {i < arr.length - 1 &&
} -
- ))} + {(() => { + const is4CM = state?.routing_mode === '4cm'; + const bp = is4CM ? (state?.routing_breakpoint || 7) : -1; + const items = []; + // Build chain items array with connector metadata + items.push({ label: "IN", type: "io", idx: -1 }); + fxList.forEach((f, idx) => { + if (is4CM && idx === bp) { + items.push({ label: null, type: "merge-bp", idx }); + } + items.push({ label: f.type.toUpperCase(), type: "fx", idx, bypassed: f.bypassed }); + if (is4CM && idx === bp - 1) { + items.push({ label: null, type: "split-bp", idx }); + } + }); + items.push({ label: "OUT", type: "io", idx: -1 }); + + return items.map((item, i) => { + if (item.type === 'split-bp') { + return ( +
+ + 4CM + +
+ ); + } + if (item.type === 'merge-bp') { + // Already rendered as part of the split-bp composite — skip + return null; + } + return ( +
+ {item.type === 'io' && ( +
{item.label}
+ )} + {item.type === 'fx' && ( +
{item.label}
+ )} + {/* Connector after this block */} + {i < items.length - 1 && items[i+1]?.type !== 'split-bp' && items[i]?.type !== 'merge-bp' && ( + + )} +
+ ); + }); + })()}
)} {(!fxList || fxList.length === 0) ? ( diff --git a/presets/factory/bank_0/bank.json b/presets/factory/bank_0/bank.json index 66a475d..c5e0d0a 100644 --- a/presets/factory/bank_0/bank.json +++ b/presets/factory/bank_0/bank.json @@ -1,5 +1,5 @@ { "number": 0, - "name": "Clean & Edge", + "name": "Classic Rock", "preset_count": 4 -} +} \ No newline at end of file diff --git a/presets/factory/bank_0/preset_0.json b/presets/factory/bank_0/preset_0.json index 3f79160..930eb50 100644 --- a/presets/factory/bank_0/preset_0.json +++ b/presets/factory/bank_0/preset_0.json @@ -1,18 +1,74 @@ { - "name": "Clean Jazz", + "name": "Classic Rock \u2014 British Plexi", "bank": 0, "program": 0, - "master_volume": 0.8, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ - {"fx_type": "noise_gate", "enabled": true, "bypass": false, "params": {"threshold": 0.01}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "compressor", "enabled": true, "bypass": false, "params": {"threshold": 0.3, "ratio": 4.0, "gain": 0.8}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "eq", "enabled": true, "bypass": false, "params": {"bass": 0.5, "mid": 0.5, "treble": 0.5}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "reverb", "enabled": true, "bypass": false, "params": {"decay": 0.3, "mix": 0.2}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "ir_cab", "enabled": true, "bypass": false, "params": {"wet": 1.0, "dry": 0.0}, "nam_model_path": "", "ir_file_path": "~/.pedal/irs/vintage-1x12.wav"}, - {"fx_type": "volume", "enabled": true, "bypass": false, "params": {"level": 0.85}, "nam_model_path": "", "ir_file_path": ""} + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.4, + "tone": 0.55, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } ], - "midi_mappings": { - "reverb_mix": {"cc_number": 15, "channel": 0, "min_val": 0.0, "max_val": 1.0} - } -} + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_0/preset_1.json b/presets/factory/bank_0/preset_1.json index 9c8964b..ea990b1 100644 --- a/presets/factory/bank_0/preset_1.json +++ b/presets/factory/bank_0/preset_1.json @@ -1,16 +1,86 @@ { - "name": "Edge of Breakup", + "name": "Classic Rock \u2014 Lead 800", "bank": 0, "program": 1, - "master_volume": 0.75, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ - {"fx_type": "noise_gate", "enabled": true, "bypass": false, "params": {"threshold": 0.008}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "overdrive", "enabled": true, "bypass": false, "params": {"drive": 0.3, "gain": 0.9}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "eq", "enabled": true, "bypass": false, "params": {"bass": 0.4, "mid": 0.6, "treble": 0.7}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "delay", "enabled": true, "bypass": false, "params": {"time": 350.0, "feedback": 0.25, "mix": 0.2}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "ir_cab", "enabled": true, "bypass": false, "params": {"wet": 1.0, "dry": 0.0}, "nam_model_path": "", "ir_file_path": "~/.pedal/irs/boutique-1x12.wav"}, - {"fx_type": "volume", "enabled": true, "bypass": false, "params": {"level": 0.8}, "nam_model_path": "", "ir_file_path": ""} + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.5, + "tone": 0.45, + "level": 0.75 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "time": 0.45, + "feedback": 0.25, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } ], "midi_mappings": {} -} +} \ No newline at end of file diff --git a/presets/factory/bank_0/preset_2.json b/presets/factory/bank_0/preset_2.json index a0f3b09..e544eb6 100644 --- a/presets/factory/bank_0/preset_2.json +++ b/presets/factory/bank_0/preset_2.json @@ -1,16 +1,73 @@ { - "name": "Clean with Chorus", + "name": "Classic Rock \u2014 Clean Chime", "bank": 0, "program": 2, "master_volume": 0.78, - "tuner_enabled": false, "chain": [ - {"fx_type": "noise_gate", "enabled": true, "bypass": false, "params": {"threshold": 0.01}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "eq", "enabled": true, "bypass": false, "params": {"bass": 0.5, "mid": 0.5, "treble": 0.6}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "chorus", "enabled": true, "bypass": false, "params": {"rate": 0.35, "depth": 0.5, "mix": 0.4}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "reverb", "enabled": true, "bypass": false, "params": {"decay": 0.4, "mix": 0.25}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "ir_cab", "enabled": true, "bypass": false, "params": {"wet": 1.0, "dry": 0.0}, "nam_model_path": "", "ir_file_path": "~/.pedal/irs/american-2x12.wav"}, - {"fx_type": "volume", "enabled": true, "bypass": false, "params": {"level": 0.82}, "nam_model_path": "", "ir_file_path": ""} + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.35, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } ], "midi_mappings": {} -} +} \ No newline at end of file diff --git a/presets/factory/bank_0/preset_3.json b/presets/factory/bank_0/preset_3.json index 168f293..80429b8 100644 --- a/presets/factory/bank_0/preset_3.json +++ b/presets/factory/bank_0/preset_3.json @@ -1,16 +1,74 @@ { - "name": "Dynamic Fingerstyle", + "name": "Classic Rock \u2014 Plexi Crunch", "bank": 0, "program": 3, - "master_volume": 0.72, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ - {"fx_type": "compressor", "enabled": true, "bypass": false, "params": {"threshold": 0.25, "ratio": 6.0, "gain": 0.7}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "boost", "enabled": true, "bypass": false, "params": {"gain_db": 3.0}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "eq", "enabled": true, "bypass": false, "params": {"bass": 0.4, "mid": 0.7, "treble": 0.5}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "reverb", "enabled": true, "bypass": false, "params": {"decay": 0.5, "mix": 0.3}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "ir_cab", "enabled": true, "bypass": false, "params": {"wet": 1.0, "dry": 0.0}, "nam_model_path": "", "ir_file_path": "~/.pedal/irs/jazz-1x15.wav"}, - {"fx_type": "volume", "enabled": true, "bypass": false, "params": {"level": 0.78}, "nam_model_path": "", "ir_file_path": ""} + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/vintage-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 0.04, + "gain": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } ], "midi_mappings": {} -} +} \ No newline at end of file diff --git a/presets/factory/bank_1/bank.json b/presets/factory/bank_1/bank.json index 0dd825f..4cea109 100644 --- a/presets/factory/bank_1/bank.json +++ b/presets/factory/bank_1/bank.json @@ -1,5 +1,5 @@ { "number": 1, - "name": "Drive & Lead", + "name": "Punk", "preset_count": 4 -} +} \ No newline at end of file diff --git a/presets/factory/bank_1/preset_0.json b/presets/factory/bank_1/preset_0.json index 9d47101..39f0c06 100644 --- a/presets/factory/bank_1/preset_0.json +++ b/presets/factory/bank_1/preset_0.json @@ -1,18 +1,74 @@ { - "name": "Classic Rock", + "name": "Punk \u2014 Piston", "bank": 1, "program": 0, - "master_volume": 0.7, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ - {"fx_type": "noise_gate", "enabled": true, "bypass": false, "params": {"threshold": 0.015}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "overdrive", "enabled": true, "bypass": false, "params": {"drive": 0.55, "gain": 0.8}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "eq", "enabled": true, "bypass": false, "params": {"bass": 0.6, "mid": 0.4, "treble": 0.7}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "delay", "enabled": true, "bypass": false, "params": {"time": 380.0, "feedback": 0.3, "mix": 0.25}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "ir_cab", "enabled": true, "bypass": false, "params": {"wet": 1.0, "dry": 0.0}, "nam_model_path": "", "ir_file_path": "~/.pedal/irs/british-4x12.wav"}, - {"fx_type": "volume", "enabled": true, "bypass": false, "params": {"level": 0.75}, "nam_model_path": "", "ir_file_path": ""} + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.6, + "tone": 0.35, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } ], - "midi_mappings": { - "drive": {"cc_number": 14, "channel": 0, "min_val": 0.0, "max_val": 1.0} - } -} + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_1/preset_1.json b/presets/factory/bank_1/preset_1.json index 31f93e8..1e82667 100644 --- a/presets/factory/bank_1/preset_1.json +++ b/presets/factory/bank_1/preset_1.json @@ -1,21 +1,74 @@ { - "name": "Lead Solo", + "name": "Punk \u2014 Street Punk", "bank": 1, "program": 1, - "master_volume": 0.85, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ - {"fx_type": "noise_gate", "enabled": true, "bypass": false, "params": {"threshold": 0.02}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "compressor", "enabled": true, "bypass": false, "params": {"threshold": 0.4, "ratio": 3.0, "gain": 1.2}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "overdrive", "enabled": true, "bypass": false, "params": {"drive": 0.7, "gain": 0.7}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "distortion", "enabled": true, "bypass": false, "params": {"drive": 0.6, "gain": 0.6}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "eq", "enabled": true, "bypass": false, "params": {"bass": 0.5, "mid": 0.3, "treble": 0.8}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "delay", "enabled": true, "bypass": false, "params": {"time": 450.0, "feedback": 0.35, "mix": 0.35}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "reverb", "enabled": true, "bypass": false, "params": {"decay": 0.6, "mix": 0.3}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "volume", "enabled": true, "bypass": false, "params": {"level": 0.9}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "ir_cab", "enabled": true, "bypass": false, "params": {"wet": 1.0, "dry": 0.0}, "nam_model_path": "", "ir_file_path": "~/.pedal/irs/british-4x12.wav"} + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/vintage-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.55, + "tone": 0.3, + "level": 0.75 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } ], - "midi_mappings": { - "delay_feedback": {"cc_number": 18, "channel": 1, "min_val": 0.0, "max_val": 1.0} - } -} + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_1/preset_2.json b/presets/factory/bank_1/preset_2.json index f794904..c62b9c7 100644 --- a/presets/factory/bank_1/preset_2.json +++ b/presets/factory/bank_1/preset_2.json @@ -1,16 +1,74 @@ { - "name": "Metal Rhythm", + "name": "Punk \u2014 Skate Punk", "bank": 1, "program": 2, - "master_volume": 0.65, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ - {"fx_type": "noise_gate", "enabled": true, "bypass": false, "params": {"threshold": 0.03}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "boost", "enabled": true, "bypass": false, "params": {"gain_db": 8.0}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "distortion", "enabled": true, "bypass": false, "params": {"drive": 0.8, "gain": 0.5}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "eq", "enabled": true, "bypass": false, "params": {"bass": 0.6, "mid": 0.3, "treble": 0.7}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "volume", "enabled": true, "bypass": false, "params": {"level": 0.7}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "ir_cab", "enabled": true, "bypass": false, "params": {"wet": 1.0, "dry": 0.0}, "nam_model_path": "", "ir_file_path": "~/.pedal/irs/modern-4x12.wav"} + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 0.06, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } ], "midi_mappings": {} -} +} \ No newline at end of file diff --git a/presets/factory/bank_1/preset_3.json b/presets/factory/bank_1/preset_3.json index 35835bd..96b10b4 100644 --- a/presets/factory/bank_1/preset_3.json +++ b/presets/factory/bank_1/preset_3.json @@ -1,17 +1,74 @@ { - "name": "Ambient Wash", + "name": "Punk \u2014 Hardcore Punk", "bank": 1, "program": 3, - "master_volume": 0.72, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ - {"fx_type": "compressor", "enabled": true, "bypass": false, "params": {"threshold": 0.3, "ratio": 4.0, "gain": 0.9}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "phaser", "enabled": true, "bypass": false, "params": {"rate": 0.2, "depth": 0.6, "feedback": 0.4}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "chorus", "enabled": true, "bypass": false, "params": {"rate": 0.3, "depth": 0.7, "mix": 0.5}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "delay", "enabled": true, "bypass": false, "params": {"time": 500.0, "feedback": 0.4, "mix": 0.35}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "ir_cab", "enabled": true, "bypass": false, "params": {"wet": 1.0, "dry": 0.0}, "nam_model_path": "", "ir_file_path": "~/.pedal/irs/american-2x12.wav"}, - {"fx_type": "reverb", "enabled": true, "bypass": false, "params": {"decay": 0.8, "mix": 0.4}, "nam_model_path": "", "ir_file_path": ""}, - {"fx_type": "volume", "enabled": true, "bypass": false, "params": {"level": 0.78}, "nam_model_path": "", "ir_file_path": ""} + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_EOB.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/modern-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.6, + "tone": 0.25, + "level": 0.75 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } ], "midi_mappings": {} -} +} \ No newline at end of file diff --git a/presets/factory/bank_10/bank.json b/presets/factory/bank_10/bank.json new file mode 100644 index 0000000..f9486f6 --- /dev/null +++ b/presets/factory/bank_10/bank.json @@ -0,0 +1,5 @@ +{ + "number": 10, + "name": "Garage Rock", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_10/preset_0.json b/presets/factory/bank_10/preset_0.json new file mode 100644 index 0000000..a05ad8d --- /dev/null +++ b/presets/factory/bank_10/preset_0.json @@ -0,0 +1,74 @@ +{ + "name": "Garage Rock \u2014 Seven Nation", + "bank": 10, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/mini-1x8.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "fuzz", + "enabled": true, + "bypass": false, + "params": { + "fuzz": 0.7, + "tone": 0.25, + "level": 0.75 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_10/preset_1.json b/presets/factory/bank_10/preset_1.json new file mode 100644 index 0000000..afe7fa7 --- /dev/null +++ b/presets/factory/bank_10/preset_1.json @@ -0,0 +1,86 @@ +{ + "name": "Garage Rock \u2014 Lonely Boy", + "bank": 10, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/vintage-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "fuzz", + "enabled": true, + "bypass": false, + "params": { + "fuzz": 0.55, + "tone": 0.35, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 0.05, + "gain": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_10/preset_2.json b/presets/factory/bank_10/preset_2.json new file mode 100644 index 0000000..9b7b277 --- /dev/null +++ b/presets/factory/bank_10/preset_2.json @@ -0,0 +1,85 @@ +{ + "name": "Garage Rock \u2014 Last Nite", + "bank": 10, + "program": 2, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Vox_AC15_TopBoost.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 0.04, + "gain": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.2, + "mix": 0.15 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_10/preset_3.json b/presets/factory/bank_10/preset_3.json new file mode 100644 index 0000000..0b55c4e --- /dev/null +++ b/presets/factory/bank_10/preset_3.json @@ -0,0 +1,85 @@ +{ + "name": "Garage Rock \u2014 Elephant", + "bank": 10, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/mini-1x8.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "fuzz", + "enabled": true, + "bypass": false, + "params": { + "fuzz": 0.85, + "tone": 0.2, + "level": 0.8 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.25, + "mix": 0.15 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_11/bank.json b/presets/factory/bank_11/bank.json new file mode 100644 index 0000000..d2dab9a --- /dev/null +++ b/presets/factory/bank_11/bank.json @@ -0,0 +1,5 @@ +{ + "number": 11, + "name": "Pop", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_11/preset_0.json b/presets/factory/bank_11/preset_0.json new file mode 100644 index 0000000..9529156 --- /dev/null +++ b/presets/factory/bank_11/preset_0.json @@ -0,0 +1,85 @@ +{ + "name": "Pop \u2014 Shake It", + "bank": 11, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 0.03, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.4, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_11/preset_1.json b/presets/factory/bank_11/preset_1.json new file mode 100644 index 0000000..1134466 --- /dev/null +++ b/presets/factory/bank_11/preset_1.json @@ -0,0 +1,86 @@ +{ + "name": "Pop \u2014 Misery Business", + "bank": 11, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Vox_AC15_TopBoost.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.35, + "tone": 0.5, + "level": 0.65 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "chorus", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.35, + "depth": 0.25, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_11/preset_2.json b/presets/factory/bank_11/preset_2.json new file mode 100644 index 0000000..d6c0823 --- /dev/null +++ b/presets/factory/bank_11/preset_2.json @@ -0,0 +1,85 @@ +{ + "name": "Pop \u2014 Bad Guy", + "bank": 11, + "program": 2, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/boutique-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.2, + "ratio": 0.06, + "gain": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.35, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_11/preset_3.json b/presets/factory/bank_11/preset_3.json new file mode 100644 index 0000000..e60d122 --- /dev/null +++ b/presets/factory/bank_11/preset_3.json @@ -0,0 +1,85 @@ +{ + "name": "Pop \u2014 Love Story", + "bank": 11, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "time": 0.3, + "feedback": 0.15, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.3, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_13/bank.json b/presets/factory/bank_13/bank.json new file mode 100644 index 0000000..61bc8e4 --- /dev/null +++ b/presets/factory/bank_13/bank.json @@ -0,0 +1,5 @@ +{ + "number": 13, + "name": "Blues \u2014 Clean", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_13/preset_0.json b/presets/factory/bank_13/preset_0.json new file mode 100644 index 0000000..fca05d1 --- /dev/null +++ b/presets/factory/bank_13/preset_0.json @@ -0,0 +1,86 @@ +{ + "name": "Blues \u2014 Lucille (B.B. King)", + "bank": 13, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 3.0, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.7 + }, + "nam_model_path": "/root/.pedal/models/Fender_Twin_Reverb_Clean_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.4, + "mid": 0.35, + "treble": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "spring", + "decay": 0.4, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_13/preset_1.json b/presets/factory/bank_13/preset_1.json new file mode 100644 index 0000000..6b50d45 --- /dev/null +++ b/presets/factory/bank_13/preset_1.json @@ -0,0 +1,86 @@ +{ + "name": "Blues \u2014 Born Under a Bad Sign (Albert King)", + "bank": 13, + "program": 1, + "master_volume": 0.8, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.55, + "mid": 0.4, + "treble": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 4.0, + "gain": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "room", + "decay": 0.35, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.84 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_13/preset_2.json b/presets/factory/bank_13/preset_2.json new file mode 100644 index 0000000..504eedd --- /dev/null +++ b/presets/factory/bank_13/preset_2.json @@ -0,0 +1,86 @@ +{ + "name": "Blues \u2014 Hide Away (Freddie King)", + "bank": 13, + "program": 2, + "master_volume": 0.8, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.28, + "ratio": 3.5, + "gain": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.72 + }, + "nam_model_path": "/root/.pedal/models/TwoRock_JTM_Signature.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.45, + "treble": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.5, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.83 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_13/preset_3.json b/presets/factory/bank_13/preset_3.json new file mode 100644 index 0000000..2d1384f --- /dev/null +++ b/presets/factory/bank_13/preset_3.json @@ -0,0 +1,86 @@ +{ + "name": "Blues \u2014 Gravity (John Mayer)", + "bank": 13, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.006 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.22, + "ratio": 3.0, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.15, + "tone": 0.6, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.7 + }, + "nam_model_path": "/root/.pedal/models/Dumble_ODS_102_Rock_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/boutique-1x12.wav" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.55, + "mix": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_14/bank.json b/presets/factory/bank_14/bank.json new file mode 100644 index 0000000..9a8f51e --- /dev/null +++ b/presets/factory/bank_14/bank.json @@ -0,0 +1,5 @@ +{ + "number": 14, + "name": "Blues \u2014 Texas Style", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_14/preset_0.json b/presets/factory/bank_14/preset_0.json new file mode 100644 index 0000000..48eeb78 --- /dev/null +++ b/presets/factory/bank_14/preset_0.json @@ -0,0 +1,99 @@ +{ + "name": "Blues \u2014 Texas Flood (SRV)", + "bank": 14, + "program": 0, + "master_volume": 0.82, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 4.0, + "gain": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.3, + "tone": 0.65, + "level": 0.95 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.7 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Vibrato.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "analog", + "time": 280.0, + "feedback": 0.18, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "spring", + "decay": 0.3, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.85 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_14/preset_1.json b/presets/factory/bank_14/preset_1.json new file mode 100644 index 0000000..0c73475 --- /dev/null +++ b/presets/factory/bank_14/preset_1.json @@ -0,0 +1,98 @@ +{ + "name": "Blues \u2014 Pride and Joy (SRV)", + "bank": 14, + "program": 1, + "master_volume": 0.82, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.28, + "ratio": 4.5, + "gain": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.35, + "tone": 0.6, + "level": 0.9 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.72 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Vibrato.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "chorus", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.25, + "depth": 0.3, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "spring", + "decay": 0.35, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.85 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_14/preset_2.json b/presets/factory/bank_14/preset_2.json new file mode 100644 index 0000000..f16893e --- /dev/null +++ b/presets/factory/bank_14/preset_2.json @@ -0,0 +1,86 @@ +{ + "name": "Blues \u2014 Lenny (SRV Instrumental)", + "bank": 14, + "program": 2, + "master_volume": 0.8, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.006 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 3.5, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.68 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/vintage-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.45, + "mid": 0.5, + "treble": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.5, + "mix": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_14/preset_3.json b/presets/factory/bank_14/preset_3.json new file mode 100644 index 0000000..2d00589 --- /dev/null +++ b/presets/factory/bank_14/preset_3.json @@ -0,0 +1,87 @@ +{ + "name": "Blues \u2014 Third Degree (Johnny Winter)", + "bank": 14, + "program": 3, + "master_volume": 0.82, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.45, + "tone": 0.55, + "level": 0.8 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Dumble_ODS_102_Rock_A1.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.55, + "mid": 0.45, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "digital", + "time": 320.0, + "feedback": 0.2, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.84 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_15/bank.json b/presets/factory/bank_15/bank.json new file mode 100644 index 0000000..fdd9575 --- /dev/null +++ b/presets/factory/bank_15/bank.json @@ -0,0 +1,5 @@ +{ + "number": 15, + "name": "Blues \u2014 Rock", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_15/preset_0.json b/presets/factory/bank_15/preset_0.json new file mode 100644 index 0000000..63e0d13 --- /dev/null +++ b/presets/factory/bank_15/preset_0.json @@ -0,0 +1,99 @@ +{ + "name": "Blues \u2014 Still Got the Blues (Gary Moore)", + "bank": 15, + "program": 0, + "master_volume": 0.8, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.35, + "tone": 0.5, + "level": 0.85 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "digital", + "time": 420.0, + "feedback": 0.3, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.6, + "mix": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.84 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_15/preset_1.json b/presets/factory/bank_15/preset_1.json new file mode 100644 index 0000000..5da146c --- /dev/null +++ b/presets/factory/bank_15/preset_1.json @@ -0,0 +1,99 @@ +{ + "name": "Blues \u2014 Parisienne Walkways (Gary Moore)", + "bank": 15, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.25, + "tone": 0.55, + "level": 0.8 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.7 + }, + "nam_model_path": "/root/.pedal/models/Marshall_Bluesbreaker_1962_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.45, + "mid": 0.55, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "analog", + "time": 480.0, + "feedback": 0.35, + "mix": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.65, + "mix": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_15/preset_2.json b/presets/factory/bank_15/preset_2.json new file mode 100644 index 0000000..720f88d --- /dev/null +++ b/presets/factory/bank_15/preset_2.json @@ -0,0 +1,99 @@ +{ + "name": "Blues \u2014 Blues Deluxe (Joe Bonamassa)", + "bank": 15, + "program": 2, + "master_volume": 0.82, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.5, + "tone": 0.45, + "level": 0.85 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.55, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "digital", + "time": 380.0, + "feedback": 0.25, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.5, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.85 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_15/preset_3.json b/presets/factory/bank_15/preset_3.json new file mode 100644 index 0000000..9ffdf3d --- /dev/null +++ b/presets/factory/bank_15/preset_3.json @@ -0,0 +1,111 @@ +{ + "name": "Blues \u2014 Sloe Gin (Joe Bonamassa)", + "bank": 15, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 3.0, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.4, + "tone": 0.5, + "level": 0.8 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.72 + }, + "nam_model_path": "/root/.pedal/models/Marshall_Bluesbreaker_1962_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.45, + "mid": 0.55, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "analog", + "time": 350.0, + "feedback": 0.2, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.6, + "mix": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_16/bank.json b/presets/factory/bank_16/bank.json new file mode 100644 index 0000000..8374194 --- /dev/null +++ b/presets/factory/bank_16/bank.json @@ -0,0 +1,5 @@ +{ + "number": 16, + "name": "Blues \u2014 Delta / Chicago", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_16/preset_0.json b/presets/factory/bank_16/preset_0.json new file mode 100644 index 0000000..5d9cb2e --- /dev/null +++ b/presets/factory/bank_16/preset_0.json @@ -0,0 +1,73 @@ +{ + "name": "Blues \u2014 Mannish Boy (Muddy Waters)", + "bank": 16, + "program": 0, + "master_volume": 0.85, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "boost", + "enabled": true, + "bypass": false, + "params": { + "gain_db": 6.0 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "/root/.pedal/models/Magnatone_Super59_Pushed.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/jazz-1x15.wav" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "analog", + "time": 150.0, + "feedback": 0.15, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.88 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_16/preset_1.json b/presets/factory/bank_16/preset_1.json new file mode 100644 index 0000000..20c45c3 --- /dev/null +++ b/presets/factory/bank_16/preset_1.json @@ -0,0 +1,84 @@ +{ + "name": "Blues \u2014 Hoochie Coochie Man (Muddy Waters)", + "bank": 16, + "program": 1, + "master_volume": 0.84, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.012 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "boost", + "enabled": true, + "bypass": false, + "params": { + "gain_db": 5.0 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.8 + }, + "nam_model_path": "/root/.pedal/models/Fender_Tweed_Dlx_Edge.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/vintage-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.6, + "mid": 0.4, + "treble": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "spring", + "decay": 0.3, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.86 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_16/preset_2.json b/presets/factory/bank_16/preset_2.json new file mode 100644 index 0000000..8fe2df9 --- /dev/null +++ b/presets/factory/bank_16/preset_2.json @@ -0,0 +1,87 @@ +{ + "name": "Blues \u2014 Damn Right I Got the Blues (Buddy Guy)", + "bank": 16, + "program": 2, + "master_volume": 0.82, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 3.5, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.4, + "tone": 0.5, + "level": 0.8 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_EOB.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/vintage-1x12.wav" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "digital", + "time": 200.0, + "feedback": 0.15, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.84 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_16/preset_3.json b/presets/factory/bank_16/preset_3.json new file mode 100644 index 0000000..15cf4c9 --- /dev/null +++ b/presets/factory/bank_16/preset_3.json @@ -0,0 +1,84 @@ +{ + "name": "Blues \u2014 Killing Floor (Howlin' Wolf)", + "bank": 16, + "program": 3, + "master_volume": 0.85, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.015 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "boost", + "enabled": true, + "bypass": false, + "params": { + "gain_db": 8.0 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.85 + }, + "nam_model_path": "/root/.pedal/models/Fender_Tweed_Dlx_Edge.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/mini-1x8.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.65, + "mid": 0.3, + "treble": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "room", + "decay": 0.25, + "mix": 0.15 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.88 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_17/bank.json b/presets/factory/bank_17/bank.json new file mode 100644 index 0000000..c5d033e --- /dev/null +++ b/presets/factory/bank_17/bank.json @@ -0,0 +1,5 @@ +{ + "number": 17, + "name": "Bass \u2014 Clean & Fingerstyle", + "preset_count": 4 +} diff --git a/presets/factory/bank_17/preset_0.json b/presets/factory/bank_17/preset_0.json new file mode 100644 index 0000000..632ad80 --- /dev/null +++ b/presets/factory/bank_17/preset_0.json @@ -0,0 +1,86 @@ +{ + "name": "Flat & Thumpy (Jamerson)", + "bank": 17, + "program": 0, + "master_volume": 0.75, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.2, + "ratio": 4.0, + "gain": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.65 + }, + "nam_model_path": "/root/.pedal/models/Fender_Twin_Reverb_Clean_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-thick_classic.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.45, + "mid": 0.4, + "treble": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "room", + "decay": 0.2, + "mix": 0.15 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.78 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_17/preset_1.json b/presets/factory/bank_17/preset_1.json new file mode 100644 index 0000000..27a15e4 --- /dev/null +++ b/presets/factory/bank_17/preset_1.json @@ -0,0 +1,86 @@ +{ + "name": "Modern Fingerstyle", + "bank": 17, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.005 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 3.0, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.7 + }, + "nam_model_path": "/root/.pedal/models/Fender_Deluxe_Reverb_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-balanced.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.55, + "mid": 0.5, + "treble": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "room", + "decay": 0.3, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_17/preset_2.json b/presets/factory/bank_17/preset_2.json new file mode 100644 index 0000000..a699280 --- /dev/null +++ b/presets/factory/bank_17/preset_2.json @@ -0,0 +1,110 @@ +{ + "name": "Jazz Fusion (Marcus Miller)", + "bank": 17, + "program": 2, + "master_volume": 0.8, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.005 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 2.5, + "gain": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.72 + }, + "nam_model_path": "/root/.pedal/models/Fender_Deluxe_Reverb_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-more_mids.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.6, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.25, + "tone": 0.55, + "level": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "chorus", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.4, + "depth": 0.35, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.5, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.85 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_17/preset_3.json b/presets/factory/bank_17/preset_3.json new file mode 100644 index 0000000..015af2e --- /dev/null +++ b/presets/factory/bank_17/preset_3.json @@ -0,0 +1,86 @@ +{ + "name": "P-Pick Punch (Duck Dunn)", + "bank": 17, + "program": 3, + "master_volume": 0.76, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.006 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 3.5, + "gain": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.68 + }, + "nam_model_path": "/root/.pedal/models/Fender_Tweed_Dlx_Edge.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-classic.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.65, + "treble": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "spring", + "decay": 0.3, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.8 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_18/bank.json b/presets/factory/bank_18/bank.json new file mode 100644 index 0000000..6d24b6a --- /dev/null +++ b/presets/factory/bank_18/bank.json @@ -0,0 +1,5 @@ +{ + "number": 18, + "name": "Bass \u2014 Driven & Rock", + "preset_count": 4 +} diff --git a/presets/factory/bank_18/preset_0.json b/presets/factory/bank_18/preset_0.json new file mode 100644 index 0000000..8941bc2 --- /dev/null +++ b/presets/factory/bank_18/preset_0.json @@ -0,0 +1,98 @@ +{ + "name": "Classic Rock Drive (JPJ)", + "bank": 18, + "program": 0, + "master_volume": 0.82, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.006 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.28, + "ratio": 3.0, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.72 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_EOB.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-half_and_half.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.55, + "mid": 0.5, + "treble": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.3, + "tone": 0.5, + "level": 0.65 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "spring", + "decay": 0.3, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.85 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_18/preset_1.json b/presets/factory/bank_18/preset_1.json new file mode 100644 index 0000000..162961c --- /dev/null +++ b/presets/factory/bank_18/preset_1.json @@ -0,0 +1,86 @@ +{ + "name": "Punk Pogo (Fat Mike)", + "bank": 18, + "program": 1, + "master_volume": 0.88, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.2, + "ratio": 4.0, + "gain": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Twin_Reverb_Clean_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-clanky.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.6, + "mid": 0.3, + "treble": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.6, + "tone": 0.3, + "level": 0.75 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.9 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_18/preset_2.json b/presets/factory/bank_18/preset_2.json new file mode 100644 index 0000000..68cff6a --- /dev/null +++ b/presets/factory/bank_18/preset_2.json @@ -0,0 +1,98 @@ +{ + "name": "Grunge Grind (Krist Novoselic)", + "bank": 18, + "program": 2, + "master_volume": 0.85, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 2.5, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.78 + }, + "nam_model_path": "/root/.pedal/models/Fender_Tweed_Dlx_Edge.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-rumble_bass.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.55, + "mid": 0.45, + "treble": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.5, + "tone": 0.4, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "chorus", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.5, + "depth": 0.4, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.88 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_18/preset_3.json b/presets/factory/bank_18/preset_3.json new file mode 100644 index 0000000..f43c88f --- /dev/null +++ b/presets/factory/bank_18/preset_3.json @@ -0,0 +1,111 @@ +{ + "name": "Alternative Edge (Justin Chancellor)", + "bank": 18, + "program": 3, + "master_volume": 0.83, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.005 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 3.0, + "gain": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.7 + }, + "nam_model_path": "/root/.pedal/models/Roland_JC-120_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-more_mids.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.6, + "treble": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.45, + "tone": 0.55, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "phaser", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.3, + "depth": 0.35, + "feedback": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "analog", + "feedback": 0.25, + "mix": 0.2, + "time_ms": 350 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.86 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_19/bank.json b/presets/factory/bank_19/bank.json new file mode 100644 index 0000000..68fcc48 --- /dev/null +++ b/presets/factory/bank_19/bank.json @@ -0,0 +1,5 @@ +{ + "number": 19, + "name": "Bass \u2014 Modern & Metal", + "preset_count": 4 +} diff --git a/presets/factory/bank_19/preset_0.json b/presets/factory/bank_19/preset_0.json new file mode 100644 index 0000000..99f6eb0 --- /dev/null +++ b/presets/factory/bank_19/preset_0.json @@ -0,0 +1,96 @@ +{ + "name": "Modern Metal (Darkglass B3K)", + "bank": 19, + "program": 0, + "master_volume": 0.85, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.15, + "ratio": 4.5, + "gain": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.7 + }, + "nam_model_path": "/root/.pedal/models/Fender_Twin_Reverb_Clean_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-clanky.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.6, + "treble": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.55, + "tone": 0.5, + "level": 0.75 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.04 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.88 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_19/preset_1.json b/presets/factory/bank_19/preset_1.json new file mode 100644 index 0000000..efd3510 --- /dev/null +++ b/presets/factory/bank_19/preset_1.json @@ -0,0 +1,96 @@ +{ + "name": "Djent Bass (Darkglass AO)", + "bank": 19, + "program": 1, + "master_volume": 0.83, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.18, + "ratio": 4.0, + "gain": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.68 + }, + "nam_model_path": "/root/.pedal/models/Fender_Twin_Reverb_Clean_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-half_and_half.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.4, + "mid": 0.55, + "treble": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.5, + "tone": 0.35, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.05 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.85 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_19/preset_2.json b/presets/factory/bank_19/preset_2.json new file mode 100644 index 0000000..cb2b79f --- /dev/null +++ b/presets/factory/bank_19/preset_2.json @@ -0,0 +1,111 @@ +{ + "name": "Thrash Attack (Cliff Burton)", + "bank": 19, + "program": 2, + "master_volume": 0.88, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.006 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.2, + "ratio": 3.5, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.78 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-rumble_bass.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.6, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.65, + "tone": 0.45, + "level": 0.8 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "auto_wah", + "enabled": true, + "bypass": false, + "params": { + "sensitivity": 0.3, + "resonance": 0.4, + "min_frequency": 0.2, + "max_frequency": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.5, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.9 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_19/preset_3.json b/presets/factory/bank_19/preset_3.json new file mode 100644 index 0000000..60ffa65 --- /dev/null +++ b/presets/factory/bank_19/preset_3.json @@ -0,0 +1,98 @@ +{ + "name": "Nu-Metal Growl (Fieldy / Tim C)", + "bank": 19, + "program": 3, + "master_volume": 0.86, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.2, + "ratio": 4.0, + "gain": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.7 + }, + "nam_model_path": "/root/.pedal/models/Fender_Deluxe_Reverb_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-thick_classic.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.7, + "mid": 0.35, + "treble": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.6, + "tone": 0.3, + "level": 0.8 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.3, + "tone": 0.25, + "level": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.88 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_2/bank.json b/presets/factory/bank_2/bank.json index 7a2d8b4..7dd0e00 100644 --- a/presets/factory/bank_2/bank.json +++ b/presets/factory/bank_2/bank.json @@ -1,5 +1,5 @@ { "number": 2, - "name": "FX Bench", + "name": "Metal", "preset_count": 4 -} +} \ No newline at end of file diff --git a/presets/factory/bank_2/preset_0.json b/presets/factory/bank_2/preset_0.json index e242bb4..4ddb94b 100644 --- a/presets/factory/bank_2/preset_0.json +++ b/presets/factory/bank_2/preset_0.json @@ -1,11 +1,8 @@ { - "name": "Overdrive Bench", + "name": "Metal \u2014 Thrash Machine", "bank": 2, "program": 0, - "master_volume": 0.8, - "routing_mode": "mono", - "routing_breakpoint": 7, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ { "fx_type": "noise_gate", @@ -17,19 +14,57 @@ "nam_model_path": "", "ir_file_path": "" }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, { "fx_type": "overdrive", "enabled": true, "bypass": false, "params": { - "drive": 0.55, - "tone": 0.5, - "level": 0.75, - "gain": 0.6, - "bass": 0.5, - "mid": 0.5, - "treble": 0.5, - "presence": 0.5 + "drive": 0.4, + "tone": 0.3, + "level": 0.65 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.1 }, "nam_model_path": "", "ir_file_path": "" @@ -39,11 +74,11 @@ "enabled": true, "bypass": false, "params": { - "level": 0.85 + "level": 0.82 }, "nam_model_path": "", "ir_file_path": "" } ], "midi_mappings": {} -} +} \ No newline at end of file diff --git a/presets/factory/bank_2/preset_1.json b/presets/factory/bank_2/preset_1.json index f06a6a0..ce2486e 100644 --- a/presets/factory/bank_2/preset_1.json +++ b/presets/factory/bank_2/preset_1.json @@ -1,11 +1,8 @@ { - "name": "Delay Bench", + "name": "Metal \u2014 Scooped Face", "bank": 2, "program": 1, - "master_volume": 0.8, - "routing_mode": "mono", - "routing_breakpoint": 7, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ { "fx_type": "noise_gate", @@ -17,6 +14,27 @@ "nam_model_path": "", "ir_file_path": "" }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_EOB.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/modern-4x12.wav" + }, { "fx_type": "eq", "enabled": true, @@ -30,20 +48,26 @@ "ir_file_path": "" }, { - "fx_type": "delay", + "fx_type": "distortion", "enabled": true, "bypass": false, "params": { - "time": 420.0, - "feedback": 0.35, - "mix": 0.3, - "ping_pong": false, - "stereo": false, - "delay_type": "digital", - "modulation_rate": 0.1, - "modulation_depth": 0.1, - "low_cut": 20.0, - "high_cut": 8000.0 + "drive": 0.5, + "tone": 0.15, + "level": 0.75 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "low": 0.6, + "mid": 0.2, + "high": 0.7, + "level": 0.7 }, "nam_model_path": "", "ir_file_path": "" @@ -53,11 +77,11 @@ "enabled": true, "bypass": false, "params": { - "level": 0.85 + "level": 0.82 }, "nam_model_path": "", "ir_file_path": "" } ], "midi_mappings": {} -} +} \ No newline at end of file diff --git a/presets/factory/bank_2/preset_2.json b/presets/factory/bank_2/preset_2.json index c7b5305..d96e41e 100644 --- a/presets/factory/bank_2/preset_2.json +++ b/presets/factory/bank_2/preset_2.json @@ -1,11 +1,8 @@ { - "name": "Reverb Bench", + "name": "Metal \u2014 Doom", "bank": 2, "program": 2, - "master_volume": 0.8, - "routing_mode": "mono", - "routing_breakpoint": 7, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ { "fx_type": "noise_gate", @@ -17,6 +14,27 @@ "nam_model_path": "", "ir_file_path": "" }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/modern-4x12.wav" + }, { "fx_type": "eq", "enabled": true, @@ -30,20 +48,13 @@ "ir_file_path": "" }, { - "fx_type": "reverb", + "fx_type": "fuzz", "enabled": true, "bypass": false, "params": { - "decay": 0.6, - "mix": 0.28, - "predelay": 30.0, - "low_cut": 80.0, - "high_cut": 7000.0, - "room_size": 0.65, - "damping": 0.5, - "reverb_type": "hall", - "diffusion": 0.6, - "width": 0.8 + "fuzz": 0.8, + "tone": 0.2, + "level": 0.7 }, "nam_model_path": "", "ir_file_path": "" @@ -53,11 +64,11 @@ "enabled": true, "bypass": false, "params": { - "level": 0.85 + "level": 0.82 }, "nam_model_path": "", "ir_file_path": "" } ], "midi_mappings": {} -} +} \ No newline at end of file diff --git a/presets/factory/bank_2/preset_3.json b/presets/factory/bank_2/preset_3.json index 57fbca6..58e58d0 100644 --- a/presets/factory/bank_2/preset_3.json +++ b/presets/factory/bank_2/preset_3.json @@ -1,11 +1,8 @@ { - "name": "Chorus Bench", + "name": "Metal \u2014 New Wave British", "bank": 2, "program": 3, - "master_volume": 0.8, - "routing_mode": "mono", - "routing_breakpoint": 7, - "tuner_enabled": false, + "master_volume": 0.78, "chain": [ { "fx_type": "noise_gate", @@ -17,6 +14,27 @@ "nam_model_path": "", "ir_file_path": "" }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, { "fx_type": "eq", "enabled": true, @@ -30,21 +48,25 @@ "ir_file_path": "" }, { - "fx_type": "chorus", + "fx_type": "overdrive", "enabled": true, "bypass": false, "params": { - "rate": 0.35, - "depth": 0.55, - "mix": 0.3, - "delay": 5.0, - "feedback": 0.1, - "waveform": "sine", - "spread": 0.5, - "phase_invert": false, - "high_pass": 20.0, - "low_pass": 8000.0, - "stereo": true + "drive": 0.45, + "tone": 0.4, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "time": 0.35, + "feedback": 0.2, + "mix": 0.25 }, "nam_model_path": "", "ir_file_path": "" @@ -54,11 +76,11 @@ "enabled": true, "bypass": false, "params": { - "level": 0.85 + "level": 0.82 }, "nam_model_path": "", "ir_file_path": "" } ], "midi_mappings": {} -} +} \ No newline at end of file diff --git a/presets/factory/bank_20/bank.json b/presets/factory/bank_20/bank.json new file mode 100644 index 0000000..9213df9 --- /dev/null +++ b/presets/factory/bank_20/bank.json @@ -0,0 +1,5 @@ +{ + "number": 20, + "name": "Bass \u2014 FX & Specialty", + "preset_count": 4 +} diff --git a/presets/factory/bank_20/preset_0.json b/presets/factory/bank_20/preset_0.json new file mode 100644 index 0000000..fa1b7e6 --- /dev/null +++ b/presets/factory/bank_20/preset_0.json @@ -0,0 +1,98 @@ +{ + "name": "Envelope Filter (Les Claypool)", + "bank": 20, + "program": 0, + "master_volume": 0.82, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.004 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 2.5, + "gain": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.7 + }, + "nam_model_path": "/root/.pedal/models/Fender_Twin_Reverb_Clean_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-balanced.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "envelope_filter", + "enabled": true, + "bypass": false, + "params": { + "sensitivity": 0.6, + "frequency": 0.5, + "resonance": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.3, + "tone": 0.5, + "level": 0.65 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.85 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_20/preset_1.json b/presets/factory/bank_20/preset_1.json new file mode 100644 index 0000000..ef95d6b --- /dev/null +++ b/presets/factory/bank_20/preset_1.json @@ -0,0 +1,111 @@ +{ + "name": "Chorus Bass (Geddy Lee)", + "bank": 20, + "program": 1, + "master_volume": 0.8, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.005 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 3.0, + "gain": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.72 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-more_mids.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.6, + "treble": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.2, + "tone": 0.5, + "level": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "chorus", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.45, + "depth": 0.45, + "mix": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "subtype": "digital", + "feedback": 0.2, + "mix": 0.2, + "time_ms": 380 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.84 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_20/preset_2.json b/presets/factory/bank_20/preset_2.json new file mode 100644 index 0000000..f90de32 --- /dev/null +++ b/presets/factory/bank_20/preset_2.json @@ -0,0 +1,98 @@ +{ + "name": "Octave Down (Royal Blood)", + "bank": 20, + "program": 2, + "master_volume": 0.88, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.008 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.2, + "ratio": 4.0, + "gain": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "octaver", + "enabled": true, + "bypass": false, + "params": { + "mix": 0.5, + "octave_down": 0.8, + "octave_up": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.72 + }, + "nam_model_path": "/root/.pedal/models/Fender_Twin_Reverb_Clean_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-use_on_sub_track.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.55, + "mid": 0.5, + "treble": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "fuzz", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.75, + "tone": 0.4, + "level": 0.8 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.9 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_20/preset_3.json b/presets/factory/bank_20/preset_3.json new file mode 100644 index 0000000..f5905ac --- /dev/null +++ b/presets/factory/bank_20/preset_3.json @@ -0,0 +1,98 @@ +{ + "name": "Solo Lead (Flea)", + "bank": 20, + "program": 3, + "master_volume": 0.84, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.004 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.2, + "ratio": 3.5, + "gain": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Deluxe_Reverb_A2.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/bass-more_mids.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.45, + "mid": 0.7, + "treble": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.35, + "tone": 0.55, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "subtype": "hall", + "decay": 0.4, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.88 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} diff --git a/presets/factory/bank_3/bank.json b/presets/factory/bank_3/bank.json new file mode 100644 index 0000000..64304f7 --- /dev/null +++ b/presets/factory/bank_3/bank.json @@ -0,0 +1,5 @@ +{ + "number": 3, + "name": "Hardcore", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_3/preset_0.json b/presets/factory/bank_3/preset_0.json new file mode 100644 index 0000000..cc89942 --- /dev/null +++ b/presets/factory/bank_3/preset_0.json @@ -0,0 +1,84 @@ +{ + "name": "Hardcore \u2014 Beatdown", + "bank": 3, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_EOB.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/modern-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.65, + "tone": 0.2, + "level": 0.75 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.05 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_3/preset_1.json b/presets/factory/bank_3/preset_1.json new file mode 100644 index 0000000..3c9f481 --- /dev/null +++ b/presets/factory/bank_3/preset_1.json @@ -0,0 +1,74 @@ +{ + "name": "Hardcore \u2014 PMA", + "bank": 3, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.5, + "tone": 0.25, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_3/preset_2.json b/presets/factory/bank_3/preset_2.json new file mode 100644 index 0000000..5c9d322 --- /dev/null +++ b/presets/factory/bank_3/preset_2.json @@ -0,0 +1,74 @@ +{ + "name": "Hardcore \u2014 Youth Crew", + "bank": 3, + "program": 2, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/vintage-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.45, + "tone": 0.3, + "level": 0.75 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_3/preset_3.json b/presets/factory/bank_3/preset_3.json new file mode 100644 index 0000000..8cb3bc8 --- /dev/null +++ b/presets/factory/bank_3/preset_3.json @@ -0,0 +1,86 @@ +{ + "name": "Hardcore \u2014 Metallic HC", + "bank": 3, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/modern-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.55, + "tone": 0.2, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "time": 0.3, + "feedback": 0.15, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_4/bank.json b/presets/factory/bank_4/bank.json new file mode 100644 index 0000000..b735ab6 --- /dev/null +++ b/presets/factory/bank_4/bank.json @@ -0,0 +1,5 @@ +{ + "number": 4, + "name": "Emo", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_4/preset_0.json b/presets/factory/bank_4/preset_0.json new file mode 100644 index 0000000..fe57edf --- /dev/null +++ b/presets/factory/bank_4/preset_0.json @@ -0,0 +1,85 @@ +{ + "name": "Emo \u2014 Crimson", + "bank": 4, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.35, + "ratio": 0.04, + "gain": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.45, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_4/preset_1.json b/presets/factory/bank_4/preset_1.json new file mode 100644 index 0000000..d8a6346 --- /dev/null +++ b/presets/factory/bank_4/preset_1.json @@ -0,0 +1,85 @@ +{ + "name": "Emo \u2014 Three Cheers", + "bank": 4, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.45, + "tone": 0.4, + "level": 0.65 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.3, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_4/preset_2.json b/presets/factory/bank_4/preset_2.json new file mode 100644 index 0000000..7a98261 --- /dev/null +++ b/presets/factory/bank_4/preset_2.json @@ -0,0 +1,85 @@ +{ + "name": "Emo \u2014 The Middle", + "bank": 4, + "program": 2, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Vox_AC15_TopBoost.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "chorus", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.35, + "depth": 0.3, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.25, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_4/preset_3.json b/presets/factory/bank_4/preset_3.json new file mode 100644 index 0000000..df0a0e0 --- /dev/null +++ b/presets/factory/bank_4/preset_3.json @@ -0,0 +1,85 @@ +{ + "name": "Emo \u2014 Helena", + "bank": 4, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "time": 0.5, + "feedback": 0.35, + "mix": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.55, + "mix": 0.35 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_5/bank.json b/presets/factory/bank_5/bank.json new file mode 100644 index 0000000..ec1e625 --- /dev/null +++ b/presets/factory/bank_5/bank.json @@ -0,0 +1,5 @@ +{ + "number": 5, + "name": "Midwest Emo", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_5/preset_0.json b/presets/factory/bank_5/preset_0.json new file mode 100644 index 0000000..c31c5c6 --- /dev/null +++ b/presets/factory/bank_5/preset_0.json @@ -0,0 +1,85 @@ +{ + "name": "Midwest Emo \u2014 Never Meant", + "bank": 5, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.25, + "ratio": 0.03, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.6, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_5/preset_1.json b/presets/factory/bank_5/preset_1.json new file mode 100644 index 0000000..9e6b37e --- /dev/null +++ b/presets/factory/bank_5/preset_1.json @@ -0,0 +1,86 @@ +{ + "name": "Midwest Emo \u2014 Tapping", + "bank": 5, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Vox_AC15_TopBoost.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/boutique-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.2, + "ratio": 0.05, + "gain": 0.45 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "time": 0.3, + "feedback": 0.15, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_5/preset_2.json b/presets/factory/bank_5/preset_2.json new file mode 100644 index 0000000..7fe59f6 --- /dev/null +++ b/presets/factory/bank_5/preset_2.json @@ -0,0 +1,85 @@ +{ + "name": "Midwest Emo \u2014 CSTVT", + "bank": 5, + "program": 2, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "chorus", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.4, + "depth": 0.25, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.4, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_5/preset_3.json b/presets/factory/bank_5/preset_3.json new file mode 100644 index 0000000..b731b77 --- /dev/null +++ b/presets/factory/bank_5/preset_3.json @@ -0,0 +1,85 @@ +{ + "name": "Midwest Emo \u2014 Home", + "bank": 5, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/jazz-1x15.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.7, + "mix": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "time": 0.6, + "feedback": 0.3, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_6/bank.json b/presets/factory/bank_6/bank.json new file mode 100644 index 0000000..4955028 --- /dev/null +++ b/presets/factory/bank_6/bank.json @@ -0,0 +1,5 @@ +{ + "number": 6, + "name": "Djent", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_6/preset_0.json b/presets/factory/bank_6/preset_0.json new file mode 100644 index 0000000..2b6014d --- /dev/null +++ b/presets/factory/bank_6/preset_0.json @@ -0,0 +1,84 @@ +{ + "name": "Djent \u2014 Bleed", + "bank": 6, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/modern-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.2, + "tone": 0.2, + "level": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.03 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_6/preset_1.json b/presets/factory/bank_6/preset_1.json new file mode 100644 index 0000000..c84432c --- /dev/null +++ b/presets/factory/bank_6/preset_1.json @@ -0,0 +1,84 @@ +{ + "name": "Djent \u2014 Scarlet", + "bank": 6, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_EOB.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/modern-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.4, + "tone": 0.15, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.05 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_6/preset_2.json b/presets/factory/bank_6/preset_2.json new file mode 100644 index 0000000..7b4d124 --- /dev/null +++ b/presets/factory/bank_6/preset_2.json @@ -0,0 +1,85 @@ +{ + "name": "Djent \u2014 Clean Djent", + "bank": 6, + "program": 2, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Vox_AC15_TopBoost.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/boutique-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 0.04, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.6, + "mix": 0.4 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_6/preset_3.json b/presets/factory/bank_6/preset_3.json new file mode 100644 index 0000000..bc285d8 --- /dev/null +++ b/presets/factory/bank_6/preset_3.json @@ -0,0 +1,84 @@ +{ + "name": "Djent \u2014 Thall", + "bank": 6, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/modern-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.45, + "tone": 0.2, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.05 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_7/bank.json b/presets/factory/bank_7/bank.json new file mode 100644 index 0000000..714a617 --- /dev/null +++ b/presets/factory/bank_7/bank.json @@ -0,0 +1,5 @@ +{ + "number": 7, + "name": "Acoustic", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_7/preset_0.json b/presets/factory/bank_7/preset_0.json new file mode 100644 index 0000000..a480fc9 --- /dev/null +++ b/presets/factory/bank_7/preset_0.json @@ -0,0 +1,52 @@ +{ + "name": "Acoustic \u2014 Natural", + "bank": 7, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.3, + "mix": 0.15 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_7/preset_1.json b/presets/factory/bank_7/preset_1.json new file mode 100644 index 0000000..00deec5 --- /dev/null +++ b/presets/factory/bank_7/preset_1.json @@ -0,0 +1,64 @@ +{ + "name": "Acoustic \u2014 Fingerstyle", + "bank": 7, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.3, + "ratio": 0.03, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.4, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_7/preset_2.json b/presets/factory/bank_7/preset_2.json new file mode 100644 index 0000000..dab6fd6 --- /dev/null +++ b/presets/factory/bank_7/preset_2.json @@ -0,0 +1,53 @@ +{ + "name": "Acoustic \u2014 Strum", + "bank": 7, + "program": 2, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.2, + "ratio": 0.04, + "gain": 0.55 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_7/preset_3.json b/presets/factory/bank_7/preset_3.json new file mode 100644 index 0000000..b40a02a --- /dev/null +++ b/presets/factory/bank_7/preset_3.json @@ -0,0 +1,64 @@ +{ + "name": "Acoustic \u2014 Ambient Pick", + "bank": 7, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "time": 0.4, + "feedback": 0.2, + "mix": 0.25 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.5, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_8/bank.json b/presets/factory/bank_8/bank.json new file mode 100644 index 0000000..f7a2983 --- /dev/null +++ b/presets/factory/bank_8/bank.json @@ -0,0 +1,5 @@ +{ + "number": 8, + "name": "Grunge", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_8/preset_0.json b/presets/factory/bank_8/preset_0.json new file mode 100644 index 0000000..9ee2455 --- /dev/null +++ b/presets/factory/bank_8/preset_0.json @@ -0,0 +1,86 @@ +{ + "name": "Grunge \u2014 Smells Like", + "bank": 8, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "distortion", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.5, + "tone": 0.4, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "fuzz", + "enabled": true, + "bypass": false, + "params": { + "fuzz": 0.4, + "tone": 0.5, + "level": 0.6 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_8/preset_1.json b/presets/factory/bank_8/preset_1.json new file mode 100644 index 0000000..6fddf75 --- /dev/null +++ b/presets/factory/bank_8/preset_1.json @@ -0,0 +1,86 @@ +{ + "name": "Grunge \u2014 Outshined", + "bank": 8, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "fuzz", + "enabled": true, + "bypass": false, + "params": { + "fuzz": 0.7, + "tone": 0.3, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "chorus", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.25, + "depth": 0.35, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_8/preset_2.json b/presets/factory/bank_8/preset_2.json new file mode 100644 index 0000000..95453c2 --- /dev/null +++ b/presets/factory/bank_8/preset_2.json @@ -0,0 +1,86 @@ +{ + "name": "Grunge \u2014 Man In Box", + "bank": 8, + "program": 2, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/vintage-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.55, + "tone": 0.35, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "delay", + "enabled": true, + "bypass": false, + "params": { + "time": 0.4, + "feedback": 0.2, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_8/preset_3.json b/presets/factory/bank_8/preset_3.json new file mode 100644 index 0000000..07a897f --- /dev/null +++ b/presets/factory/bank_8/preset_3.json @@ -0,0 +1,85 @@ +{ + "name": "Grunge \u2014 Even Flow", + "bank": 8, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.4, + "tone": 0.5, + "level": 0.65 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.3, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_9/bank.json b/presets/factory/bank_9/bank.json new file mode 100644 index 0000000..1cd667e --- /dev/null +++ b/presets/factory/bank_9/bank.json @@ -0,0 +1,5 @@ +{ + "number": 9, + "name": "Alternative Rock", + "preset_count": 4 +} \ No newline at end of file diff --git a/presets/factory/bank_9/preset_0.json b/presets/factory/bank_9/preset_0.json new file mode 100644 index 0000000..d436b92 --- /dev/null +++ b/presets/factory/bank_9/preset_0.json @@ -0,0 +1,85 @@ +{ + "name": "Alternative Rock \u2014 Creep", + "bank": 9, + "program": 0, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_TwinVerb_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "compressor", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.35, + "ratio": 0.03, + "gain": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.5, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_9/preset_1.json b/presets/factory/bank_9/preset_1.json new file mode 100644 index 0000000..d5f9463 --- /dev/null +++ b/presets/factory/bank_9/preset_1.json @@ -0,0 +1,86 @@ +{ + "name": "Alternative Rock \u2014 1979", + "bank": 9, + "program": 1, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/JCM2000_Crunch.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/british-4x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "fuzz", + "enabled": true, + "bypass": false, + "params": { + "fuzz": 0.6, + "tone": 0.35, + "level": 0.7 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "chorus", + "enabled": true, + "bypass": false, + "params": { + "rate": 0.3, + "depth": 0.4, + "mix": 0.3 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_9/preset_2.json b/presets/factory/bank_9/preset_2.json new file mode 100644 index 0000000..14ede03 --- /dev/null +++ b/presets/factory/bank_9/preset_2.json @@ -0,0 +1,85 @@ +{ + "name": "Alternative Rock \u2014 Where Is My Mind", + "bank": 9, + "program": 2, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Fender_Princeton_Clone_Clean.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/vintage-1x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.35, + "tone": 0.45, + "level": 0.65 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "reverb", + "enabled": true, + "bypass": false, + "params": { + "decay": 0.35, + "mix": 0.2 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/bank_9/preset_3.json b/presets/factory/bank_9/preset_3.json new file mode 100644 index 0000000..3cbd7b6 --- /dev/null +++ b/presets/factory/bank_9/preset_3.json @@ -0,0 +1,74 @@ +{ + "name": "Alternative Rock \u2014 Buddy Holly", + "bank": 9, + "program": 3, + "master_volume": 0.78, + "chain": [ + { + "fx_type": "noise_gate", + "enabled": true, + "bypass": false, + "params": { + "threshold": 0.01 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "nam_amp", + "enabled": true, + "bypass": false, + "params": { + "level": 0.75 + }, + "nam_model_path": "/root/.pedal/models/Vox_AC15_TopBoost.nam", + "ir_file_path": "" + }, + { + "fx_type": "ir_cab", + "enabled": true, + "bypass": false, + "params": { + "wet": 1.0, + "dry": 0.0 + }, + "nam_model_path": "", + "ir_file_path": "/root/.pedal/irs/american-2x12.wav" + }, + { + "fx_type": "eq", + "enabled": true, + "bypass": false, + "params": { + "bass": 0.5, + "mid": 0.5, + "treble": 0.5 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "overdrive", + "enabled": true, + "bypass": false, + "params": { + "drive": 0.3, + "tone": 0.55, + "level": 0.65 + }, + "nam_model_path": "", + "ir_file_path": "" + }, + { + "fx_type": "volume", + "enabled": true, + "bypass": false, + "params": { + "level": 0.82 + }, + "nam_model_path": "", + "ir_file_path": "" + } + ], + "midi_mappings": {} +} \ No newline at end of file diff --git a/presets/factory/irs/README.md b/presets/factory/irs/README.md deleted file mode 100644 index fc8f539..0000000 --- a/presets/factory/irs/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Pi Multi-FX Pedal — Default Cabinet IR Files - -Synthetic impulse responses (.wav) for guitar cabinet simulation. -Generated using DSP filter cascades (Butterworth LP/HP + parametric -peak/notch filters + exponential decay envelope). - -**All IRs are 48kHz, 16-bit mono WAV files.** - -| File | Cabinet Model | Taps | Length | Description | -|------|--------------|------|--------|-------------| -| `vintage-1x12.wav` | Vintage 1x12 — Fender-style Open Back | 2048 | 43ms | Warm, scooped cleans with bell-like top end. Models a Fender-style 1x12 open-back combo. | -| `british-4x12.wav` | British 4x12 — Marshall-style Closed Back | 4096 | 85ms | Mid-forward, aggressive rock tones with tight low end. Models a Marshall 1960A-style 4x12 closed-back cabinet. | -| `american-2x12.wav` | American 2x12 — Vox-style Open Back | 2048 | 43ms | Chimey, complex midrange with sparkling highs. Models a Vox AC30-style 2x12 open-back cabinet. | -| `modern-4x12.wav` | Modern 4x12 — Mesa/Boogie-style Closed Back | 4096 | 85ms | Tight low-end, aggressive mids, smooth highs. Models a Mesa Rectifier-style 4x12 closed-back cab. | -| `jazz-1x15.wav` | Jazz 1x15 — Deep Open Back | 2048 | 43ms | Deep, warm, scooped tone for jazz cleans. Models a 15-inch speaker in a large open-back cab. | -| `boutique-1x12.wav` | Boutique 1x12 — Dumble-style Open Back | 2048 | 43ms | Smooth, rounded cleans with enhanced mid complexity. Models a Dumble-style 1x12 open-back combo. | -| `mini-1x8.wav` | Mini 1x8 — Small Practice Amp | 1024 | 21ms | Lo-fi, boxy tone for vintage radio-style sounds. Models a small 8-inch practice amp speaker. | - -## Usage - -These IRs are loaded by the `IRLoader` class through the pedal's cab simulation. -Place them in `~/.pedal/irs/` or reference them by absolute path in preset chain blocks. - -## Replacement - -Replace any `.wav` file with a real captured IR (48kHz, 16-bit mono) to -upgrade from synthetic to authentic cabinet tone. The pedal treats all -`.wav` files in the IR directory identically. - -## Cabinet Type Guide - -- **Vintage 1x12** — Fender Deluxe / Princeton-style cleans. Scooped mids, warm lows. -- **British 4x12** — Marshall 1960 / JCM-style crunch and rock. Mid-forward, aggressive. -- **American 2x12** — Vox AC30-style chime. Complex mids, sparkling treble. -- **Modern 4x12** — Mesa Rectifier-style high gain. Tight lows, smooth highs. -- **Jazz 1x15** — Polytone / Henriksen-style jazz. Deep lows, scooped mids. -- **Boutique 1x12** — Dumble / Two-Rock-style. Smooth, complex midrange. -- **Mini 1x8** — Small practice amp. Boxy, lo-fi, vintage radio tone. diff --git a/scripts/download_nam_and_irs.py b/scripts/download_nam_and_irs.py new file mode 100644 index 0000000..9da852e --- /dev/null +++ b/scripts/download_nam_and_irs.py @@ -0,0 +1,508 @@ +#!/usr/bin/env python3 +"""Download NAM WaveNet models from community collection + cabinet IRs. + +Downloads real NAM amp captures from the pelennor2170/NAM_models GitHub +repository and free cabinet IR packs from Archive.org. + +Usage: + python3 scripts/download_nam_and_irs.py # Download everything + python3 scripts/download_nam_and_irs.py --list # List models only + python3 scripts/download_nam_and_irs.py --models # Models only + python3 scripts/download_nam_and_irs.py --irs # IRs only +""" + +import json +import os +import subprocess +import sys +import urllib.parse +import urllib.request +from pathlib import Path + +# ── Paths ──────────────────────────────────────────────────────────────── +NAM_DIR = Path.home() / ".pedal" / "models" +IR_DIR = Path.home() / ".pedal" / "irs" +BASE_URL = "https://raw.githubusercontent.com/pelennor2170/NAM_models/main" + +# ── Model definitions ──────────────────────────────────────────────────── +# (local_name, remote_name, description, architecture, size_kb) +# URL for Tone3000 (ToneHunt) Supabase storage downloads +TONE3000_STORAGE = "https://api.tone3000.com/storage/v1/object/public/models" + +MODELS = [ + # ── Bank 0: Clean & Edge ────────────────────────────────────────── + ("Fender_TwinVerb_Clean.nam", + "Tim R Fender TwinVerb Norm Bright.nam", + "Fender Twin Reverb Normal Bright — clean jazz/fingerstyle", + "WaveNet", 400), + ("Fender_TwinVerb_Vibrato.nam", + "Tim R Fender TwinVerb Vibrato Bright.nam", + "Fender Twin Reverb Vibrato Bright — sparkling clean", + "WaveNet", 400), + ("Vox_AC15_TopBoost.nam", + "Phillipe P VOXAC15-TopBoost.nam", + "Vox AC15 Top Boost — chimey edge-of-breakup", + "WaveNet", 400), + ("Magnatone_Super59_Pushed.nam", + "Tim R Magnatone Super 59 Mkii Pushed.nam", + "Magnatone Super 59 pushed — bluesy breakup", + "WaveNet", 400), + ("JCM2000_Clean.nam", + "Tim R JCM2000 Clean.nam", + "Marshall JCM2000 clean — crisp rhythm", + "WaveNet", 400), + + # ── Bank 1: Drive & Lead ────────────────────────────────────────── + ("Orange_Rockerverb.nam", + "Tom C Axe FX 2 Orange Rockerverb.nam", + "Orange Rockerverb — classic rock crunch", + "WaveNet", 400), + ("JCM2000_Crunch.nam", + "Tim R JCM2000 Crunch.nam", + "Marshall JCM2000 crunch — hard rock rhythm", + "WaveNet", 400), + ("JCM900_Lead.nam", + "Tim R JCM90050WDualVerbCHAG6.nam", + "Marshall JCM900 Dual Verb ch.A gain6 — lead", + "WaveNet", 400), + ("5150_BlockLetter_Boosted.nam", + "Helga B 5150 BlockLetter - Boosted.nam", + "EVH 5150 Block Letter boosted — high-gain lead", + "WaveNet", 400), + ("6505_Red_NoBoost.nam", + "Helga B 6505+ Red ch - NoBoost.nam", + "Peavey 6505+ Red ch no boost — metal rhythm", + "WaveNet", 400), + ("Engl_Savage.nam", + "Tom C Axe FX 2 Engl Savage.nam", + "ENGL Savage 120 — modern high-gain lead", + "WaveNet", 400), + ("Splawn_ProMod_3rd.nam", + "Tim R Splawn Pro Mod 3rd Gear - G12.nam", + "Splawn Pro Mod 3rd gear — tight high-gain", + "WaveNet", 400), + ("5152_Lead_TS9.nam", + "Tim R 5152 Lead + TS9.nam", + "5152 Lead with Tube Screamer — boosted solo", + "WaveNet", 400), + + # ── Pedal captures ─────────────────────────────────────────────── + ("Klon_Centaur_High.nam", + "Keith B Klone_plus_BB_highGain.nam", + "Klon Centaur-style OD high gain — boost/overdrive", + "WaveNet", 400), + ("TubeScreamer_Maxed.nam", + "Tudor N Ibanez Tube Screamer Mini Tone@10_Level@10_Overdrive@0 ESR_0.0006_lite.nam", + "Ibanez TS808 Mini maxed — clean boost", + "WaveNet", 200), + ("Mesa_MarkIV_Lead.nam", + "Roman A LT_MESA_MARKIV_1.nam", + "Mesa Boogie Mark IV lead — singing sustain", + "WaveNet", 400), + ("Bogner_Ecstasy.nam", + "Tudor N Ceriatone Molecular 50.nam", + "Bogner Ecstasy-style — versatile OD range", + "WaveNet", 400), + + # ── Feather models (93 KB, ultra-low CPU) ──────────────────────── + ("BOSS_SD1_Feather.nam", + "Phillipe P BOSS-SD1-Feather-ESR0,001.nam", + "BOSS SD-1 overdrive feather — 93 KB", + "WaveNet", 93), + ("MXR_M77_Feather.nam", + "Phillipe P MXR-M77-Feather-ESR0,001.nam", + "MXR M77 Custom Badass OD feather — 93 KB", + "WaveNet", 93), + ("TS808_Feather.nam", + "Phillipe P Maxon-OD808-Feather-ESR0,001.nam", + "Maxon OD808 Tube Screamer feather — 93 KB", + "WaveNet", 93), + ("Precision_Drive_Feather.nam", + "Phillipe P Precision-Drive-Feather-ESR0,001.nam", + "Precision Drive overdrive feather — 93 KB", + "WaveNet", 93), + ("Friedman_PowerAmp_Feather.nam", + "Sascha S FriedmanDSM_PowerAmpEL84_MV10_feather.nam", + "Friedman DSM power amp feather — 93 KB", + "WaveNet", 93), + + # ── Bank 2: Blues (Tone3000 captures — clean, edge-of-breakup, pushed) ─ + # Downloaded from ToneHunt / Tone3000 Supabase storage. These are real + # amp captures of classic blues tones: Fender Princeton, Tweed Deluxe, + # Twin Reverb, Dumble ODS, Two-Rock, Marshall Bluesbreaker. + # Format: (local_name, tone3000_storage_key, description, architecture, size_kb) + ("Fender_Princeton_Clone_Clean.nam", + "4f81e2b088149c04.nam", + "Fender Hand-wired Princeton Clone Clean — blues clean (WaveNet A1, 289 KB)", + "WaveNet", 289), + ("Fender_Princeton_Clone_EOB.nam", + "68a5f3484e1759ed_a2.nam", + "Fender Hand-wired Princeton Clone Edge-of-Breakup — blues edge (Slimmable A2, 288 KB)", + "SlimmableContainer", 288), + ("Fender_Tweed_Dlx_Edge.nam", + "ga5rj9sxlnk.nam", + "Fender Tweed Deluxe The Edge (Celestion Blue) — pushed clean (Slimmable A2, 288 KB)", + "SlimmableContainer", 288), + ("Fender_Twin_Reverb_Clean_A2.nam", + "tg81uadutjo_a2.nam", + "Fender Twin Reverb Clean — sparkling blues clean (Slimmable A2, 290 KB)", + "SlimmableContainer", 290), + ("TwoRock_JTM_Signature.nam", + "qj3hkgbcwb9.nam", + "Two-Rock John Mayer Signature Prototype — clean/edge bloom (WaveNet A1, 276 KB)", + "WaveNet", 276), + ("Dumble_ODS_102_Rock_A1.nam", + "5bac98f136812852.nam", + "Dumble ODS #102 Clone Rock setting — pushed blues overdrive (WaveNet A1, 87 KB feather)", + "WaveNet", 87), + ("Dumble_ODS_102_Rock_A2.nam", + "5bac98f136812852_a2.nam", + "Dumble ODS #102 Clone Rock setting — pushed blues OD (Slimmable A2, 289 KB)", + "SlimmableContainer", 289), + ("Marshall_Bluesbreaker_1962_A2.nam", + "bbc41ecccdc730fb_a2.nam", + "Marshall Bluesbreaker 1962 — classic blues rock (Slimmable A2, 289 KB)", + "SlimmableContainer", 289), + ("Marshall_Bluesbreaker_Pedal.nam", + "31aeae1256b36839.nam", + "Marshall Bluesbreaker Pedal (Original) Setting 1 — pedal OD (WaveNet A1, 290 KB)", + "WaveNet", 290), + + + # ── Bank 7: Bass, Orange & Others (Tone3000 A2 — SlimmableContainer) ──── + # Downloaded from Tone3000 Supabase storage. Covers missing categories: + # Bass (Ampeg, Aguilar, GK), Orange Rocker 30, Fender Bassman, + # Hiwatt DR103, Supro Black Magick. + ("Ampeg_PF20T_A2.nam", + "db2c43e99cfc346d_a2.nam", + "Ampeg PF20T — clean bass tube amp (Slimmable A2, 288 KB)", + "SlimmableContainer", 288), + ("Aguilar_Tone_Hammer_500_A2.nam", + "38rdhwzk3hp_a2.nam", + "Aguilar Tone Hammer 500 — modern bass preamp (Slimmable A2, 293 KB)", + "SlimmableContainer", 293), + ("GK_800RB_Line_A2.nam", + "ce68ccd373a10054_a2.nam", + "Gallien-Krueger 800RB — classic bass solid-state (Slimmable A2, 295 KB)", + "SlimmableContainer", 295), + ("Aguilar_DB751_Cab_A2.nam", + "lage0x4ybk_a2.nam", + "Aguilar DB751 — bass amp DI (Slimmable A2, 292 KB)", + "SlimmableContainer", 292), + ("Orange_Rocker30_Dirty_A2.nam", + "8491c70c3771de1e_a2.nam", + "Orange Rocker 30 Dirty — classic rock crunch (Slimmable A2, 295 KB)", + "SlimmableContainer", 295), + ("Orange_Rocker30_Natural_A2.nam", + "a60ed1a1aa0c2c0f_a2.nam", + "Orange Rocker 30 Natural — clean edge (Slimmable A2, 289 KB)", + "SlimmableContainer", 289), + ("Fender_Bassman_Dimed_A2.nam", + "0a9223a9f1c879d5_a2.nam", + "Fender Bassman dimed — blues/rock breakup (Slimmable A2, 289 KB)", + "SlimmableContainer", 289), + ("Hiwatt_DR103_Bright_A2.nam", + "0c46e5a7db1cce48_a2.nam", + "Hiwatt DR-103 Bright Normal — prog/classic rock (Slimmable A2, 287 KB)", + "SlimmableContainer", 287), + ("Hiwatt_DR103_Cornish_A2.nam", + "ynk0h2e2tph.nam", + "Hiwatt DR103 + Cornish PGS — boosted prog rock (Slimmable A2, 288 KB)", + "SlimmableContainer", 288), + ("Supro_Black_Magick_M3_A2.nam", + "c90a6d8ee0c0a689_a2.nam", + "Supro Black Magick M3 — garage/blues (Slimmable A2, 288 KB)", + "SlimmableContainer", 288), +] + +# ── IR Pack definitions ────────────────────────────────────────────────── +IR_PACKS = [ + ("God's Cab", + "https://archive.org/download/godscab-ir-pack/GodsCab_IR_Pack.zip", + "godscab.zip", + "100+ cabinet IRs (412, 1960, V30, Greenback, etc.) — CC0 / Public Domain"), + ("Seacow Cabs", + "https://archive.org/download/seacow-cabs-free-ir-2023/Seacow_Cabs_Free_IRs_2023.zip", + "seacow.zip", + "Boutique cab IR pack, 15+ cabs — Free for personal use"), +] + + +def info(msg): print(f"\033[0;36m[INFO]\033[0m {msg}") +def ok(msg): print(f"\033[0;32m[OK]\033[0m {msg}") +def warn(msg): print(f"\033[1;33m[WARN]\033[0m {msg}") +def err(msg): print(f"\033[0;31m[ERR]\033[0m {msg}", file=sys.stderr) + + +def download_file(url: str, dest: Path, max_size_mb: int = 50) -> bool: + """Download a file from url to dest. Returns True on success.""" + try: + req = urllib.request.Request(url, headers={"User-Agent": "pedal-downloader/1.0"}) + with urllib.request.urlopen(req, timeout=30) as src: + data = src.read() + size_mb = len(data) / (1024 * 1024) + if size_mb > max_size_mb: + err(f"File too large ({size_mb:.1f} MB, max {max_size_mb} MB)") + return False + if len(data) < 1000: + err(f"File too small ({len(data)} bytes)") + return False + dest.write_bytes(data) + return True + except Exception as e: + err(f"Download failed: {e}") + return False + + +def download_model(local_name: str, remote_name: str, desc: str, arch: str, size: int) -> bool: + """Download a single NAM model file from GitHub.""" + outfile = NAM_DIR / local_name + + if outfile.exists() and outfile.stat().st_size > 1000: + ok(f"SKIP {local_name} (already exists, {outfile.stat().st_size // 1024} KB)") + return True + + # URL-encode the remote filename + encoded = urllib.parse.quote(remote_name) + url = f"{BASE_URL}/{encoded}" + + info(f"DL {local_name} ({desc})") + if download_file(url, outfile): + # Verify it's valid JSON (.nam format) + try: + data = json.loads(outfile.read_text()) + actual_arch = data.get("architecture", "?") + actual_ver = data.get("version", "?") + ok(f"Downloaded {local_name} ({outfile.stat().st_size // 1024} KB, {actual_arch} v{actual_ver})") + return True + except json.JSONDecodeError as e: + err(f"Invalid .nam file (not valid JSON): {e}") + outfile.unlink(missing_ok=True) + return False + else: + err(f"Failed to download {local_name}") + return False + + +def _discover_tone3000_key() -> str: + """Discover the Supabase anon key from Tone3000 website JS bundles.""" + try: + req = urllib.request.Request( + "https://tone3000.com", + headers={"User-Agent": "Mozilla/5.0 (compatible; pedal-downloader/1.0)"}, + ) + with urllib.request.urlopen(req, timeout=15) as resp: + html = resp.read().decode("utf-8", errors="replace") + import re + chunk_urls = set() + for m in re.finditer(r'src="([^"]*\.js[^"]*)"', html): + url = m.group(1) + if url.startswith("/"): + url = "https://tone3000.com" + url + chunk_urls.add(url) + for chunk_url in sorted(chunk_urls)[:15]: + try: + req2 = urllib.request.Request(chunk_url, headers={"User-Agent": "Mozilla/5.0"}) + with urllib.request.urlopen(req2, timeout=10) as resp2: + js = resp2.read().decode("utf-8", errors="replace") + m = re.search( + r'createBrowserClient\s*\)\s*\(\s*["\']https?://api\.tone3000\.com["\']\s*,\s*["\']([^"\']+)["\']', + js, + ) + if m: + key = m.group(1) + if key.startswith("eyJ") and key.count(".") >= 2: + return key + for m2 in re.finditer( + r'["\'](eyJ[a-zA-Z0-9_\-]{20,}\.[a-zA-Z0-9_\-]{20,}\.[a-zA-Z0-9_\-]{10,})["\']', js + ): + key = m2.group(1) + if key.count(".") >= 2: + return key + except Exception: + continue + except Exception: + pass + return "" + + +def download_tone3000_model(local_name: str, storage_key: str, desc: str, arch: str, size: int) -> bool: + """Download a single NAM model file from Tone3000 Supabase storage.""" + outfile = NAM_DIR / local_name + + if outfile.exists() and outfile.stat().st_size > 1000: + ok(f"SKIP {local_name} (already exists, {outfile.stat().st_size // 1024} KB)") + return True + + url = f"{TONE3000_STORAGE}/{storage_key}" + + info(f"DL {local_name} ({desc})") + req = urllib.request.Request(url, headers={"User-Agent": "pedal-downloader/1.0"}) + try: + with urllib.request.urlopen(req, timeout=30) as src: + data = src.read() + except Exception as e: + err(f"Download failed: {e}") + # Try with anon key (some storage buckets require authentication) + try: + anon_key = _discover_tone3000_key() + if anon_key: + req = urllib.request.Request(url, headers={ + "User-Agent": "pedal-downloader/1.0", + "Authorization": f"Bearer {anon_key}", + }) + with urllib.request.urlopen(req, timeout=30) as src: + data = src.read() + else: + return False + except Exception as e2: + err(f"Download failed even with auth: {e2}") + return False + + size_mb = len(data) / (1024 * 1024) + if size_mb > 50: + err(f"File too large ({size_mb:.1f} MB, max 50 MB)") + return False + if len(data) < 1000: + err(f"File too small ({len(data)} bytes)") + return False + outfile.write_bytes(data) + + # Verify + try: + model_data = json.loads(data) + actual_arch = model_data.get("architecture", "?") + actual_ver = model_data.get("version", "?") + ok(f"Downloaded {local_name} ({outfile.stat().st_size // 1024} KB, {actual_arch} v{actual_ver})") + return True + except json.JSONDecodeError as e: + err(f"Invalid .nam file (not valid JSON): {e}") + outfile.unlink(missing_ok=True) + return False + + +def download_models(): + """Download all NAM models (GitHub + Tone3000).""" + print(f"\n\033[0;36mDownloading {len(MODELS)} NAM models to {NAM_DIR}\033[0m") + print(f"\033[0;36m{'━' * 60}\033[0m") + NAM_DIR.mkdir(parents=True, exist_ok=True) + + success = 0 + fail = 0 + + for local_name, remote_name, desc, arch, size in MODELS: + # Detect Tone3000 storage key (short, no dots, no spaces) + if " " not in remote_name and "." not in remote_name and len(remote_name) < 64: + if download_tone3000_model(local_name, remote_name, desc, arch, size): + success += 1 + else: + fail += 1 + else: + if download_model(local_name, remote_name, desc, arch, size): + success += 1 + else: + fail += 1 + + print(f"\n Models: {success} successful, {fail} failed") + return fail + + +def download_irs(): + """Download IR packs from Archive.org.""" + print(f"\n\033[0;36mDownloading IR packs to {IR_DIR}\033[0m") + print(f"\033[0;36m{'━' * 60}\033[0m") + IR_DIR.mkdir(parents=True, exist_ok=True) + + success = 0 + fail = 0 + + for name, url, fname, desc in IR_PACKS: + # Check if already extracted + wav_count = len(list(IR_DIR.rglob("*.wav"))) + if wav_count > 10: + ok(f"SKIP {name} ({wav_count} .wav files already present)") + success += 1 + continue + + dest = IR_DIR / fname + info(f"Downloading {name}...") + info(f" Source: {url}") + + if download_file(url, dest, max_size_mb=200): + size_mb = dest.stat().st_size / (1024 * 1024) + ok(f"Downloaded {fname} ({size_mb:.1f} MB)") + + # Extract ZIP + import zipfile + try: + with zipfile.ZipFile(dest, "r") as zf: + zf.extractall(IR_DIR) + dest.unlink() + wav_count = len(list(IR_DIR.rglob("*.wav"))) + ok(f"Extracted to {IR_DIR}/ ({wav_count} .wav files)") + success += 1 + except zipfile.BadZipFile: + warn(f"Bad ZIP — saved at {dest}") + fail += 1 + else: + err(f"Failed to download {name}") + fail += 1 + + print(f"\n IR packs: {success} downloaded, {fail} failed") + wav_count = len(list(IR_DIR.rglob("*.wav"))) + info(f"Total .wav IR files: {wav_count}") + return fail + + +def list_models(): + """Print model listing.""" + print(f"\n\033[0;36mNAM Models by Genre:\033[0m") + print(f"\033[0;36m{'━' * 60}\033[0m") + for local_name, remote_name, desc, arch, size in MODELS: + print(f" {local_name:35s} {desc}") + print(f" {'':35s} ({arch}, ~{size} KB)") + print() + + print(f"\nTotal: {len(MODELS)} models") + + # Count existing files + nam_count = len(list(NAM_DIR.glob("*.nam"))) + ir_count = len(list(IR_DIR.rglob("*.wav"))) + print(f"\n Models in {NAM_DIR}: {nam_count}") + print(f" IRs in {IR_DIR}: {ir_count}") + + +def main(): + # Also check ~/.pedal/nam/ legacy location + NAM_DIR.mkdir(parents=True, exist_ok=True) + IR_DIR.mkdir(parents=True, exist_ok=True) + + arg = sys.argv[1] if len(sys.argv) > 1 else "--all" + + if arg == "--list": + list_models() + elif arg == "--models": + exit(download_models()) + elif arg == "--irs": + exit(download_irs()) + elif arg == "--all": + fail = download_models() + download_irs() + + # Summary + nam_count = len(list(NAM_DIR.glob("*.nam"))) + ir_count = len(list(IR_DIR.rglob("*.wav"))) + print(f"\n\033[0;32m{'╔' + '═' * 56 + '╗'}\033[0m") + print(f"\033[0;32m║ Download complete!{' ' * 36}║\033[0m") + print(f"\033[0;32m{'╚' + '═' * 56 + '╝'}\033[0m") + print() + print(f" Models: {nam_count} .nam files in {NAM_DIR}") + print(f" IRs: {ir_count} .wav files in {IR_DIR}") + exit(fail) + else: + print(f"Usage: {sys.argv[0]} [--list|--models|--irs|--all]") + exit(1) + + +if __name__ == "__main__": + main() diff --git a/scripts/download_nam_and_irs.sh b/scripts/download_nam_and_irs.sh new file mode 100755 index 0000000..c448f73 --- /dev/null +++ b/scripts/download_nam_and_irs.sh @@ -0,0 +1,371 @@ +#!/usr/bin/env bash +# ── NAM Model & Cabinet IR Downloader ───────────────────────────────── +# +# Downloads real NAM amp captures (WaveNet/architecture=2) from the +# pelennor2170/NAM_models community collection on GitHub, plus free +# cabinet IR packs from Archive.org. +# +# Models are organized by genre to match the factory presets: +# Bank 0 — Clean & Edge (Clean Jazz, Edge of Breakup, Clean w/ Chorus, Dynamic Fingerstyle) +# Bank 1 — Drive & Lead (Classic Rock, Lead Solo, Metal Rhythm, Ambient Wash) +# Bank 2 — FX Bench (reference presets) +# +# Usage: +# ./scripts/download_nam_and_irs.sh # Download everything +# ./scripts/download_nam_and_irs.sh --list # List what would be downloaded +# ./scripts/download_nam_and_irs.sh --models # Models only +# ./scripts/download_nam_and_irs.sh --irs # IRs only +# +# Environment: +# NAM_DIR: target directory for .nam files (default: ~/.pedal/models) +# IR_DIR: target directory for .wav IRs (default: ~/.pedal/irs) +# +# ────────────────────────────────────────────────────────────────────── + +set -euo pipefail + +NAM_DIR="${NAM_DIR:-$HOME/.pedal/models}" +IR_DIR="${IR_DIR:-$HOME/.pedal/irs}" +TMPDIR="${TMPDIR:-/tmp}/pedal-download-$$" +BASE_URL="https://raw.githubusercontent.com/pelennor2170/NAM_models/main" + +# ── Colours ────────────────────────────────────────────────────────── +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +CYAN='\033[0;36m' +NC='\033[0m' + +info() { echo -e "${CYAN}[INFO]${NC} $*"; } +ok() { echo -e "${GREEN}[OK]${NC} $*"; } +warn() { echo -e "${YELLOW}[WARN]${NC} $*"; } +err() { echo -e "${RED}[ERR]${NC} $*" >&2; } + +# ── NAM Models by Genre ────────────────────────────────────────────── +# +# Format: "local_filename|github_filename|description|architecture|size_kb" +# All are WaveNet models from the community capture collection. +# +# GENRE MAP (matching factory presets): +# Clean Jazz, Dynamic Fingerstyle → Fender Twin, Vox AC15 cleans +# Edge of Breakup → Magnatone pushed, JCM2000 crunch +# Clean with Chorus → Fender Twin clean +# Classic Rock → Orange Rockerverb, JCM2000, JCM900 +# Lead Solo → 5150, Engl Savage +# Metal Rhythm → 5150, Splawn +# Ambient Wash → Fender Twin clean (with reverb/mod FX) +# + +declare -a MODELS=() + +# ── Bank 0: Clean & Edge ───────────────────────────────────────────── + +MODELS+=( + "Fender_TwinVerb_Clean.nam|Tim R Fender TwinVerb Norm Bright.nam|Fender Twin Reverb Normal Bright channel — clean jazz/fingerstyle|WaveNet|400" + "Fender_TwinVerb_Vibrato.nam|Tim R Fender TwinVerb Vibrato Bright.nam|Fender Twin Reverb Vibrato Bright channel — sparkling clean|WaveNet|400" + "Vox_AC15_TopBoost.nam|Phillipe P VOXAC15-TopBoost.nam|Vox AC15 Top Boost channel — chimey edge-of-breakup|WaveNet|400" + "Magnatone_Super59_Pushed.nam|Tim R Magnatone Super 59 Mkii Pushed.nam|Magnatone Super 59 pushed — bluesy breakup|WaveNet|400" + "JCM2000_Clean.nam|Tim R JCM2000 Clean.nam|Marshall JCM2000 clean — crisp rhythm|WaveNet|400" +) + +# ── Bank 1: Drive & Lead ───────────────────────────────────────────── + +MODELS+=( + "Orange_Rockerverb.nam|Tom C Axe FX 2 Orange Rockerverb.nam|Orange Rockerverb — classic rock crunch|WaveNet|400" + "JCM2000_Crunch.nam|Tim R JCM2000 Crunch.nam|Marshall JCM2000 crunch — hard rock rhythm|WaveNet|400" + "JCM900_Lead.nam|Tim R JCM90050WDualVerbCHAG6.nam|Marshall JCM900 Dual Verb channel A gain 6 — lead|WaveNet|400" + "5150_BlockLetter_Boosted.nam|Helga B 5150 BlockLetter - Boosted.nam|EVH 5150 Block Letter boosted — high-gain lead|WaveNet|400" + "6505_Red_NoBoost.nam|Helga B 6505+ Red ch - NoBoost.nam|Peavey 6505+ Red channel no boost — metal rhythm|WaveNet|400" + "Engl_Savage.nam|Tom C Axe FX 2 Engl Savage.nam|ENGL Savage 120 — modern high-gain lead|WaveNet|400" + "Splawn_ProMod_3rd.nam|Tim R Splawn Pro Mod 3rd Gear - G12.nam|Splawn Pro Mod 3rd gear — tight high-gain|WaveNet|400" + "5152_Lead_TS9.nam|Tim R 5152 Lead + TS9.nam|5152 Lead with Tube Screamer — boosted solo tone|WaveNet|400" +) + +# ── Pedal captures (for FX chain flexibility) ──────────────────────── +# These work as stand-in for the BOOST/OD/DIST blocks or as +# preamp-into-IR tones. + +MODELS+=( + "Klon_Centaur_High.nam|Keith B Klone_plus_BB_highGain.nam|Klon Centaur-style overdrive high gain — boost/overdrive|WaveNet|400" + "TubeScreamer_Maxed.nam|Tudor N Ibanez Tube Screamer Mini Tone@10_Level@10_Overdrive@0 ESR_0.0006_lite.nam|Ibanez TS808 Mini maxed — clean boost|WaveNet|200" + "Mesa_MarkIV_Lead.nam|Roman A LT_MESA_MARKIV_1.nam|Mesa Boogie Mark IV lead — singing sustain|WaveNet|400" + "Bogner_Ecstasy.nam|Tudor N Ceriatone Molecular 50.nam|Bogner Ecstasy-style — versatile overdrive range|WaveNet|400" +) + +# ── Feather models (smallest footprint, best for RPi 4B) ──────────── + +MODELS+=( + "BOSS_SD1_Feather.nam|Phillipe P BOSS-SD1-Feather-ESR0,001.nam|BOSS SD-1 overdrive feather model — 93 KB, ultra-low CPU|WaveNet|93" + "MXR_M77_Feather.nam|Phillipe P MXR-M77-Feather-ESR0,001.nam|MXR M77 Custom Badass OD feather model — 93 KB|WaveNet|93" + "TS808_Feather.nam|Phillipe P Maxon-OD808-Feather-ESR0,001.nam|Maxon OD808 Tube Screamer feather — 93 KB|WaveNet|93" + "Precision_Drive_Feather.nam|Phillipe P Precision-Drive-Feather-ESR0,001.nam|Precision Drive overdrive feather — 93 KB|WaveNet|93" + "Friedman_PowerAmp_Feather.nam|Sascha S FriedmanDSM_PowerAmpEL84_MV10_feather.nam|Friedman DSM power amp feather — 93 KB|WaveNet|93" +) + +# ── Bank 2: Blues (Tone3000 captures — clean, edge-of-breakup, pushed) ── +# Downloaded from ToneHunt/Tone3000 Supabase storage. "remote_name" is the +# storage key (not a filename), which the Python script resolves to a +# Tone3000 storage URL. The shell script downloads these with direct +# Tone3000 storage URLs via curl. +# Covers: Fender Princeton, Tweed Deluxe, Twin Reverb, Dumble ODS, +# Two-Rock, Marshall Bluesbreaker. + +MODELS+=( + "Fender_Princeton_Clone_Clean.nam|4f81e2b088149c04|Fender Hand-wired Princeton Clone Clean — blues clean (WaveNet A1, 289 KB)|WaveNet|289" + "Fender_Princeton_Clone_EOB.nam|68a5f3484e1759ed_a2|Fender Hand-wired Princeton Clone Edge-of-Breakup — blues edge (Slimmable A2, 288 KB)|SlimmableContainer|288" + "Fender_Tweed_Dlx_Edge.nam|ga5rj9sxlnk|Fender Tweed Deluxe The Edge (Celestion Blue) — pushed clean (Slimmable A2, 288 KB)|SlimmableContainer|288" + "Fender_Twin_Reverb_Clean_A2.nam|tg81uadutjo_a2|Fender Twin Reverb Clean — sparkling blues clean (Slimmable A2, 290 KB)|SlimmableContainer|290" + "TwoRock_JTM_Signature.nam|qj3hkgbcwb9|Two-Rock John Mayer Signature Prototype — clean/edge bloom (WaveNet A1, 276 KB)|WaveNet|276" + "Dumble_ODS_102_Rock_A1.nam|5bac98f136812852|Dumble ODS #102 Clone Rock setting — pushed blues overdrive (WaveNet A1, 87 KB feather)|WaveNet|87" + "Dumble_ODS_102_Rock_A2.nam|5bac98f136812852_a2|Dumble ODS #102 Clone Rock setting — pushed blues OD (Slimmable A2, 289 KB)|SlimmableContainer|289" + "Marshall_Bluesbreaker_1962_A2.nam|bbc41ecccdc730fb_a2|Marshall Bluesbreaker 1962 — classic blues rock (Slimmable A2, 289 KB)|SlimmableContainer|289" + "Marshall_Bluesbreaker_Pedal.nam|31aeae1256b36839|Marshall Bluesbreaker Pedal (Original) Setting 1 — pedal OD (WaveNet A1, 290 KB)|WaveNet|290" +) + +# ── Total: 31 models (22 core + 9 blues) ────────────────────────── + +# ── IR Packs ───────────────────────────────────────────────────────── +# Free cabinet IR collections from Archive.org (CC0 / free for personal use) + +declare -a IR_PACKS=( + "God's Cab|https://archive.org/download/godscab-ir-pack/GodsCab_IR_Pack.zip|godscab.zip|100+ cabinet IRs (412, 1960, V30, Greenback, etc.) — CC0 / Public Domain" + "Seacow Cabs|https://archive.org/download/seacow-cabs-free-ir-2023/Seacow_Cabs_Free_IRs_2023.zip|seacow.zip|Boutique cab IR pack, 15+ cabs — Free for personal use" +) + +# ── Helpers ────────────────────────────────────────────────────────── + +_list_models() { + echo -e "\n${CYAN}NAM Models by Genre:${NC}" + echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" + echo "" + + local current_bank="" + for entry in "${MODELS[@]}"; do + IFS='|' read -r local_name remote_name desc arch size <<< "$entry" + printf " %-35s %s\n" "$local_name" "$desc" + printf " %-35s %s\n" "" "($arch, ~${size} KB)" + echo "" + done + + echo -e "${CYAN}Total: ${#MODELS[@]} models${NC}" +} + +_download_model() { + local local_name="$1" remote_name="$2" desc="$3" arch="$4" size="$5" + local outfile="$NAM_DIR/$local_name" + + if [[ -f "$outfile" ]]; then + local existing_size + existing_size=$(stat -c%s "$outfile" 2>/dev/null || echo 0) + if [[ $existing_size -gt 1000 ]]; then + ok "SKIP $local_name (already exists, $(( existing_size / 1024 )) KB)" + return 0 + fi + fi + + info "DL $local_name ($desc)" + + # URL-encode the remote filename for GitHub raw URL + local encoded_name + encoded_name=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$remote_name'))" 2>/dev/null || echo "$remote_name") + local url="$BASE_URL/$encoded_name" + + local http_code + http_code=$(curl -sL -o "$outfile" -w "%{http_code}" --connect-timeout 10 --max-time 60 "$url" 2>/dev/null || echo "000") + + if [[ "$http_code" == "200" ]]; then + local actual_size + actual_size=$(stat -c%s "$outfile" 2>/dev/null || echo 0) + if [[ $actual_size -lt 1000 ]]; then + err "Downloaded file too small (${actual_size} bytes) — removing" + rm -f "$outfile" + return 1 + fi + # Verify it's valid JSON / .nam + if python3 -c "import json; json.load(open('$outfile'))" 2>/dev/null; then + ok "Downloaded ${local_name} ($(( actual_size / 1024 )) KB)" + return 0 + else + err "Invalid .nam file (not valid JSON) — removing" + rm -f "$outfile" + return 1 + fi + else + err "HTTP $http_code for $url" + rm -f "$outfile" + return 1 + fi +} + +_download_all_models() { + echo -e "\n${CYAN}Downloading ${#MODELS[@]} NAM models to $NAM_DIR${NC}" + echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" + mkdir -p "$NAM_DIR" + + local success=0 fail=0 + for entry in "${MODELS[@]}"; do + IFS='|' read -r local_name remote_name desc arch size <<< "$entry" + if _download_model "$local_name" "$remote_name" "$desc" "$arch" "$size"; then + ((success++)) + else + ((fail++)) + fi + done + + echo "" + info "Models: $success downloaded, $fail failed" + return "$fail" +} + +_download_ir_pack() { + local name="$1" url="$2" fname="$3" desc="$4" + local dest="${IR_DIR}/${fname}" + + if [[ -d "$IR_DIR/GodsCab_IR_Pack" ]] || [[ -d "$IR_DIR/Seacow_Cabs_Free_IRs_2023" ]]; then + local wav_count + wav_count=$(find "$IR_DIR" -maxdepth 2 -name '*.wav' 2>/dev/null | wc -l) + if [[ $wav_count -gt 10 ]]; then + ok "SKIP $name (IRs already extracted, $wav_count .wav files present)" + return 0 + fi + fi + + info "Downloading $name..." + info " Source: $url" + + if curl -sL -o "$dest" --connect-timeout 10 --max-time 120 "$url" 2>/dev/null; then + local size + size=$(stat -c%s "$dest" 2>/dev/null || echo 0) + if [[ $size -lt 10000 ]]; then + err "Downloaded file too small (${size} bytes)" + rm -f "$dest" + return 1 + fi + ok "Downloaded ${fname} ($(( size / 1024 / 1024 )) MB)" + + # Extract ZIP + if command -v unzip &>/dev/null; then + info "Extracting ${fname} to ${IR_DIR}..." + unzip -q -o "$dest" -d "$IR_DIR" 2>/dev/null && { + rm -f "$dest" + ok "Extracted to ${IR_DIR}/" + local wav_count + wav_count=$(find "$IR_DIR" -maxdepth 2 -name '*.wav' 2>/dev/null | wc -l) + info "IR files installed: $wav_count" + } || { + warn "Extraction had issues — ZIP saved at ${dest}" + } + else + warn "unzip not found — ZIP saved at ${dest}" + fi + return 0 + else + err "Failed to download $name from $url" + return 1 + fi +} + +_download_all_irs() { + echo -e "\n${CYAN}Downloading IR packs to $IR_DIR${NC}" + echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" + mkdir -p "$IR_DIR" + + local success=0 fail=0 + for i in "${!IR_PACKS[@]}"; do + IFS='|' read -r name url fname desc <<< "${IR_PACKS[$i]}" + if _download_ir_pack "$name" "$url" "$fname" "$desc"; then + ((success++)) + else + ((fail++)) + fi + done + + echo "" + info "IR packs: $success downloaded, $fail failed" + + # Count installed IRs + local wav_count + wav_count=$(find "$IR_DIR" -maxdepth 2 -name '*.wav' 2>/dev/null | wc -l) + info "Total .wav IR files in $IR_DIR: $wav_count" +} + +_show_counts() { + echo "" + local model_count nam_count ir_count + model_count=$(find "$NAM_DIR" -maxdepth 1 -name '*.nam' 2>/dev/null | wc -l) + nam_count=$(find "$HOME/.pedal/nam" -maxdepth 1 -name '*.nam' 2>/dev/null | wc -l) + ir_count=$(find "$IR_DIR" -maxdepth 2 -name '*.wav' 2>/dev/null | wc -l) + + info "Models in $NAM_DIR: $model_count .nam files" + info "Models in ~/.pedal/nam: $nam_count .nam files (legacy)" + info "IRs in $IR_DIR: $ir_count .wav files" +} + +# ── Main ───────────────────────────────────────────────────────────── + +main() { + mkdir -p "$NAM_DIR" "$IR_DIR" + + case "${1:-}" in + --list|-l) + _list_models + _show_counts + ;; + --models|-m) + _download_all_models + _show_counts + ;; + --irs|-i) + _download_all_irs + _show_counts + ;; + ""|--all|-a) + _download_all_models + echo "" + _download_all_irs + echo "" + _show_counts + + echo "" + echo -e "${GREEN}╔══════════════════════════════════════════════════════╗${NC}" + echo -e "${GREEN}║ Download complete! ║${NC}" + echo -e "${GREEN}╚══════════════════════════════════════════════════════╝${NC}" + echo "" + echo " Next steps:" + echo " 1. Run the inventory report:" + echo " python3 scripts/models/nam/build_inventory.py" + echo "" + echo " 2. Verify models load correctly:" + echo " python3 -c \"from src.dsp.nam_host import NAMHost;" + echo " h = NAMHost(models_dir='$NAM_DIR');" + echo " for m in h.list_available_models(): print(m.name, m.architecture, f'{m.size_mb:.1f}MB')\"" + echo "" + echo " 3. Check IRs:" + echo " python3 -c \"from pathlib import Path;" + echo " irs = list(Path('$IR_DIR').rglob('*.wav'));" + echo " print(f'{len(irs)} IRs loaded')\"" + echo "" + ;; + --help|-h) + echo "Usage: $0 [OPTION]" + echo "" + echo "Options:" + echo " --list, -l List models and IRs (without downloading)" + echo " --models, -m Download NAM models only" + echo " --irs, -i Download IR packs only" + echo " --all, -a Download everything (default)" + echo " --help, -h Show this help" + echo "" + echo "Environment:" + echo " NAM_DIR target for .nam files (default: ~/.pedal/models)" + echo " IR_DIR target for .wav IRs (default: ~/.pedal/irs)" + ;; + *) + err "Unknown option: $1" + echo "Usage: $0 [--list|--models|--irs|--all|--help]" + exit 1 + ;; + esac +} + +main "$@" diff --git a/scripts/generate_factory_presets.py b/scripts/generate_factory_presets.py new file mode 100644 index 0000000..ed27a60 --- /dev/null +++ b/scripts/generate_factory_presets.py @@ -0,0 +1,812 @@ +#!/usr/bin/env python3 +"""Generate 48 factory presets (12 banks x 4 presets) for Pi Multi-FX Pedal. + +Replaces ALL existing factory presets in presets/factory/. +""" + +import json +import os +import shutil + +FACTORY_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "presets", "factory") + +# ── Banks ────────────────────────────────────────────────────────────── +BANKS = [ + {"number": 0, "name": "Classic Rock"}, + {"number": 1, "name": "Punk"}, + {"number": 2, "name": "Metal"}, + {"number": 3, "name": "Hardcore"}, + {"number": 4, "name": "Emo"}, + {"number": 5, "name": "Midwest Emo"}, + {"number": 6, "name": "Djent"}, + {"number": 7, "name": "Acoustic"}, + {"number": 8, "name": "Grunge"}, + {"number": 9, "name": "Alternative Rock"}, + {"number": 10, "name": "Garage Rock"}, + {"number": 11, "name": "Pop"}, +] + +# ── IR path shortcuts ───────────────────────────────────────────────── +IR = { + "vintage": "~/.pedal/irs/vintage-1x12.wav", + "british": "~/.pedal/irs/british-4x12.wav", + "american": "~/.pedal/irs/american-2x12.wav", + "modern": "~/.pedal/irs/modern-4x12.wav", + "jazz": "~/.pedal/irs/jazz-1x15.wav", + "boutique": "~/.pedal/irs/boutique-1x12.wav", + "mini": "~/.pedal/irs/mini-1x8.wav", +} + +# ── Helper builders ──────────────────────────────────────────────────── + +def noise_gate(threshold=0.01): + return {"fx_type": "noise_gate", "enabled": True, "bypass": False, + "params": {"threshold": threshold}, "nam_model_path": "", "ir_file_path": ""} + +def compressor(threshold=0.3, ratio=4.0, gain=0.8): + return {"fx_type": "compressor", "enabled": True, "bypass": False, + "params": {"threshold": threshold, "ratio": ratio, "gain": gain}, + "nam_model_path": "", "ir_file_path": ""} + +def boost(gain_db=6.0): + return {"fx_type": "boost", "enabled": True, "bypass": False, + "params": {"gain_db": gain_db}, "nam_model_path": "", "ir_file_path": ""} + +def overdrive(drive=0.5, gain=0.7, tone=0.5): + return {"fx_type": "overdrive", "enabled": True, "bypass": False, + "params": {"drive": drive, "tone": tone, "gain": gain}, + "nam_model_path": "", "ir_file_path": ""} + +def distortion(drive=0.7, gain=0.5): + return {"fx_type": "distortion", "enabled": True, "bypass": False, + "params": {"drive": drive, "gain": gain}, + "nam_model_path": "", "ir_file_path": ""} + +def fuzz(gain=0.6): + return {"fx_type": "fuzz", "enabled": True, "bypass": False, + "params": {"gain": gain}, "nam_model_path": "", "ir_file_path": ""} + +def eq(bass=0.5, mid=0.5, treble=0.5): + return {"fx_type": "eq", "enabled": True, "bypass": False, + "params": {"bass": bass, "mid": mid, "treble": treble}, + "nam_model_path": "", "ir_file_path": ""} + +def ir_cab(ir_path): + return {"fx_type": "ir_cab", "enabled": True, "bypass": False, + "params": {"wet": 1.0, "dry": 0.0}, + "nam_model_path": "", "ir_file_path": ir_path} + +def delay(time=400.0, feedback=0.3, mix=0.25): + return {"fx_type": "delay", "enabled": True, "bypass": False, + "params": {"time": time, "feedback": feedback, "mix": mix}, + "nam_model_path": "", "ir_file_path": ""} + +def reverb(decay=0.4, mix=0.25): + return {"fx_type": "reverb", "enabled": True, "bypass": False, + "params": {"decay": decay, "mix": mix}, + "nam_model_path": "", "ir_file_path": ""} + +def chorus(rate=0.35, depth=0.5, mix=0.3): + return {"fx_type": "chorus", "enabled": True, "bypass": False, + "params": {"rate": rate, "depth": depth, "mix": mix}, + "nam_model_path": "", "ir_file_path": ""} + +def phaser(rate=0.3, depth=0.5, feedback=0.3): + return {"fx_type": "phaser", "enabled": True, "bypass": False, + "params": {"rate": rate, "depth": depth, "feedback": feedback}, + "nam_model_path": "", "ir_file_path": ""} + +def flanger(rate=0.2, depth=0.4, feedback=0.3): + return {"fx_type": "flanger", "enabled": True, "bypass": False, + "params": {"rate": rate, "depth": depth, "feedback": feedback}, + "nam_model_path": "", "ir_file_path": ""} + +def tremolo(rate=3.0, depth=0.4): + return {"fx_type": "tremolo", "enabled": True, "bypass": False, + "params": {"rate": rate, "depth": depth}, + "nam_model_path": "", "ir_file_path": ""} + +def volume(level=0.85): + return {"fx_type": "volume", "enabled": True, "bypass": False, + "params": {"level": level}, "nam_model_path": "", "ir_file_path": ""} + +def octaver(mix=0.4): + return {"fx_type": "octaver", "enabled": True, "bypass": False, + "params": {"mix": mix}, "nam_model_path": "", "ir_file_path": ""} + +# ── Preset definitions per bank ──────────────────────────────────────── + +PRESETS = { + 0: [ # Classic Rock + { + "name": "Brown Sound Crunch", + "master_volume": 0.75, + "chain": [ + noise_gate(0.015), + overdrive(0.55, 0.75, 0.5), + eq(0.55, 0.35, 0.65), + delay(380, 0.25, 0.2), + ir_cab(IR["british"]), + volume(0.78), + ], + }, + { + "name": "Singing Lead", + "master_volume": 0.85, + "chain": [ + noise_gate(0.02), + compressor(0.35, 3.5, 1.1), + overdrive(0.7, 0.65, 0.6), + distortion(0.5, 0.5), + eq(0.5, 0.25, 0.75), + delay(450, 0.35, 0.3), + reverb(0.5, 0.25), + ir_cab(IR["british"]), + volume(0.88), + ], + }, + { + "name": "Sparkling Clean", + "master_volume": 0.78, + "chain": [ + noise_gate(0.008), + compressor(0.25, 4.0, 0.85), + eq(0.45, 0.5, 0.65), + chorus(0.3, 0.45, 0.3), + reverb(0.35, 0.2), + ir_cab(IR["vintage"]), + volume(0.82), + ], + }, + { + "name": "Hard Rock Pounder", + "master_volume": 0.7, + "chain": [ + noise_gate(0.025), + boost(8.0), + distortion(0.75, 0.45), + eq(0.6, 0.25, 0.7), + ir_cab(IR["modern"]), + volume(0.72), + ], + }, + ], + 1: [ # Punk + { + "name": "Fast Riff Machine", + "master_volume": 0.72, + "chain": [ + noise_gate(0.02), + boost(6.0), + overdrive(0.6, 0.7, 0.45), + eq(0.5, 0.3, 0.7), + ir_cab(IR["british"]), + volume(0.75), + ], + }, + { + "name": "Snotty Lead", + "master_volume": 0.82, + "chain": [ + noise_gate(0.015), + overdrive(0.4, 0.85, 0.4), + distortion(0.65, 0.5), + eq(0.4, 0.35, 0.8), + delay(350, 0.2, 0.2), + ir_cab(IR["british"]), + volume(0.85), + ], + }, + { + "name": "Jangle Pop Clean", + "master_volume": 0.76, + "chain": [ + noise_gate(0.008), + compressor(0.3, 4.5, 0.75), + eq(0.4, 0.55, 0.7), + chorus(0.4, 0.35, 0.25), + reverb(0.3, 0.2), + ir_cab(IR["american"]), + volume(0.8), + ], + }, + { + "name": "Hardcore Attack", + "master_volume": 0.68, + "chain": [ + noise_gate(0.03), + boost(9.0), + distortion(0.8, 0.4), + eq(0.55, 0.2, 0.75), + ir_cab(IR["modern"]), + volume(0.7), + ], + }, + ], + 2: [ # Metal + { + "name": "Chug Chug", + "master_volume": 0.65, + "chain": [ + noise_gate(0.035), + boost(10.0), + distortion(0.85, 0.35), + eq(0.65, 0.15, 0.7), + ir_cab(IR["modern"]), + volume(0.68), + ], + }, + { + "name": "Scream Lead", + "master_volume": 0.82, + "chain": [ + noise_gate(0.03), + compressor(0.4, 3.0, 1.3), + boost(8.0), + distortion(0.75, 0.4), + eq(0.5, 0.2, 0.85), + delay(420, 0.3, 0.28), + reverb(0.4, 0.2), + ir_cab(IR["modern"]), + volume(0.86), + ], + }, + { + "name": "Crystal Clean", + "master_volume": 0.75, + "chain": [ + noise_gate(0.008), + compressor(0.2, 5.0, 0.7), + eq(0.4, 0.5, 0.65), + chorus(0.3, 0.5, 0.35), + reverb(0.45, 0.3), + ir_cab(IR["vintage"]), + volume(0.78), + ], + }, + { + "name": "Doom Descent", + "master_volume": 0.6, + "chain": [ + noise_gate(0.04), + boost(12.0), + fuzz(0.75), + distortion(0.9, 0.3), + eq(0.7, 0.1, 0.65), + ir_cab(IR["modern"]), + volume(0.62), + ], + }, + ], + 3: [ # Hardcore + { + "name": "Punch Drunk", + "master_volume": 0.7, + "chain": [ + noise_gate(0.025), + overdrive(0.5, 0.8, 0.4), + distortion(0.6, 0.5), + eq(0.55, 0.25, 0.7), + ir_cab(IR["modern"]), + volume(0.73), + ], + }, + { + "name": "Vein Lead", + "master_volume": 0.8, + "chain": [ + noise_gate(0.02), + compressor(0.35, 3.5, 1.0), + boost(7.0), + overdrive(0.65, 0.6, 0.5), + eq(0.5, 0.2, 0.8), + delay(380, 0.25, 0.25), + ir_cab(IR["british"]), + volume(0.83), + ], + }, + { + "name": "Breather Clean", + "master_volume": 0.74, + "chain": [ + noise_gate(0.008), + compressor(0.28, 4.0, 0.8), + eq(0.45, 0.55, 0.6), + reverb(0.4, 0.25), + ir_cab(IR["american"]), + volume(0.76), + ], + }, + { + "name": "Pit Stomp", + "master_volume": 0.66, + "chain": [ + noise_gate(0.035), + boost(9.0), + distortion(0.85, 0.35), + eq(0.6, 0.15, 0.75), + ir_cab(IR["modern"]), + volume(0.68), + ], + }, + ], + 4: [ # Emo + { + "name": "Twinkle Crunch", + "master_volume": 0.72, + "chain": [ + noise_gate(0.012), + compressor(0.3, 4.0, 0.8), + overdrive(0.35, 0.8, 0.55), + chorus(0.4, 0.3, 0.2), + eq(0.4, 0.6, 0.65), + ir_cab(IR["american"]), + volume(0.75), + ], + }, + { + "name": "Heartstring Lead", + "master_volume": 0.84, + "chain": [ + noise_gate(0.015), + compressor(0.3, 3.5, 1.0), + overdrive(0.6, 0.7, 0.5), + eq(0.45, 0.35, 0.75), + delay(480, 0.4, 0.35), + reverb(0.6, 0.3), + ir_cab(IR["american"]), + volume(0.86), + ], + }, + { + "name": "Diary Pages", + "master_volume": 0.76, + "chain": [ + noise_gate(0.008), + compressor(0.25, 5.0, 0.7), + eq(0.35, 0.6, 0.55), + reverb(0.55, 0.3), + ir_cab(IR["vintage"]), + volume(0.78), + ], + }, + { + "name": "Pop Core", + "master_volume": 0.7, + "chain": [ + noise_gate(0.02), + boost(7.0), + distortion(0.7, 0.45), + eq(0.5, 0.25, 0.7), + delay(350, 0.2, 0.15), + ir_cab(IR["british"]), + volume(0.72), + ], + }, + ], + 5: [ # Midwest Emo + { + "name": "Mathy Tappy", + "master_volume": 0.72, + "chain": [ + noise_gate(0.01), + compressor(0.3, 4.5, 0.75), + overdrive(0.3, 0.85, 0.5), + eq(0.4, 0.55, 0.6), + delay(400, 0.2, 0.15), + ir_cab(IR["american"]), + volume(0.74), + ], + }, + { + "name": "Emotive Swell", + "master_volume": 0.82, + "chain": [ + noise_gate(0.012), + compressor(0.28, 4.0, 0.9), + overdrive(0.5, 0.75, 0.45), + eq(0.4, 0.4, 0.7), + delay(500, 0.35, 0.3), + reverb(0.5, 0.3), + ir_cab(IR["american"]), + volume(0.84), + ], + }, + { + "name": "Fingerpicked Porch", + "master_volume": 0.75, + "chain": [ + noise_gate(0.006), + compressor(0.2, 5.0, 0.7), + eq(0.35, 0.65, 0.55), + chorus(0.25, 0.35, 0.2), + reverb(0.4, 0.22), + ir_cab(IR["boutique"]), + volume(0.77), + ], + }, + { + "name": "Power Chord Wall", + "master_volume": 0.68, + "chain": [ + noise_gate(0.02), + overdrive(0.55, 0.7, 0.45), + distortion(0.6, 0.5), + eq(0.5, 0.3, 0.65), + ir_cab(IR["british"]), + volume(0.7), + ], + }, + ], + 6: [ # Djent + { + "name": "Machine Gun", + "master_volume": 0.62, + "chain": [ + noise_gate(0.04), + compressor(0.4, 6.0, 1.0), + boost(12.0), + distortion(0.85, 0.3), + eq(0.7, 0.1, 0.8), + ir_cab(IR["modern"]), + volume(0.65), + ], + }, + { + "name": "Polyphonic Lead", + "master_volume": 0.8, + "chain": [ + noise_gate(0.025), + compressor(0.35, 4.0, 1.1), + overdrive(0.6, 0.6, 0.55), + eq(0.55, 0.2, 0.8), + delay(440, 0.3, 0.28), + reverb(0.45, 0.2), + ir_cab(IR["modern"]), + volume(0.82), + ], + }, + { + "name": "Clean Arpeggio", + "master_volume": 0.76, + "chain": [ + noise_gate(0.008), + compressor(0.25, 5.0, 0.7), + eq(0.4, 0.5, 0.6), + chorus(0.3, 0.4, 0.3), + delay(480, 0.25, 0.2), + reverb(0.4, 0.25), + ir_cab(IR["american"]), + volume(0.78), + ], + }, + { + "name": "Syncopated Riff", + "master_volume": 0.6, + "chain": [ + noise_gate(0.045), + boost(10.0), + fuzz(0.7), + distortion(0.8, 0.3), + eq(0.65, 0.1, 0.75), + ir_cab(IR["modern"]), + volume(0.62), + ], + }, + ], + 7: [ # Acoustic + { + "name": "Body Strum", + "master_volume": 0.78, + "chain": [ + noise_gate(0.005), + compressor(0.25, 4.5, 0.65), + eq(0.5, 0.6, 0.55), + reverb(0.35, 0.2), + ir_cab(IR["boutique"]), + volume(0.8), + ], + }, + { + "name": "Fingerpicking Lead", + "master_volume": 0.82, + "chain": [ + noise_gate(0.005), + compressor(0.2, 5.0, 0.7), + eq(0.4, 0.65, 0.5), + delay(380, 0.2, 0.18), + reverb(0.45, 0.25), + ir_cab(IR["boutique"]), + volume(0.84), + ], + }, + { + "name": "Ambient Soundscape", + "master_volume": 0.8, + "chain": [ + noise_gate(0.005), + compressor(0.3, 4.0, 0.8), + eq(0.4, 0.5, 0.55), + chorus(0.2, 0.5, 0.4), + reverb(0.7, 0.4), + ir_cab(IR["jazz"]), + volume(0.82), + ], + }, + { + "name": "Percussive Slap", + "master_volume": 0.74, + "chain": [ + noise_gate(0.006), + compressor(0.35, 6.0, 0.6), + boost(4.0), + eq(0.55, 0.4, 0.65), + ir_cab(IR["american"]), + volume(0.76), + ], + }, + ], + 8: [ # Grunge + { + "name": "Fuzz Festival", + "master_volume": 0.7, + "chain": [ + noise_gate(0.015), + overdrive(0.5, 0.75, 0.4), + fuzz(0.6), + eq(0.55, 0.2, 0.7), + ir_cab(IR["british"]), + volume(0.72), + ], + }, + { + "name": "Biting Solo", + "master_volume": 0.82, + "chain": [ + noise_gate(0.02), + boost(7.0), + distortion(0.65, 0.5), + eq(0.35, 0.15, 0.85), + delay(400, 0.3, 0.28), + ir_cab(IR["british"]), + volume(0.85), + ], + }, + { + "name": "Grunge Clean", + "master_volume": 0.75, + "chain": [ + noise_gate(0.008), + compressor(0.3, 4.0, 0.8), + overdrive(0.2, 0.9, 0.5), + phaser(0.25, 0.4, 0.3), + eq(0.45, 0.5, 0.6), + ir_cab(IR["vintage"]), + volume(0.77), + ], + }, + { + "name": "Wall of Noise", + "master_volume": 0.65, + "chain": [ + noise_gate(0.025), + boost(10.0), + fuzz(0.8), + distortion(0.7, 0.35), + eq(0.6, 0.1, 0.75), + ir_cab(IR["modern"]), + volume(0.67), + ], + }, + ], + 9: [ # Alternative Rock + { + "name": "Indie Crunch", + "master_volume": 0.74, + "chain": [ + noise_gate(0.012), + overdrive(0.45, 0.78, 0.55), + eq(0.5, 0.4, 0.65), + ir_cab(IR["american"]), + volume(0.76), + ], + }, + { + "name": "Quirky Lead", + "master_volume": 0.84, + "chain": [ + noise_gate(0.015), + compressor(0.3, 3.5, 1.0), + overdrive(0.55, 0.65, 0.5), + flanger(0.15, 0.35, 0.25), + eq(0.45, 0.3, 0.75), + delay(420, 0.3, 0.28), + ir_cab(IR["american"]), + volume(0.86), + ], + }, + { + "name": "Jangle Box", + "master_volume": 0.76, + "chain": [ + noise_gate(0.008), + compressor(0.25, 4.5, 0.75), + eq(0.4, 0.55, 0.65), + tremolo(4.0, 0.35), + reverb(0.3, 0.2), + ir_cab(IR["american"]), + volume(0.78), + ], + }, + { + "name": "Alt Heavy", + "master_volume": 0.68, + "chain": [ + noise_gate(0.025), + boost(8.0), + distortion(0.75, 0.4), + octaver(0.3), + eq(0.55, 0.2, 0.75), + ir_cab(IR["modern"]), + volume(0.7), + ], + }, + ], + 10: [ # Garage Rock + { + "name": "Lo-Fi Crunch", + "master_volume": 0.72, + "chain": [ + noise_gate(0.015), + overdrive(0.6, 0.7, 0.35), + eq(0.5, 0.3, 0.55), + ir_cab(IR["mini"]), + volume(0.74), + ], + }, + { + "name": "Fuzzed Out", + "master_volume": 0.8, + "chain": [ + noise_gate(0.01), + boost(6.0), + fuzz(0.7), + eq(0.45, 0.25, 0.65), + delay(300, 0.3, 0.25), + ir_cab(IR["british"]), + volume(0.82), + ], + }, + { + "name": "Raw Clean", + "master_volume": 0.78, + "chain": [ + noise_gate(0.006), + eq(0.45, 0.55, 0.5), + tremolo(2.5, 0.3), + reverb(0.3, 0.18), + ir_cab(IR["vintage"]), + volume(0.8), + ], + }, + { + "name": "Sludge Fuzz", + "master_volume": 0.62, + "chain": [ + noise_gate(0.03), + boost(12.0), + fuzz(0.85), + distortion(0.7, 0.3), + eq(0.65, 0.1, 0.6), + ir_cab(IR["modern"]), + volume(0.64), + ], + }, + ], + 11: [ # Pop + { + "name": "Clean Pop", + "master_volume": 0.78, + "chain": [ + noise_gate(0.006), + compressor(0.28, 4.5, 0.7), + overdrive(0.2, 0.9, 0.6), + eq(0.45, 0.5, 0.6), + ir_cab(IR["american"]), + volume(0.8), + ], + }, + { + "name": "Catchy Hook", + "master_volume": 0.84, + "chain": [ + noise_gate(0.01), + compressor(0.3, 4.0, 0.9), + overdrive(0.4, 0.8, 0.5), + chorus(0.35, 0.4, 0.3), + delay(380, 0.25, 0.22), + ir_cab(IR["american"]), + volume(0.86), + ], + }, + { + "name": "Shimmer Clean", + "master_volume": 0.8, + "chain": [ + noise_gate(0.006), + compressor(0.2, 5.0, 0.65), + eq(0.35, 0.55, 0.65), + chorus(0.3, 0.5, 0.35), + reverb(0.5, 0.3), + ir_cab(IR["vintage"]), + volume(0.82), + ], + }, + { + "name": "Pop Punk", + "master_volume": 0.72, + "chain": [ + noise_gate(0.018), + overdrive(0.5, 0.75, 0.45), + distortion(0.55, 0.55), + eq(0.5, 0.3, 0.7), + delay(320, 0.15, 0.12), + ir_cab(IR["british"]), + volume(0.74), + ], + }, + ], +} + +# ── Generate all files ───────────────────────────────────────────────── + +def generate(): + # Wipe existing factory dir + if os.path.exists(FACTORY_DIR): + # Remove all bank dirs but keep irs/ + for entry in os.listdir(FACTORY_DIR): + path = os.path.join(FACTORY_DIR, entry) + if entry != "irs" and os.path.isdir(path): + shutil.rmtree(path) + elif entry != "irs" and os.path.isfile(path): + os.remove(path) + + for bank in BANKS: + num = bank["number"] + bank_dir = os.path.join(FACTORY_DIR, f"bank_{num}") + os.makedirs(bank_dir, exist_ok=True) + + # bank.json + bank_json = { + "number": num, + "name": bank["name"], + "preset_count": 4, + } + with open(os.path.join(bank_dir, "bank.json"), "w") as f: + json.dump(bank_json, f, indent=2) + f.write("\n") + + # 4 presets + for prog in range(4): + preset_data = PRESETS[num][prog] + preset_json = { + "name": preset_data["name"], + "bank": num, + "program": prog, + "master_volume": preset_data["master_volume"], + "tuner_enabled": False, + "chain": preset_data["chain"], + "midi_mappings": {}, + } + path = os.path.join(bank_dir, f"preset_{prog}.json") + with open(path, "w") as f: + json.dump(preset_json, f, indent=2) + f.write("\n") + + print(f"✅ Generated {len(BANKS) * 4} presets across {len(BANKS)} banks") + for bank in BANKS: + print(f" Bank {bank['number']}: {bank['name']} — 4 presets") + + +if __name__ == "__main__": + generate() diff --git a/scripts/models/nam/models.txt b/scripts/models/nam/models.txt index e7cfd1d..84f1243 100644 --- a/scripts/models/nam/models.txt +++ b/scripts/models/nam/models.txt @@ -1,10 +1,22 @@ -5150_EVH -Diezel_VH4 -Engl_Powerball -Fender_Bassman_59 -Fender_Twin_Clean -Marshall_JCM800 -Mesa_Boogie_MarkV -Orange_AD30 -Roland_Jazz_Chorus +5150_BlockLetter_Boosted +5152_Lead_TS9 +6505_Red_NoBoost +BOSS_SD1_Feather +Bogner_Ecstasy +Engl_Savage +Fender_TwinVerb_Clean +Fender_TwinVerb_Vibrato +Friedman_PowerAmp_Feather +JCM2000_Clean +JCM2000_Crunch +JCM900_Lead +Klon_Centaur_High +MXR_M77_Feather +Magnatone_Super59_Pushed +Mesa_MarkIV_Lead +Orange_Rockerverb +Precision_Drive_Feather +Splawn_ProMod_3rd +TS808_Feather +TubeScreamer_Maxed Vox_AC15_TopBoost diff --git a/src/dsp/pipeline.py b/src/dsp/pipeline.py index d9db001..fbfca27 100644 --- a/src/dsp/pipeline.py +++ b/src/dsp/pipeline.py @@ -1040,7 +1040,7 @@ class AudioPipeline: zi = state.get("bd2_tshelf_zi", np.zeros(2, dtype=np.float64)) sig, zf = lfilter(b, a, stage2.astype(np.float64, copy=False), zi=zi) state["bd2_tshelf_zi"] = zf - stage2 = sig.astype(np.float32) + stage2 = np.clip(sig, -1.0, 1.0).astype(np.float32) # Output level out = np.clip(stage2 * gain, -1.0, 1.0) @@ -1130,7 +1130,7 @@ class AudioPipeline: sig, zf = lfilter(b, a, sig, zi=zi) state["muff_treb_zi"] = zf - out = np.clip(sig.astype(np.float32) * volume, -1.0, 1.0) + out = np.clip(np.clip(sig, -1.0, 1.0).astype(np.float32) * volume, -1.0, 1.0) return out # ── 4. Three-band EQ ──────────────────────────────────────────── diff --git a/src/presets/types.py b/src/presets/types.py index 171f33f..274ddb0 100644 --- a/src/presets/types.py +++ b/src/presets/types.py @@ -82,6 +82,7 @@ class FXBlock: enabled: bool = True bypass: bool = False params: dict[str, float] = field(default_factory=dict) + subtype: str = "" # Algorithm variant (e.g. "hall"/"spring"/"plate" for reverb) nam_model_path: str = "" # Path to .nam file (for NAM_AMP type) ir_file_path: str = "" # Path to .wav IR file (for IR_CAB type) diff --git a/src/web/ui-dist/assets/index-B-zxH4pN.css b/src/web/ui-dist/assets/index-B-zxH4pN.css new file mode 100644 index 0000000..5bacba3 --- /dev/null +++ b/src/web/ui-dist/assets/index-B-zxH4pN.css @@ -0,0 +1 @@ +*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;overflow:hidden}body{color:#f0ede6;-webkit-font-smoothing:antialiased;background:#0a0a0c;font-family:Inter,sans-serif}.mono{font-family:JetBrains Mono,monospace}.badge{letter-spacing:.06em;text-transform:uppercase;border-radius:4px;justify-content:center;align-items:center;padding:2px 7px;font-size:10px;font-weight:700;display:inline-flex}.badge-amber{color:#e8a030;background:#e8a03033}.badge-green{color:#3ab87a;background:#3ab87a33}.badge-blue{color:#3a7ba8;background:#3a7ba833}.badge-red{color:#c84040;background:#c8404033}.btn{cursor:pointer;color:#f0ede6;touch-action:manipulation;background:#1c1c22;border:1px solid #2a2a32;border-radius:6px;justify-content:center;align-items:center;gap:6px;padding:8px 16px;font-size:12px;font-weight:600;transition:all .12s;display:inline-flex}.btn:active{transform:scale(.96)}.btn-sm{padding:5px 10px;font-size:10px}.btn-ghost{background:0 0;border-color:#0000}.btn-danger{color:#c84040;background:#c8404026;border-color:#c84040}.btn-icon{cursor:pointer;touch-action:manipulation;background:#1c1c22;border:1px solid #2a2a32;border-radius:5px;justify-content:center;align-items:center;width:28px;height:28px;transition:all .12s;display:inline-flex}.btn-icon:active{transform:scale(.92)}.slide-panel{z-index:100;background:#000000b3;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.slide-panel-inner{background:#0a0a0c;border-radius:16px 16px 0 0;flex-direction:column;width:100%;max-width:440px;max-height:85vh;display:flex;overflow:hidden}.slide-panel-handle{background:#2a2a32;border-radius:2px;flex-shrink:0;width:36px;height:4px;margin:8px auto}.screen-header{border-bottom:1px solid #2a2a32;flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 14px 8px;display:flex}.screen-title{letter-spacing:.06em;text-transform:uppercase;color:#8888a0;font-size:13px;font-weight:600}.screen-body{flex-direction:column;flex:1;gap:12px;padding:12px;display:flex;overflow-y:auto}.snap-grid{gap:6px;padding:4px 0;display:flex;overflow-x:auto}.snap-slot{cursor:pointer;text-align:center;touch-action:manipulation;background:#1c1c22;border:1.5px solid #2a2a32;border-radius:8px;flex-shrink:0;min-width:60px;padding:8px 4px;transition:all .12s;position:relative}.snap-slot:active{transform:scale(.95)}.snap-num{color:#8888a0;font-size:16px;font-weight:700}.snap-name{color:#f0ede6;word-break:break-all;margin-top:2px;font-size:9px;line-height:1.3}.snap-empty{color:#444458;margin-top:2px;font-size:9px;font-style:italic}.snap-save-indicator{background:#3ab87a;border-radius:50%;width:6px;height:6px;position:absolute;top:4px;right:4px;box-shadow:0 0 4px #3ab87a}.snap-name-input{color:#f0ede6;text-align:center;background:#0a0a0c;border:1px solid #2a2a32;border-radius:3px;outline:none;width:100%;margin-top:2px;padding:2px 4px;font-size:9px}.preset-row{cursor:pointer;border:1px solid #0000;border-radius:8px;align-items:center;gap:12px;padding:10px 12px;transition:background .12s;display:flex}.preset-row:active,.preset-row.active{background:#e8a03014;border-color:#e8a03040}.transport-btn{cursor:pointer;background:#1c1c22;border:2px solid #2a2a32;border-radius:50%;justify-content:center;align-items:center;width:44px;height:44px;font-size:16px;transition:all .12s;display:flex}.transport-btn:active{transform:scale(.92)}.transport-btn.rec{background:#c8404026;border-color:#c84040}.transport-btn.play{background:#3ab87a26;border-color:#3ab87a}.switch{cursor:pointer;background:#2a2a32;border-radius:11px;flex-shrink:0;width:40px;height:22px;transition:background .2s;position:relative}.switch.on{background:#3ab87a}.switch:after{content:"";background:#fff;border-radius:50%;width:18px;height:18px;transition:transform .15s;position:absolute;top:2px;left:2px}.switch.on:after{transform:translate(18px)}.search-bar{background:#1c1c22;border:1px solid #2a2a32;border-radius:7px;align-items:center;gap:8px;padding:8px 12px;display:flex}.search-bar input{color:#f0ede6;background:0 0;border:none;outline:none;flex:1;font-size:13px}.search-bar input::placeholder{color:#444458}.file-drop{text-align:center;cursor:pointer;color:#444458;border:2px dashed #2a2a32;border-radius:8px;padding:20px;font-size:13px;transition:all .15s}.file-drop:hover,.file-drop.dragover{color:#e8a030;border-color:#e8a030}.loader{border:2px solid #2a2a32;border-top-color:#e8a030;border-radius:50%;width:20px;height:20px;animation:.6s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.setting-row{border-bottom:1px solid #2a2a32;justify-content:space-between;align-items:center;padding:10px 0;display:flex}.setting-label{color:#f0ede6;font-size:13px}.setting-desc{color:#444458;margin-top:2px;font-size:11px}.section-label{letter-spacing:.1em;text-transform:uppercase;color:#444458;margin-bottom:10px;font-size:10px;font-weight:600}.nam-chip{color:#3a7ba8;background:#3a7ba826;border:1px solid #3a7ba859;border-radius:5px;align-items:center;gap:6px;padding:5px 10px;font-family:JetBrains Mono,monospace;font-size:11px;display:inline-flex}.bypass-led{border-radius:50%;flex-shrink:0;width:8px;height:8px}.led-on{background:#3ab87a;box-shadow:0 0 8px #3ab87a}.led-off{background:#444458} diff --git a/src/web/ui-dist/assets/index-BTj9vC7e.js b/src/web/ui-dist/assets/index-BTj9vC7e.js new file mode 100644 index 0000000..025d723 --- /dev/null +++ b/src/web/ui-dist/assets/index-BTj9vC7e.js @@ -0,0 +1,100 @@ +var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function te(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ne(e,t){return te(e.type,t,e.props)}function T(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function re(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ie=/\/+/g;function ae(e,t){return typeof e==`object`&&e&&e.key!=null?re(``+e.key):t.toString(36)}function oe(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function se(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,se(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ae(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ie,`$&/`)+`/`),se(o,r,i,``,function(e){return e})):o!=null&&(T(o)&&(o=ne(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ie,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,T());else{var t=n(l);t!==null&&ae(x,t.startTime-e)}}var S=!1,C=-1,w=5,ee=-1;function te(){return g?!0:!(e.unstable_now()-eet&&te());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ae(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?T():S=!1}}}var T;if(typeof y==`function`)T=function(){y(ne)};else if(typeof MessageChannel<`u`){var re=new MessageChannel,ie=re.port2;re.port1.onmessage=ne,T=function(){ie.postMessage(null)}}else T=function(){_(ne,0)};function ae(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ae(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,T()))),r},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1O||(e.current=de[O],de[O]=null,O--)}function A(e,t){O++,de[O]=e.current,e.current=t}var pe=fe(null),j=fe(null),me=fe(null),he=fe(null);function ge(e,t){switch(A(me,t),A(j,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}k(pe),A(pe,e)}function _e(){k(pe),k(j),k(me)}function ve(e){e.memoizedState!==null&&A(he,e);var t=pe.current,n=Hd(t,e.type);t!==n&&(A(j,e),A(pe,n))}function ye(e){j.current===e&&(k(pe),k(j)),he.current===e&&(k(he),Qf._currentValue=ue)}var be,xe;function Se(e){if(be===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||``,xe=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Se(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return Se(e.type);case 16:return Se(`Lazy`);case 13:return e.child!==t&&t!==null?Se(`Suspense Fallback`):Se(`Suspense`);case 19:return Se(`SuspenseList`);case 0:case 15:return M(e.type,!1);case 11:return M(e.type.render,!1);case 1:return M(e.type,!0);case 31:return Se(`Activity`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,Oe=t.unstable_cancelCallback,ke=t.unstable_shouldYield,Ae=t.unstable_requestPaint,je=t.unstable_now,Me=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Pe=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,N=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Re==`function`&&N(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:P,Ue=Math.log,We=Math.LN2;function P(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ge=256,Ke=262144,qe=4194304;function Je(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ye(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Je(n))):i=Je(o):i=Je(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Je(n))):i=Je(o)):i=Je(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Xe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qe(){var e=qe;return qe<<=1,!(qe&62914560)&&(qe=4194304),e}function $e(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function F(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function I(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),fn=!1;if(dn)try{var pn={};Object.defineProperty(pn,"passive",{get:function(){fn=!0}}),window.addEventListener(`test`,pn,pn),window.removeEventListener(`test`,pn,pn)}catch{fn=!1}var mn=null,hn=null,gn=null;function _n(){if(gn)return gn;var e,t=hn,n=t.length,r,i=`value`in mn?mn.value:mn.textContent,a=i.length;for(e=0;e=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=_n(),gn=hn=mn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=dn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Rt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Ed(Nr,`onSelect`),0>=o,i-=o,Oi=1<<32-He(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),R&&Ai(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),R&&Ai(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return R&&Ai(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),R&&Ai(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&ka(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ia(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=hi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=mi(a.type,a.key,a.props,null,e.mode,c),Ia(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=vi(a,e.mode,c),c.return=e,e=c}return o(e);case T:return a=ka(a),b(e,r,a,c)}if(le(a))return h(e,r,a,c);if(oe(a)){if(l=oe(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Fa(a),c);if(a.$$typeof===C)return b(e,r,ra(e,a),c);La(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=gi(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{Pa=0;var i=b(e,t,n,r);return Na=null,i}catch(t){if(t===Ca||t===Ta)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var za=Ra(!0),Ba=Ra(!1),Va=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ua(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Ka(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ja=!1;function Ya(){if(Ja){var e=ma;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Va=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===pa&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Va=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=E.T,s={};E.T=s,Fs(e,!1,t,n);try{var c=i(),l=E.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,_a(c,r),pu(e)):Ps(e,t,r,pu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{D.p=a,o!==null&&s.types!==null&&(o.types=s.types),E.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Es(e).queue;Cs(e,i,t,ue,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:ue},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},pu())}function Os(){return na(Qf)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Wa(n);var r=Ga(t,e,n);r!==null&&(hu(r,t,n),Ka(r,t,n)),t={cache:la()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=ii(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,pu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),K===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(s(479))}else t=ii(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===B||t!==null&&t===B}function Ls(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var zs={readContext:na,use:Po,useCallback:H,useContext:H,useEffect:H,useImperativeHandle:H,useLayoutEffect:H,useInsertionEffect:H,useMemo:H,useReducer:H,useRef:H,useState:H,useDebugValue:H,useDeferredValue:H,useTransition:H,useSyncExternalStore:H,useId:H,useHostTransitionStatus:H,useFormState:H,useActionState:H,useOptimistic:H,useMemoCache:H,useCacheRefresh:H};zs.useEffectEvent=H;var Bs={readContext:na,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(_o){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(_o){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,B,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,i=Ao();if(R){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),K===null)throw Error(s(349));J&127||Vo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,us(Uo.bind(null,r,a,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),n},useId:function(){var e=Ao(),t=K.identifierPrefix;if(R){var n=ki,r=Oi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[ct]=t,a[lt]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=me.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Fi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||zi(t,!0)}else e=Bd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[ct]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(s(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[ct]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),i=!1}else i=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),U(t),null);case 4:return _e(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return Xi(t.type),U(t),null;case 19:if(k(z),r=t.memoizedState,r===null)return U(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Rc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=fo(e),a!==null){for(t.flags|=128,Rc(r,!1),e=a.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return A(z,z.current&1|2),R&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&je()>tu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}else{if(!i)if(e=fo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!R)return U(t),null}else 2*je()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=je(),e.sibling=null,n=z.current,A(z,i?n&1|2:n&1),R&&Ai(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&k(ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(ca),U(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Bc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(ca),_e(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(s(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(z),null;case 4:return _e(),null;case 10:return Xi(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&k(ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(ca),null;case 25:return null;default:return null}}function Vc(e,t){switch(Ni(t),t.tag){case 3:Xi(ca),_e();break;case 26:case 27:case 5:ye(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:k(z);break;case 10:Xi(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&k(ya);break;case 24:Xi(ca)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[lt]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ct]=e,t[lt]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(a,r,n),a[ct]=e,xt(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;cg&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,E.T=null,n=lu,lu=null;var a=au,o=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(s(331));var c=G;if(G|=4,Fl(a.current),Dl(a,a.current,o,n),G=c,id(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,a)}catch{}return!0}finally{D.p=i,E.T=r,Vu(e,t)}}function Wu(e,t,n){t=bi(n,t),t=$s(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(F(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=bi(n,e),n=ec(2),r=Ga(t,n,2),r!==null&&(tc(n,r,t,e),F(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>je()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Qe()),e=ai(e,t),e!==null&&(F(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return De(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=Ye(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Xe(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=je(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=bt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);xt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=me.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=bt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=bt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=bt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+Bt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),xt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Bt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,xt(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),xt(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,xt(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),xt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n(),u=c(),d=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=e(((e,t)=>{t.exports=d()}))(),p={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},m=`#40C8A0`,h=[{key:`level`,label:`Level`,min:0,max:100,def:80},{key:`maxTime`,label:`Max Time`,type:`select`,options:[{value:4,label:`4 sec`},{value:8,label:`8 sec`},{value:16,label:`16 sec`},{value:32,label:`32 sec`}],def:8},{key:`fade`,label:`Fade`,min:0,max:100,def:30},{key:`sync`,label:`Sync`,type:`select`,options:[{value:`off`,label:`Off`},{value:`1bar`,label:`1 Bar`},{value:`2bar`,label:`2 Bars`},{value:`4bar`,label:`4 Bars`}],def:`off`}];function g(){let[e,t]=(0,l.useState)({}),n=(0,l.useRef)({}),r=(0,l.useRef)(e);r.current=e;let i=(0,l.useCallback)(e=>r.current[e]||{status:`stopped`,elapsed:0,maxDuration:8,layers:0},[]),a=(0,l.useCallback)(e=>{n.current[e]&&(clearInterval(n.current[e]),delete n.current[e])},[]),o=(0,l.useCallback)((e,r)=>{a(e),n.current[e]=setInterval(()=>{t(t=>{let n=t[e];if(!n||n.status===`stopped`)return t;let i=+(n.elapsed+.1).toFixed(1);return i>=r?n.status===`recording`?{...t,[e]:{...n,status:`playing`,elapsed:0,layers:n.layers+1}}:{...t,[e]:{...n,elapsed:0}}:{...t,[e]:{...n,elapsed:i}}})},100)},[a]),s=(0,l.useCallback)((e,n)=>{let r=i(e);r.status!==`recording`&&(a(e),t(t=>({...t,[e]:{...r,status:`recording`,elapsed:0,maxDuration:n}})),o(e,n))},[i,a,o]),c=(0,l.useCallback)((e,n)=>{let r=i(e);if(r.layers===0){s(e,n);return}a(e),t(t=>({...t,[e]:{...r,status:`playing`}})),o(e,n)},[i,a,o,s]),u=(0,l.useCallback)((e,n)=>{let r=i(e);if(r.layers===0){s(e,n);return}a(e),t(t=>({...t,[e]:{...r,status:`overdubbing`}})),o(e,n)},[i,a,o,s]),d=(0,l.useCallback)(e=>{a(e);let n=i(e);t(t=>({...t,[e]:{...n,status:`stopped`,elapsed:0}}))},[a,i]),f=(0,l.useCallback)(e=>{a(e),t(t=>{let n={...t};return delete n[e],n})},[a]),p=(0,l.useCallback)(e=>{let n=i(e);if(n.layers<=0)return;let r=n.layers-1;r===0?(a(e),t(t=>({...t,[e]:{...n,layers:0,status:`stopped`,elapsed:0}}))):t(t=>({...t,[e]:{...n,layers:r}}))},[i,a]);return(0,l.useEffect)(()=>()=>{Object.values(n.current).forEach(clearInterval)},[]),{stores:e,getStore:i,record:s,play:c,overdub:u,stop:d,clearLoop:f,undoLast:p}}var _=e=>{let t=Math.floor(e/60),n=Math.floor(e%60);return`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}`};function v({block:e,selected:t,onSelect:n,onToggle:r,looperStore:i,onModelBrowser:a}){let o=i||{status:`stopped`,elapsed:0,maxDuration:8,layers:0},s=!e.bypassed,{status:c,elapsed:u,maxDuration:d,layers:h}=o,g=c===`recording`?p.red:c===`playing`?p.green:c===`overdubbing`?p.amber:p.textDim,v=c===`recording`?`REC`:c===`playing`?`PLAY`:c===`overdubbing`?`OVDB`:`STOP`,y=c===`recording`||c===`overdubbing`,b=(0,l.useRef)(null),x=(0,l.useCallback)(()=>{b.current=setTimeout(()=>{b.current=null,a?.(e.id)},500)},[e.id,a]),S=(0,l.useCallback)(()=>{b.current&&=(clearTimeout(b.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:x,onTouchEnd:S,onTouchMove:S,onMouseDown:S,onMouseUp:S,style:{minWidth:150,width:150,height:100,borderRadius:8,background:`linear-gradient(135deg, #142020, ${p.panel})`,border:`2px solid ${t?p.amber:m}60`,opacity:s?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${p.amber}44, inset 0 0 0 1px ${p.amber}22`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, ${m}, #80D0A0)`,boxShadow:s?`0 0 6px ${m}`:`none`}}),(0,f.jsx)(`div`,{style:{position:`absolute`,top:5,left:5,fontSize:9,color:p.textDim,letterSpacing:1.5,lineHeight:1,cursor:`grab`,opacity:.5},children:`⋮⋮`}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:s?p.green:p.textDim,boxShadow:s?`0 0 8px ${p.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${s?`${p.green}88`:p.border}`},title:s?`Active`:`Bypassed`}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`18px 8px 4px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[(0,f.jsxs)(`div`,{style:{fontSize:10,fontWeight:700,color:m,letterSpacing:`.06em`,textTransform:`uppercase`,display:`flex`,alignItems:`center`,gap:5},children:[(0,f.jsx)(`span`,{style:{fontSize:12},children:`◉`}),(0,f.jsx)(`span`,{children:`LOOPER`})]}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:17,fontWeight:800,color:g,marginTop:3,letterSpacing:`.06em`,textShadow:y?`0 0 8px ${g}66`:`none`},children:[_(u),(0,f.jsxs)(`span`,{style:{fontSize:11,color:p.textDim,fontWeight:500},children:[`/`,_(d)]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,marginTop:1},children:[(0,f.jsx)(`span`,{style:{fontSize:8,fontWeight:800,letterSpacing:`.1em`,color:g,textTransform:`uppercase`,background:`${g}18`,padding:`1px 5px`,borderRadius:3},children:v}),h>0&&(0,f.jsxs)(`span`,{style:{fontSize:8,color:p.textSec},children:[h,`L`]})]})]})]})}function y({store:e,onRecord:t,onPlay:n,onOverdub:r,onStop:i,onClear:a,onUndo:o}){let{status:s,layers:c}=e,l=e=>({width:44,height:44,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:16,cursor:`pointer`,border:`2px solid`,transition:`all .12s`,touchAction:`manipulation`,flexShrink:0,...e});return(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,justifyContent:`center`,alignItems:`center`,padding:`6px 0`},children:[(0,f.jsx)(`div`,{onClick:t,style:l({borderColor:s===`recording`?p.red:p.border,background:s===`recording`?`rgba(200,64,64,.2)`:p.surface,color:p.red,animation:s===`recording`?`looperPulse 0.8s ease-in-out infinite`:`none`}),title:`Record`,children:`●`}),(0,f.jsx)(`div`,{onClick:n,style:l({borderColor:s===`playing`?p.green:p.border,background:s===`playing`?`rgba(58,184,122,.2)`:p.surface,color:p.green}),title:`Play`,children:`▶`}),(0,f.jsx)(`div`,{onClick:r,style:l({borderColor:s===`overdubbing`?p.amber:p.border,background:s===`overdubbing`?`rgba(232,160,48,.2)`:p.surface,color:p.amber,opacity:c>0?1:.3}),title:`Overdub`,children:`⏺`}),(0,f.jsx)(`div`,{onClick:i,style:{...l({}),width:36,height:36,fontSize:13,borderColor:p.border,background:p.surface,color:p.textPrimary},title:`Stop`,children:`■`}),(0,f.jsx)(`div`,{onClick:a,style:{...l({}),width:32,height:32,fontSize:11,borderColor:p.border,background:p.surface,color:p.red,opacity:s!==`stopped`||c>0?1:.3},title:`Clear`,children:`✕`}),(0,f.jsx)(`div`,{onClick:o,style:{...l({}),width:32,height:32,fontSize:13,borderColor:p.border,background:p.surface,color:p.amber,opacity:c>0?1:.3},title:`Undo last layer`,children:`↩`})]})}function b({block:e,params:t,looperStore:n,onParamChange:r,onParamChangeEnd:i,looperActions:a}){let o=m;return(0,f.jsxs)(`div`,{className:`param-panel`,children:[(0,f.jsx)(`div`,{className:`param-panel-header`,children:(0,f.jsxs)(`span`,{className:`param-panel-title`,children:[(0,f.jsx)(`span`,{style:{color:o},children:`●`}),` Looper`]})}),a&&(0,f.jsx)(`div`,{style:{background:`${p.panel}`,borderRadius:8,marginBottom:6,border:`1px solid ${p.border}`},children:(0,f.jsx)(y,{store:n,...a})}),n&&(n.status!==`stopped`||n.layers>0)&&(0,f.jsxs)(`div`,{style:{display:`flex`,gap:10,padding:`4px 0 8px`,justifyContent:`center`,fontSize:10,color:p.textSec,borderBottom:`1px solid ${p.border}`,marginBottom:6},children:[(0,f.jsxs)(`span`,{children:[`Status: `,(0,f.jsx)(`strong`,{style:{color:n.status===`recording`?p.red:n.status===`playing`?p.green:n.status===`overdubbing`?p.amber:p.textDim},children:n.status.toUpperCase()})]}),(0,f.jsxs)(`span`,{children:[`Layers: `,(0,f.jsx)(`strong`,{children:n.layers})]}),(0,f.jsxs)(`span`,{children:[`Time: `,(0,f.jsx)(`strong`,{children:`${_(n.elapsed)} / ${_(n.maxDuration)}`})]})]}),h.filter(e=>!e.conditional||e.conditional(t)).map(e=>e.type===`select`?(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsx)(`div`,{className:`param-header`,children:(0,f.jsx)(`span`,{className:`param-label`,style:{color:o},children:e.label})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,flexWrap:`wrap`,background:`#0A0A10`,borderRadius:6,padding:4},children:(e.options||[]).map(n=>(0,f.jsx)(`button`,{onClick:()=>{r?.(e.key,n.value),i?.(e.key,n.value)},style:{flex:1,padding:`5px 8px`,borderRadius:4,border:`none`,fontSize:10,fontWeight:600,cursor:`pointer`,background:(t[e.key]==null?e.def:t[e.key])===n.value?o:`transparent`,color:(t[e.key]==null?e.def:t[e.key])===n.value?`#000`:p.textSec,transition:`all .1s`,letterSpacing:`.03em`,whiteSpace:`nowrap`},children:n.label},n.value))})]},e.key):(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsxs)(`div`,{className:`param-header`,children:[(0,f.jsx)(`span`,{className:`param-label`,style:{color:o},children:e.label}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4,alignItems:`center`},children:[(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:n=>{n.preventDefault();let a=Math.max(e.min,((t[e.key]==null?e.def:t[e.key])||0)-5);r?.(e.key,a),i?.(e.key,a)},onTouchStart:n=>{n.preventDefault();let a=Math.max(e.min,((t[e.key]==null?e.def:t[e.key])||0)-5);r?.(e.key,a),i?.(e.key,a)},children:`−`}),(0,f.jsx)(`span`,{className:`param-val`,style:{color:o},children:t[e.key]==null?e.def:t[e.key]}),(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:n=>{n.preventDefault();let a=Math.min(e.max,((t[e.key]==null?e.def:t[e.key])||0)+5);r?.(e.key,a),i?.(e.key,a)},onTouchStart:n=>{n.preventDefault();let a=Math.min(e.max,((t[e.key]==null?e.def:t[e.key])||0)+5);r?.(e.key,a),i?.(e.key,a)},children:`+`})]})]}),(0,f.jsx)(`div`,{className:`param-track-wrap`,onMouseDown:t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),a=Math.max(0,Math.min(1,(t.clientX-n.left)/n.width)),o=Math.round(e.min+a*(e.max-e.min));r?.(e.key,o),i?.(e.key,o)},onTouchStart:t=>{let n=t.currentTarget.getBoundingClientRect(),a=Math.max(0,Math.min(1,(t.touches[0].clientX-n.left)/n.width)),o=Math.round(e.min+a*(e.max-e.min));r?.(e.key,o),i?.(e.key,o)},children:(0,f.jsxs)(`div`,{className:`param-track`,children:[(0,f.jsx)(`div`,{className:`param-fill`,style:{width:`${((t[e.key]==null?e.def:t[e.key])-e.min)/(e.max-e.min)*100}%`,background:o}}),(0,f.jsx)(`div`,{className:`param-thumb`,style:{left:`${((t[e.key]==null?e.def:t[e.key])-e.min)/(e.max-e.min)*100}%`,background:o}})]})})]},e.key))]})}var x=` +@keyframes looperPulse { + 0%, 100% { opacity: 1; transform: scale(1); } + 50% { opacity: 0.5; transform: scale(0.95); } +} +`,S={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},C={y:{label:`Y`,desc:`Split evenly`,icon:`⬡`},ab:{label:`A/B`,desc:`Route all to A or B`,icon:`⇄`},cascade:{label:`Cascade`,desc:`A feeds into B`,icon:`⇢`},a_to_b:{label:`A→B`,desc:`Serial path extension`,icon:`↷`}},w={od:S.amber,overdrive:S.amber,drive:S.amber,dist:S.red,distortion:S.red,fuzz:`#D060E0`,mod:S.blue,chorus:S.blue,flange:S.blue,phaser:S.blue,tremolo:S.blue,vibrato:S.blue,rotary:S.blue,delay:`#60A0E0`,echo:`#60A0E0`,reverb:`#60C0D0`,pitch:`#A060E0`,comp:S.green,compressor:S.green,gate:S.green,filter:`#D0A060`,wah:`#D0A060`,eq:`#80A0B0`,ir:S.green,cab:S.green,nam:`#E0A040`,volume:S.textSec,boost:S.amber,split:`#B080C0`,merge:`#80B0C0`},ee={od:`fx_distortion`,overdrive:`fx_distortion`,drive:`fx_distortion`,dist:`fx_distortion`,distortion:`fx_distortion`,gain:`fx_distortion`,fuzz:`fx_distortion`,delay:`fx_delay`,echo:`fx_delay`,reverb:`fx_reverb`,chorus:`fx_chorus`,flange:`fx_flanger`,flanger:`fx_flanger`,phaser:`fx_phaser`,tremolo:`fx_modulator`,vibrato:`fx_modulator`,rotary:`fx_modulator`,modulator:`fx_modulator`,pitch:`fx_pitch`,harmonizer:`fx_pitch`,shifter:`fx_pitch`,comp:`fx_compressor`,compressor:`fx_compressor`,limiter:`fx_limiter`,gate:`fx_gate`,noise_gate:`fx_gate`,filter:`fx_filter`,wah:`fx_filter`,eq:`fx_eq`,graphic_eq:`fx_eq`,parametric_eq:`fx_parametric_eq`,multiband_eq:`fx_multiband_eq`,ir:`fx_spatial`,cab:`fx_spatial`,cabinet:`fx_spatial`,nam:`fx_simulator`,capture:`fx_simulator`,amp:`fx_amplifier`,amplifier:`fx_amplifier`,volume:`fx_constant`,level:`fx_constant`,boost:`fx_constant`,split:`fx_split_a`,merge:`fx_mixer`,tuner:`fx_analyzer`,mixer:`fx_mixer`,utility:`fx_utility`,plugin:`fx_plugin`,instrument:`fx_instrument`,reamp:`fx_converter`,looper:`fx_oscillator`},te=`/ui/img/`;function ne({type:e,size:t=14,style:n={}}){let r=(e||``).toLowerCase().trim(),i=`fx_plugin`,a=!1;for(let[e,t]of Object.entries(ee))if(r===e||r.startsWith(e)||r.includes(e)){i=t,a=!0;break}if(!a&&r){let e=r.replace(/[^a-z0-9]+/g,`_`).replace(/^_|_$/g,``);ee[e]&&(i=ee[e])}return(0,f.jsx)(`img`,{src:`${te}${i}.svg`,alt:e||`fx`,style:{width:t,height:t,flexShrink:0,filter:`invert(0.95) brightness(2)`,objectFit:`contain`,...n},onError:e=>{e.target.style.display=`none`}})}function T(e){let t=(e||``).toLowerCase().trim();for(let[e,n]of Object.entries(w))if(t===e||t.startsWith(e)||t.includes(e))return n;return S.amber}function re({color:e=S.border,narrow:t=!1}){let n=t?14:18;return(0,f.jsxs)(`svg`,{width:n,height:`24`,viewBox:`0 0 ${n} 24`,fill:`none`,style:{flexShrink:0},children:[(0,f.jsx)(`line`,{x1:`0`,y1:`12`,x2:n-6,y2:`12`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`polyline`,{points:`${n-10},7 ${n-4},12 ${n-10},17`,fill:`none`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function ie({label:e,isLeft:t}){return(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0,flexDirection:t?`row`:`row-reverse`},children:[!t&&(0,f.jsx)(re,{}),(0,f.jsx)(`div`,{style:{padding:`7px 12px`,borderRadius:6,fontSize:10,fontWeight:700,letterSpacing:`.12em`,background:S.blueDim,color:S.blue,border:`1px solid ${S.blue}60`,textTransform:`uppercase`,whiteSpace:`nowrap`},children:e}),t&&(0,f.jsx)(re,{})]})}function ae({block:e,selected:t,onSelect:n,onToggle:r,onModelBrowser:i}){let a=e.params||{},o=a.splitType||`y`,s=C[o]||C.y,c=!e.bypassed,u=T(`split`),d=(0,l.useRef)(null),p=(0,l.useCallback)(()=>{d.current=setTimeout(()=>{d.current=null,i?.(e.id)},500)},[e.id,i]),m=(0,l.useCallback)(()=>{d.current&&=(clearTimeout(d.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:p,onTouchEnd:m,onTouchMove:m,onMouseDown:m,onMouseUp:m,style:{minWidth:130,width:130,height:76,borderRadius:8,background:`linear-gradient(135deg, ${S.panel}, #1A1520)`,border:`2px solid ${t?S.amber:u}60`,opacity:c?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${S.amber}44, inset 0 0 0 1px ${S.amber}22`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, #B080C0, #80B0C0)`}}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:c?S.green:S.textDim,boxShadow:c?`0 0 8px ${S.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${c?`${S.green}88`:S.border}`}}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`14px 10px 6px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[(0,f.jsxs)(`div`,{style:{fontSize:12,fontWeight:700,color:u,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3,display:`flex`,alignItems:`center`,gap:6},children:[(0,f.jsx)(ne,{type:`split`,size:16}),(0,f.jsxs)(`span`,{children:[`SPLIT `,s.label]})]}),(0,f.jsx)(`div`,{style:{fontSize:9,color:S.textSec,marginTop:2},children:s.desc})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,borderTop:`1px solid ${S.border}44`},children:[(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#B080C0`,letterSpacing:`.1em`,borderRight:`1px solid ${S.border}44`},children:[`A `,o===`ab`&&(a.activePath===`B`?`—`:`✓`)]}),(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#80B0C0`,letterSpacing:`.1em`},children:[`B `,o===`ab`&&a.activePath===`B`?`✓`:`—`]})]})]})}function oe({block:e,selected:t,onSelect:n,onToggle:r,onModelBrowser:i}){let a=e.params||{},o=!e.bypassed,s=(0,l.useRef)(null),c=(0,l.useCallback)(()=>{s.current=setTimeout(()=>{s.current=null,i?.(e.id)},500)},[e.id,i]),u=(0,l.useCallback)(()=>{s.current&&=(clearTimeout(s.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:c,onTouchEnd:u,onTouchMove:u,onMouseDown:u,onMouseUp:u,style:{minWidth:130,width:130,height:76,borderRadius:8,background:`linear-gradient(135deg, #15201A, ${S.panel})`,border:`2px solid ${t?S.amber:`#80B0C0`}60`,opacity:o?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${S.amber}44, inset 0 0 0 1px ${S.amber}22`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, #80B0C0, #60A080)`}}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:o?S.green:S.textDim,boxShadow:o?`0 0 8px ${S.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${o?`${S.green}88`:S.border}`}}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`14px 10px 6px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[(0,f.jsxs)(`div`,{style:{fontSize:12,fontWeight:700,color:`#80B0C0`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3,display:`flex`,alignItems:`center`,gap:6},children:[(0,f.jsx)(ne,{type:`merge`,size:16}),(0,f.jsx)(`span`,{children:`MERGE`})]}),(0,f.jsxs)(`div`,{style:{fontSize:9,color:S.textSec,marginTop:2},children:[`Blend `,a.blend??100,`%`]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,borderTop:`1px solid ${S.border}44`},children:[(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#B080C0`,letterSpacing:`.1em`,borderRight:`1px solid ${S.border}44`},children:[`Lv `,a.levelA??100]}),(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#80B0C0`,letterSpacing:`.1em`},children:[`Lv `,a.levelB??100]})]})]})}function se({block:e,selected:t,onSelect:n,onToggle:r,pathLabel:i,onModelBrowser:a}){let o=T(e.type),s=!e.bypassed,c=(0,l.useRef)(null),u=(0,l.useCallback)(()=>{c.current=setTimeout(()=>{c.current=null,a?.(e.id)},500)},[e.id,a]),d=(0,l.useCallback)(()=>{c.current&&=(clearTimeout(c.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:u,onTouchEnd:d,onTouchMove:d,onMouseDown:d,onMouseUp:d,style:{minWidth:120,width:120,height:76,borderRadius:8,background:i===`B`?`#1A1820`:S.panel,border:`2px solid ${t?S.amber:S.border}`,opacity:s?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${S.amber}44, inset 0 0 0 1px ${S.amber}22`:i===`B`?`inset 0 0 0 1px rgba(128,176,192,0.15)`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:o,boxShadow:s?`0 0 6px ${o}`:`none`}}),(0,f.jsx)(`div`,{style:{position:`absolute`,top:5,left:5,fontSize:9,color:S.textDim,letterSpacing:1.5,lineHeight:1,cursor:`grab`,opacity:.5},children:`⋮⋮`}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:s?S.green:S.textDim,boxShadow:s?`0 0 8px ${S.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${s?`${S.green}88`:S.border}`},title:s?`Active — tap to bypass`:`Bypassed — tap to enable`}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`14px 10px 6px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[i&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:5,right:20,fontSize:7,fontWeight:700,color:i===`A`?`#B080C0`:`#80B0C0`,letterSpacing:`.08em`,background:`${S.bg}88`,padding:`0 4px`,borderRadius:2,lineHeight:1.4},children:i===`A`?`A`:`B`}),(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:600,color:S.textPrimary,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3,paddingRight:16},children:e.name||e.type||`FX`}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5,marginTop:3},children:[(0,f.jsx)(ne,{type:e.type,size:14}),(0,f.jsx)(`span`,{style:{fontSize:9,fontWeight:700,color:o,letterSpacing:`.08em`,textTransform:`uppercase`,background:`${o}18`,padding:`1px 5px`,borderRadius:3},children:(e.type||`fx`).replace(/_/g,` `).toUpperCase()})]})]})]})}function ce(e){let t=e.findIndex(e=>e.type===`split`),n=e.findIndex(e=>e.type===`merge`);if(t===-1||n===-1)return{type:`serial`,blocks:e};let r=e.slice(0,t),i=e[t],a=e.slice(t+1,n),o=e[n],s=e.slice(n+1),c=a.filter(e=>!e.path||e.path===`A`),l=a.filter(e=>e.path===`B`);return{type:`parallel`,beforeSplit:r,splitBlock:i,pathABlocks:c,pathBBlocks:l,mergeBlock:o,afterMerge:s,parallelBlockCount:Math.max(c.length,l.length)}}function le({blocks:e,selectedBlockId:t,onSelectBlock:n,onToggleBlock:r,onReorder:i,onAddBlock:a,onRemoveBlock:o,onModelBrowser:s,looperStores:c={}}){let u=(0,l.useRef)(null),d=(0,l.useRef)(null),[p,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(0),_=(0,l.useMemo)(()=>ce(e),[e]),y=(0,l.useCallback)((e,t)=>{m(t),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(t))},[]),b=(0,l.useCallback)(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`},[]),x=(0,l.useCallback)((e,t)=>{e.preventDefault(),p!==null&&p!==t&&i&&i(p,t),m(null)},[p,i]),C=(0,l.useCallback)(()=>{m(null)},[]),w=(0,l.useCallback)(()=>{if(!u.current||!t)return;let n=(_.type===`serial`?e:[..._.beforeSplit,_.splitBlock,..._.pathABlocks,_.mergeBlock,..._.afterMerge].filter(Boolean)).findIndex(e=>e.id===t);if(n<0)return;let r=u.current.children[n+(_.type,1)];r&&r.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})},[t,_,e]),ee=(0,l.useRef)(t);t!==ee.current&&(ee.current=t,setTimeout(w,50));let te=(0,l.useCallback)(e=>{g(e.target.scrollLeft),d.current&&(d.current.scrollLeft=e.target.scrollLeft)},[]);return e.find(e=>e.id===t),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[_.type===`parallel`?(()=>{let{beforeSplit:e,splitBlock:i,pathABlocks:a,pathBBlocks:o,mergeBlock:l,afterMerge:p,parallelBlockCount:m}=_,h=[],g=Math.max(a.length,o.length);for(let e=0;e(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(e.type||``).toLowerCase()===`looper`?(0,f.jsx)(v,{block:e,selected:e.id===t,onSelect:n,onToggle:r,looperStore:c[e.id],onModelBrowser:s}):(0,f.jsx)(se,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]},e.id)),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(ae,{block:i,selected:i.id===t,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]}),a.map((e,i)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(e.type||``).toLowerCase()===`looper`?(0,f.jsx)(v,{block:e,selected:e.id===t,onSelect:n,onToggle:r,looperStore:c[e.id],onModelBrowser:s}):(0,f.jsx)(se,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,pathLabel:`A`,onModelBrowser:s}),(0,f.jsx)(re,{})]},e.id)),a.length>0&&(0,f.jsx)(re,{}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(oe,{block:l,selected:l.id===t,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]}),p.map((e,i)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(e.type||``).toLowerCase()===`looper`?(0,f.jsx)(v,{block:e,selected:e.id===t,onSelect:n,onToggle:r,looperStore:c[e.id],onModelBrowser:s}):(0,f.jsx)(se,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]},e.id)),(0,f.jsx)(ie,{label:`OUT`,isLeft:!1})]}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`stretch`,padding:`0 12px`,position:`relative`},children:(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,minHeight:24},children:(0,f.jsx)(`div`,{style:{width:`calc(100%)`,position:`relative`}})})}),(0,f.jsxs)(`div`,{ref:d,style:{display:`flex`,alignItems:`center`,gap:4,padding:`2px 12px 8px`,overflowX:`auto`,overflowY:`hidden`,minHeight:76,scrollBehavior:`smooth`,WebkitOverflowScrolling:`touch`,borderTop:`1px solid ${S.border}33`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,paddingRight:4,opacity:.3,pointerEvents:`none`},children:e.length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:e.map((e,t)=>(0,f.jsx)(`div`,{style:{minWidth:124,height:20,fontSize:8,color:S.textDim,display:`flex`,alignItems:`center`,gap:4},children:(0,f.jsx)(`span`,{children:`──`})},e.id))})}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,opacity:.6},children:(0,f.jsxs)(`svg`,{width:`22`,height:`24`,viewBox:`0 0 22 24`,fill:`none`,style:{flexShrink:0},children:[(0,f.jsx)(`line`,{x1:`8`,y1:`0`,x2:`8`,y2:`18`,stroke:S.blue,strokeWidth:`1.5`,strokeDasharray:`3,2`}),(0,f.jsx)(`line`,{x1:`2`,y1:`18`,x2:`18`,y2:`18`,stroke:S.blue,strokeWidth:`1.5`}),(0,f.jsx)(`polyline`,{points:`14,14 18,18 14,22`,fill:`none`,stroke:S.blue,strokeWidth:`1.5`})]})}),o.length===0&&(0,f.jsxs)(`div`,{style:{flexShrink:0,padding:`16px 16px`,color:S.textDim,fontSize:10,border:`1px dashed ${S.border}44`,borderRadius:6,display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(`span`,{style:{color:`#80B0C0`,fontSize:8,fontWeight:700,letterSpacing:`.1em`},children:`PATH B`}),(0,f.jsx)(`span`,{children:`Add blocks to Path B`})]}),o.map((i,a)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(se,{block:i,selected:i.id===t,index:a+e.length+1,onSelect:n,onToggle:r,pathLabel:`B`}),(0,f.jsx)(re,{narrow:!0})]},i.id)),o.length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,opacity:.6},children:(0,f.jsxs)(`svg`,{width:`22`,height:`24`,viewBox:`0 0 22 24`,fill:`none`,style:{flexShrink:0},children:[(0,f.jsx)(`line`,{x1:`14`,y1:`24`,x2:`14`,y2:`6`,stroke:S.blue,strokeWidth:`1.5`,strokeDasharray:`3,2`}),(0,f.jsx)(`line`,{x1:`4`,y1:`6`,x2:`20`,y2:`6`,stroke:S.blue,strokeWidth:`1.5`}),(0,f.jsx)(`polyline`,{points:`8,10 4,6 8,2`,fill:`none`,stroke:S.blue,strokeWidth:`1.5`})]})}),(0,f.jsx)(`div`,{style:{flex:1,minWidth:20}}),o.length>0&&(0,f.jsx)(`div`,{style:{flexShrink:0,fontSize:7,fontWeight:700,color:`#80B0C0`,letterSpacing:`.12em`,textTransform:`uppercase`,padding:`0 8px`,opacity:.5},children:`Path B`})]}),(0,f.jsxs)(`div`,{style:{position:`absolute`,left:0,top:0,bottom:0,width:20,display:`flex`,flexDirection:`column`,pointerEvents:`none`,opacity:.4},children:[(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:8,fontWeight:700,color:`#B080C0`,writingMode:`vertical-rl`,letterSpacing:`.2em`},children:`A`}),(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:8,fontWeight:700,color:`#80B0C0`,writingMode:`vertical-rl`,letterSpacing:`.2em`},children:`B`})]})]})})():(0,f.jsxs)(`div`,{ref:u,onScroll:te,style:{display:`flex`,alignItems:`center`,gap:4,padding:`10px 12px`,overflowX:`auto`,overflowY:`hidden`,minHeight:96,background:S.bg,borderBottom:`1px solid ${S.border}`,scrollBehavior:`smooth`,WebkitOverflowScrolling:`touch`},children:[(0,f.jsx)(ie,{label:`IN`,isLeft:!0}),e.map((e,i)=>(0,f.jsxs)(`div`,{draggable:!0,onDragStart:e=>y(e,i),onDragOver:b,onDrop:e=>x(e,i),onDragEnd:C,style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(e.type||``).toLowerCase()===`looper`?(0,f.jsx)(v,{block:e,selected:e.id===t,onSelect:n,onToggle:r,looperStore:c[e.id],onModelBrowser:s}):(0,f.jsx)(se,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]},e.id)),e.length===0&&(0,f.jsx)(`div`,{style:{flexShrink:0,padding:`22px 20px`,color:S.textDim,fontSize:12,textAlign:`center`,border:`1px dashed ${S.border}`,borderRadius:8,minWidth:140},children:`No blocks in chain`}),(0,f.jsx)(ie,{label:`OUT`,isLeft:!1})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,padding:`8px 12px`,borderBottom:`1px solid ${S.border}`,background:S.panel},children:[(0,f.jsx)(`button`,{onClick:a,style:{flex:1,padding:`10px`,borderRadius:7,background:S.surface,border:`1px dashed ${S.border}`,color:S.textSec,fontSize:12,fontWeight:600,cursor:`pointer`,letterSpacing:`.04em`,transition:`all .12s`},children:`+ Add Block`}),t&&(0,f.jsx)(`button`,{onClick:()=>o(t),style:{padding:`10px 14px`,borderRadius:7,background:`rgba(200,64,64,.15)`,border:`1px solid rgba(200,64,64,.3)`,color:S.red,fontSize:12,fontWeight:600,cursor:`pointer`,transition:`all .12s`},children:`✕ Remove`})]})]})}var E={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`};E.amber,E.amber,E.red,E.blue,E.blue,E.blue,E.blue,E.green,E.green,E.green,E.green;function D(e){return{gate:`GATE`,overdrive:`OD`,distortion:`DST`,fuzz:`FUZZ`,chorus:`CHO`,flanger:`FLN`,phaser:`PHA`,tremolo:`TRE`,delay:`DLY`,echo:`ECH`,reverb:`REV`,compressor:`CMP`,eq:`EQ`,cabinet:`CAB`,ir:`IR`,nam:`NAM`}[(e||``).toLowerCase()]||(e||`FX`).toUpperCase().slice(0,4)}function ue({id:e,label:t,mainLabel:n,type:r,sub:i,active:a,enabled:o,onClick:s,onDoubleClick:c,isBank:u,bankDir:d}){let p=(0,l.useRef)(null);(0,l.useEffect)(()=>{let t=p.current;if(!t||!c)return;let n=0,r=()=>{let t=Date.now();t-n<300?(c(e),n=0):n=t};return t.addEventListener(`click`,r),()=>t.removeEventListener(`click`,r)},[e,c]);let m=r===`bypass`,h=r===`bank`,g=a||m&&!o;return(0,f.jsxs)(`div`,{ref:p,onClick:()=>s?.(e),style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:2,padding:`6px 3px 8px`,borderRadius:8,border:`1px solid ${g?E.amber:h?E.blueDim:E.border}`,background:g&&!m?`linear-gradient(180deg, ${E.amber}15 0%, ${E.panel} 100%)`:m&&!o?`linear-gradient(180deg, ${E.red}15 0%, ${E.panel} 100%)`:E.surface,cursor:`pointer`,minHeight:58,position:`relative`,transition:`all .1s`,WebkitTapHighlightColor:`transparent`,boxShadow:g&&!m?`0 0 8px ${E.amber}33, inset 0 0 0 1px ${E.amber}22`:m&&!o?`0 0 8px ${E.red}33`:`none`},children:[(0,f.jsx)(`div`,{style:{width:`100%`,background:`#0A0A10`,border:`1px solid ${g?E.amber+`66`:E.border}`,borderRadius:3,padding:`2px 2px`,textAlign:`center`,minHeight:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:g?`inset 0 0 4px ${E.amber}22`:`none`},children:(0,f.jsx)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:7,fontWeight:700,letterSpacing:`.02em`,color:g?E.amber:m&&!o?E.red:E.textPrimary,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,lineHeight:1.1},children:t})}),(0,f.jsx)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:h?10:9,fontWeight:700,color:o===!1?E.textDim:E.textPrimary,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,lineHeight:1.2,marginTop:1},children:n||t||r||e||`FX`}),i&&(0,f.jsx)(`div`,{style:{fontSize:7,color:E.textDim,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,lineHeight:1},children:i}),!h&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:3,right:3,width:4,height:4,borderRadius:`50%`,background:o===!1?E.textDim:E.green,boxShadow:o===!1?`none`:`0 0 5px ${E.green}`,transition:`all .15s`}}),h&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:3,right:3,fontSize:6,padding:`1px 3px`,borderRadius:2,background:`${E.blueDim}88`,color:E.blue,fontWeight:700,lineHeight:1},children:d===`up`?`▲`:`▼`})]})}function de({mode:e=`stomp`,blocks:t=[],selectedBlockId:n,currentBank:r=`A`,presets:i=[],currentPreset:a,snapshots:o=[],currentSnapshot:s,onSelectBlock:c,onToggleBlock:l,onBankUp:u,onBankDown:d,onGlobalBypass:p,globalBypass:m,onTunerToggle:h,tunerEnabled:g,onPresetClick:_,onSnapshotClick:v,looperActive:y,looperTransport:b}){let x=[];if(e===`stomp`||e===`stomp-b`)if(y&&b)x=[{id:`looper_record`,type:`looper`,label:`REC`,mainLabel:`Record`,enabled:!0,looperAction:`record`},{id:`looper_play`,type:`looper`,label:`PLAY`,mainLabel:`Play`,enabled:!0,looperAction:`play`},{id:`looper_stop`,type:`looper`,label:`STOP`,mainLabel:`Stop`,enabled:!0,looperAction:`stop`}],t.filter(e=>e.id!==n).slice(0,3).forEach(e=>{x.push({id:e.id,type:`block`,label:D(e.type),mainLabel:e.name||e.type||`FX`,sub:e.bypassed?`BYPASSED`:``,enabled:!e.bypassed})}),x=x.slice(0,5),x.push({id:`bypass`,type:`bypass`,label:m?`MUTED`:`BYPASS`,mainLabel:`GLOBAL`,sub:m?``:`tap to mute`,enabled:!m});else{let e=t.length>5?6:Math.max(4,t.length),n=t.slice(0,e).map(e=>({id:e.id,type:`block`,label:D(e.type),mainLabel:e.name||e.type||`FX`,sub:e.bypassed?`BYPASSED`:``,enabled:!e.bypassed}));for(;n.length<5;)n.push({id:`empty_`+n.length,type:`empty`,label:`—`,mainLabel:`Empty`,enabled:!1});x=[...n.slice(0,5),{id:`bypass`,type:`bypass`,label:m?`MUTED`:`BYPASS`,mainLabel:`GLOBAL`,sub:m?``:`tap to mute`,enabled:!m}]}else if(e===`preset`)x=[{id:`bank_up`,type:`bank`,label:`BANK ▲`,mainLabel:`${r} · ${a}`,bankDir:`up`,enabled:!0},...i.slice(0,4).map((e,t)=>({id:`preset_`+t,type:`preset`,label:`0${e.num||t+1}`,mainLabel:e.name||`P${t+1}`,sub:e.num===a?`ACTIVE`:``,enabled:!0})),{id:`bank_down`,type:`bank`,label:`BANK ▼`,mainLabel:`${r} · ${a}`,bankDir:`down`,enabled:!0}];else if(e===`snapshot`)for(x=[...o.slice(0,6).map((e,t)=>({id:`snap_`+(e.num||t),type:`snapshot`,label:`SNAP ${e.num||t+1}`,mainLabel:e.name||`Snapshot ${e.num||t+1}`,sub:(e.num||t+1)===s?`ACTIVE`:``,enabled:!0}))];x.length<6;)x.push({id:`snap_empty_`+x.length,type:`empty`,label:`—`,mainLabel:`Empty`,enabled:!1});return(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,padding:`6px 8px 10px`,background:E.bg,borderTop:`1px solid ${E.border}`,flexShrink:0},children:x.map(t=>(0,f.jsx)(ue,{id:t.id,label:t.label,mainLabel:t.mainLabel,type:t.type,sub:t.sub,active:t.id===n||t.type===`preset`&&t.sub===`ACTIVE`||t.type===`snapshot`&&t.sub===`ACTIVE`,enabled:t.enabled,isBank:t.type===`bank`,bankDir:t.bankDir,onClick:t=>{t===`bank_up`?u?.():t===`bank_down`?d?.():t===`bypass`?p?.():t?.startsWith(`preset_`)?_?.(t.replace(`preset_`,``)):t?.startsWith(`snap_`)?v?.(t.replace(`snap_`,``)):t?.startsWith(`looper_`)&&b?b[t.replace(`looper_`,``)]?.():(e===`stomp`||e===`stomp-b`)&&c?.(t)},onDoubleClick:t=>{t!==`bank_up`&&t!==`bank_down`&&t!==`bypass`&&!t?.startsWith(`looper_`)&&(e===`stomp`||e===`stomp-b`)&&l?.(t)}},t.id))})}var O={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},fe=[{num:6,name:`E`,freq:82.41,color:`#C84040`},{num:5,name:`A`,freq:110,color:`#D07030`},{num:4,name:`D`,freq:146.83,color:`#E8A030`},{num:3,name:`G`,freq:196,color:`#60A0E0`},{num:2,name:`B`,freq:246.94,color:`#3A7BA8`},{num:1,name:`e`,freq:329.63,color:`#50C080`}],k=[{note:`E2`,freq:82.41},{note:`F2`,freq:87.31},{note:`G2`,freq:98},{note:`A2`,freq:110},{note:`B2`,freq:123.47},{note:`C3`,freq:130.81},{note:`D3`,freq:146.83},{note:`E3`,freq:164.81},{note:`F3`,freq:174.61},{note:`G3`,freq:196},{note:`A3`,freq:220},{note:`B3`,freq:246.94},{note:`C4`,freq:261.63},{note:`D4`,freq:293.66},{note:`E4`,freq:329.63}];function A(){let e=Date.now()/1e3,t=k[Math.floor(e*.3%k.length)],n=Math.sin(e*2.5)*15,r=.6+Math.sin(e*.7)*.25,i=-1;for(let e=0;e({note:`--`,cents:0,string:-1,confidence:0,frequency:0}));(0,l.useEffect)(()=>{t&&e&&i({note:e.tuner_note||`--`,cents:e.tuner_cents??0,string:e.tuner_string??-1,confidence:e.tuner_confidence??0,frequency:e.tuner_frequency??0})},[t,e]),(0,l.useEffect)(()=>{if(t&&e?.tuner_enabled)return;let n=setInterval(()=>{i(A())},200);return()=>clearInterval(n)},[t,e]),(0,l.useEffect)(()=>{if(!t||!e?.tuner_enabled)return;let n=!1,r=async()=>{try{let e=(()=>{try{let e=localStorage.getItem(`pedal_channel`);return e===`guitar`||e===`bass`?e:`guitar`}catch{return`guitar`}})(),t=await fetch(`/api/tuner/pitch?channel=${e}`);if(!n&&t.ok){let e=await t.json();i({note:e.note||`--`,cents:e.cents??0,string:e.string??-1,confidence:e.confidence??0,frequency:e.frequency??0})}}catch{}};r();let a=setInterval(r,80);return()=>{n=!0,clearInterval(a)}},[t,e?.tuner_enabled]);let a=r.cents,o=r.confidence,s=(Math.max(-50,Math.min(50,a))+50)/100,c=Math.abs(a)<=3,u=Math.abs(a)<=10,d=r.string,p=[];for(let e=-50;e<=50;e+=5)p.push(e);let m=c?O.green:u?O.amber:O.textPrimary;return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,background:O.bg,overflow:`hidden`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`6px 12px`,background:O.panel,borderBottom:`1px solid ${O.border}`,flexShrink:0},children:[(0,f.jsx)(`div`,{style:{fontSize:10,fontWeight:700,letterSpacing:`.12em`,textTransform:`uppercase`,color:c?O.green:O.amber},children:c?`● In Tune`:`◌ Tuner`}),(0,f.jsx)(`button`,{onClick:n,style:{padding:`6px 14px`,borderRadius:6,background:O.surface,border:`1px solid ${O.border}`,color:O.textPrimary,fontSize:11,fontWeight:600,cursor:`pointer`},children:`✕ Exit Tuner`})]}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:6,padding:`8px 16px`},children:[(0,f.jsx)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:72,fontWeight:700,color:m,textShadow:c?`0 0 30px ${O.green}44`:u?`0 0 20px ${O.amber}33`:`none`,lineHeight:1,letterSpacing:`.02em`,transition:`color .08s, text-shadow .08s`,minHeight:76,display:`flex`,alignItems:`center`,justifyContent:`center`},children:r.note}),(0,f.jsxs)(`div`,{style:{width:`100%`,maxWidth:320,height:60,position:`relative`,marginTop:4},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,bottom:16,left:0,right:0,height:16,display:`flex`,alignItems:`flex-end`,justifyContent:`space-between`,padding:`0 10px`},children:p.map((e,t)=>{let n=e===0,r=e%10==0;return(0,f.jsx)(`div`,{style:{width:n?3:r?2:1,height:n?16:r?10:5,background:n?O.amber:O.border,borderRadius:1,flexShrink:0}},t)})}),(0,f.jsxs)(`div`,{style:{position:`absolute`,bottom:2,left:0,right:0,display:`flex`,justifyContent:`space-between`,padding:`0 6px`,fontSize:7,color:O.textDim,fontFamily:`'JetBrains Mono', monospace`},children:[(0,f.jsx)(`span`,{children:`-50¢`}),(0,f.jsx)(`span`,{children:`-25¢`}),(0,f.jsx)(`span`,{children:`0¢`}),(0,f.jsx)(`span`,{children:`+25¢`}),(0,f.jsx)(`span`,{children:`+50¢`})]}),(0,f.jsxs)(`div`,{style:{position:`absolute`,bottom:16,left:`calc(10px + ${s} * (100% - 20px))`,transform:`translateX(-50%)`,transition:`left .04s ease-out`},children:[(0,f.jsx)(`div`,{style:{width:2,height:44,background:c?O.green:u?O.amber:O.textPrimary,borderRadius:1,margin:`0 auto`,boxShadow:c?`0 0 8px ${O.green}`:`0 0 4px ${u?O.amber:`transparent`}`}}),(0,f.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:c?O.green:u?O.amber:O.textPrimary,margin:`-1px auto 0`,boxShadow:c?`0 0 12px ${O.green}`:`0 0 6px ${u?O.amber:`transparent`}`}})]})]}),(0,f.jsxs)(`div`,{style:{fontSize:13,fontFamily:`'JetBrains Mono', monospace`,color:m,letterSpacing:`.04em`,minHeight:18},children:[a>0?`+${a}¢`:`${a}¢`,c&&(0,f.jsx)(`span`,{style:{color:O.green},children:` ✓`})]})]}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:6,padding:`8px 16px 12px`,justifyContent:`center`,borderTop:`1px solid ${O.border}`,flexShrink:0},children:fe.map(e=>{let t=e.num===d;return(0,f.jsxs)(`div`,{style:{width:40,height:40,borderRadius:8,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,background:t?`${e.color}22`:O.surface,border:`2px solid ${t?e.color:O.border}`,transition:`all .1s`,boxShadow:t?`0 0 12px ${e.color}44`:`none`},children:[(0,f.jsx)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:16,fontWeight:700,color:t?e.color:O.textDim,lineHeight:1},children:e.name}),(0,f.jsx)(`span`,{style:{fontSize:8,color:t?e.color:O.textDim,opacity:.7,lineHeight:1},children:e.num})]},e.num)})}),(0,f.jsxs)(`div`,{style:{padding:`0 16px 8px`,display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[(0,f.jsx)(`span`,{style:{fontSize:8,color:O.textDim,fontFamily:`'JetBrains Mono', monospace`},children:`SIG`}),(0,f.jsx)(`div`,{style:{flex:1,height:3,borderRadius:2,background:O.border,overflow:`hidden`},children:(0,f.jsx)(`div`,{style:{height:`100%`,width:`${Math.max(0,Math.min(100,o*100))}%`,background:o>.7?O.green:o>.3?O.amber:O.red,borderRadius:2,transition:`width .08s`}})}),(0,f.jsxs)(`span`,{style:{fontSize:8,color:O.textDim,fontFamily:`'JetBrains Mono', monospace`,minWidth:20,textAlign:`right`},children:[Math.round(o*100),`%`]})]})]})}var j={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},me={overdrive:[{key:`drive`,label:`Drive`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50},{key:`level`,label:`Level`,min:0,max:100,def:70}],distortion:[{key:`drive`,label:`Drive`,min:0,max:100,def:50},{key:`tone`,label:`Tone`,min:0,max:100,def:40},{key:`level`,label:`Level`,min:0,max:100,def:60}],fuzz:[{key:`fuzz`,label:`Fuzz`,min:0,max:100,def:60},{key:`tone`,label:`Tone`,min:0,max:100,def:30},{key:`level`,label:`Level`,min:0,max:100,def:60}],delay:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],echo:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],reverb:[{key:`decay`,label:`Decay`,min:0,max:100,def:50},{key:`mix`,label:`Mix`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50}],chorus:[{key:`rate`,label:`Rate`,min:0,max:100,def:40},{key:`depth`,label:`Depth`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],flanger:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],phaser:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],compressor:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:50},{key:`ratio`,label:`Ratio`,min:1,max:20,def:4},{key:`gain`,label:`Gain`,min:0,max:100,def:50}],gate:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:30},{key:`release`,label:`Release`,min:0,max:100,def:50}],eq:[{key:`low`,label:`Low`,min:-12,max:12,def:0},{key:`mid`,label:`Mid`,min:-12,max:12,def:0},{key:`high`,label:`High`,min:-12,max:12,def:0},{key:`level`,label:`Level`,min:0,max:100,def:70}],cabinet:[{key:`level`,label:`Level`,min:0,max:100,def:75}],ir:[{key:`level`,label:`Level`,min:0,max:100,def:75}],looper:h.filter(e=>e.type!==`select`)},he={overdrive:j.amber,distortion:j.red,fuzz:`#C07030`,delay:j.blue,echo:j.blue,reverb:`#60B0D0`,chorus:j.green,flanger:`#50C080`,phaser:`#80C050`,tremolo:j.green,compressor:`#D09040`,gate:j.textSec,eq:`#7080D0`,cabinet:`#D07090`,ir:`#D07090`,nam:`#E0A040`,boost:j.amber,wah:`#D0A060`,volume:j.textSec,tuner:`#80D0A0`,looper:m},ge={overdrive:`OD-808`,distortion:`RAT`,fuzz:`Big Muff`,delay:`Digital Delay`,echo:`Tape Echo`,reverb:`Hall Reverb`,chorus:`Chorus`,flanger:`Flanger`,phaser:`Phase 90`,tremolo:`Tremolo`,compressor:`Compressor`,gate:`Noise Gate`,eq:`EQ`,cabinet:`Cabinet`,ir:`IR Loader`,nam:`NAM Model`,boost:`Clean Boost`,wah:`Wah`,volume:`Volume`,tuner:`Tuner`,loop:`FX Loop`,looper:`Looper`};function _e(e){return me[(e||``).toLowerCase()]||[{key:`level`,label:`Level`,min:0,max:100,def:50}]}function ve(e){return he[(e||``).toLowerCase()]||j.amber}function ye(e){let t=(e.type||``).toLowerCase();return e.nam_model_path?e.nam_model_path.split(`/`).pop()?.replace(/\.(nam|wav|aiff?)$/i,``)||`NAM Model`:e.ir_file_path?e.ir_file_path.split(`/`).pop()?.replace(/\.(wav|aiff?|ir)$/i,``)||`IR Loader`:ge[t]||t.charAt(0).toUpperCase()+t.slice(1)}function be({label:e,value:t=50,onChange:n,size:r=72,color:i=j.amber,min:a=0,max:o=100,compact:s=!1}){let c=(0,l.useRef)(null),u=(t-a)/(o-a),d=-140+u*280,p=r*.38,m=r*.5-p,h=e=>{e.preventDefault(),c.current={y:e.touches?e.touches[0].clientY:e.clientY,val:t};let r=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,r=(c.current.y-t)/120,i=Math.max(a,Math.min(o,c.current.val+r*(o-a)));n?.(Math.round(i))},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),window.removeEventListener(`touchmove`,r),window.removeEventListener(`touchend`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i),window.addEventListener(`touchmove`,r,{passive:!1}),window.addEventListener(`touchend`,i)},g=r+16,_=g/2,v=g/2,y=r/2+4,b=_+y*Math.cos(Math.PI/180*-230),x=v+y*Math.sin(Math.PI/180*-230),S=_+y*Math.cos((d-90)*(Math.PI/180)),C=v+y*Math.sin((d-90)*(Math.PI/180)),w=+(u*280>180);return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:s?2:6,cursor:`pointer`},children:[(0,f.jsxs)(`div`,{style:{width:r,height:r,position:`relative`,touchAction:`none`},onMouseDown:h,onTouchStart:h,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-8,width:g,height:g,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:_,cy:v,r:y,fill:`none`,stroke:j.border,strokeWidth:`3`,strokeLinecap:`round`,opacity:`.5`}),u>0&&(0,f.jsx)(`path`,{d:`M ${b} ${x} A ${y} ${y} 0 ${w} 1 ${S} ${C}`,fill:`none`,stroke:i,strokeWidth:`3`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 4px ${i})`}})]}),(0,f.jsx)(`div`,{style:{borderRadius:`50%`,width:`100%`,height:`100%`,position:`relative`,background:`radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22)`,boxShadow:`0 3px 12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07)`},children:(0,f.jsx)(`div`,{style:{position:`absolute`,width:4,borderRadius:2,background:i,left:`50%`,transformOrigin:`bottom center`,height:p,top:m,transform:`translateX(-50%) rotate(${d}deg)`,transformOrigin:`50% ${p}px`,boxShadow:`0 0 6px ${i}`}})})]}),(0,f.jsx)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:s?11:14,fontWeight:700,color:i},children:t}),(0,f.jsx)(`div`,{style:{fontSize:s?7:9,color:j.textSec,letterSpacing:`.06em`,textTransform:`uppercase`,textAlign:`center`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:r+16},children:e})]})}function xe({label:e,value:t=50,onChange:n,onChangeEnd:r,min:i=0,max:a=100,color:o=j.amber}){let s=(0,l.useRef)(null),c=(0,l.useRef)(!1),u=(0,l.useRef)(t),d=(0,l.useRef)(n),p=(0,l.useRef)(r),m=(t-i)/(a-i)*100,[h,g]=(0,l.useState)(null);(0,l.useMemo)(()=>{d.current=n},[n]),(0,l.useMemo)(()=>{p.current=r},[r]);let _=(0,l.useCallback)(e=>{let n=s.current;if(!n)return t;let r=n.getBoundingClientRect(),o=(e.touches?e.touches[0].clientX:e.clientX)-r.left;return Math.round(i+Math.max(0,Math.min(1,o/r.width))*(a-i))},[i,a,t]);(0,l.useMemo)(()=>{let e=e=>{if(!c.current)return;e.preventDefault();let t=_(e);u.current=t,g(t),d.current?.(t)},t=()=>{c.current&&(p.current?.(u.current),c.current=!1,g(null))};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[_]);let v=e=>{e.preventDefault();let t=_(e);u.current=t,c.current=!0,g(t),d.current?.(t)},y=e=>n=>{n.preventDefault(),n.stopPropagation();let r=Math.max(i,Math.min(a,t+e));d.current?.(r),p.current?.(r)};return(0,f.jsxs)(`div`,{style:{marginBottom:4},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:2},children:[(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,textTransform:`uppercase`,letterSpacing:`.06em`,color:o},children:e}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(`button`,{style:{width:34,height:34,borderRadius:`50%`,border:`1px solid ${j.border}`,background:j.panel,color:j.textPrimary,fontSize:16,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:y(-5),onTouchStart:y(-5),children:`−`}),(0,f.jsx)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:16,fontWeight:700,color:o,minWidth:40,textAlign:`center`},children:h??t}),(0,f.jsx)(`button`,{style:{width:34,height:34,borderRadius:`50%`,border:`1px solid ${j.border}`,background:j.panel,color:j.textPrimary,fontSize:16,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:y(5),onTouchStart:y(5),children:`+`})]})]}),(0,f.jsxs)(`div`,{ref:s,onMouseDown:v,onTouchStart:v,style:{position:`relative`,height:44,display:`flex`,alignItems:`center`,cursor:`pointer`,touchAction:`none`},children:[(0,f.jsx)(`div`,{style:{width:`100%`,height:10,background:j.border,borderRadius:5,position:`relative`,overflow:`hidden`},children:(0,f.jsx)(`div`,{style:{height:`100%`,borderRadius:5,position:`absolute`,top:0,left:0,width:`${m}%`,background:o,boxShadow:`0 0 8px ${o}44`,transition:`width .03s`}})}),(0,f.jsx)(`div`,{style:{width:30,height:30,borderRadius:`50%`,position:`absolute`,top:`50%`,left:`${m}%`,transform:`translate(-50%,-50%)`,background:o,boxShadow:`0 2px 10px rgba(0,0,0,.6), 0 0 0 3px ${j.bg}`,pointerEvents:`none`,transition:`left .03s`}})]})]})}function Se({defs:e,params:t,viewMode:n,color:r,onParamChange:i,onParamChangeEnd:a,compact:o}){return(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:n===`knob`?8:0,width:`100%`,minWidth:0,flexShrink:0},children:n===`slider`?e.map(e=>(0,f.jsx)(xe,{label:e.label,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,color:r,onChange:t=>i(e.key,t),onChangeEnd:t=>a(e.key,t)},e.key)):(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(${o?4:Math.min(4,e.length)}, 1fr)`,gap:12,padding:`8px 0`,justifyItems:`center`,width:`100%`,maxWidth:480,margin:`0 auto`},children:e.map(e=>(0,f.jsx)(be,{label:e.label,size:o?60:72,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,color:r,onChange:t=>{i(e.key,t),a(e.key,t)},compact:o},e.key))})})}function Ce({block:e,params:t,viewMode:n,onClose:r,onParamChange:i,onParamChangeEnd:a,onToggleView:o,onToggleBypass:s,onOpenModelBrowser:c}){let u=_e(e.type),d=ve(e.type),p=ye(e),m=(0,l.useMemo)(()=>{let e=[];for(let t=0;t{let e=()=>b(window.innerWidth<500);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let x=(0,l.useCallback)(e=>{v.current=e.touches[0].clientX},[]),S=(0,l.useCallback)(e=>{if(v.current==null)return;let t=e.changedTouches[0].clientX-v.current;v.current=null,!(Math.abs(t)<50)&&(t<0&&hMath.min(e+1,m.length-1)):t>0&&h>0&&g(e=>Math.max(e-1,0)))},[h,m.length]);return(0,l.useMemo)(()=>{let e=e=>{e.key===`ArrowLeft`&&h>0&&g(e=>e-1),e.key===`ArrowRight`&&he+1),e.key===`Escape`&&r?.()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h,m.length,r]),(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,display:`flex`,flexDirection:`column`,background:j.bg,fontFamily:`'Inter', sans-serif`,color:j.textPrimary},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${j.border}`,background:j.panel,flexShrink:0},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,minWidth:0},children:[(0,f.jsx)(`button`,{onClick:r,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:j.surface,border:`1px solid ${j.border}`,color:j.textPrimary,fontSize:16,cursor:`pointer`,flexShrink:0},children:`✕`}),(0,f.jsxs)(`div`,{style:{minWidth:0},children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:p}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,marginTop:2},children:(0,f.jsx)(`span`,{style:{display:`inline-flex`,padding:`1px 6px`,borderRadius:3,fontSize:9,fontWeight:700,letterSpacing:`.06em`,textTransform:`uppercase`,background:`${d}22`,color:d},children:(e.type||`fx`).replace(/_/g,` `).toUpperCase()})})]})]}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,flexShrink:0},children:(0,f.jsx)(`button`,{onClick:o,style:{padding:`6px 10px`,borderRadius:6,fontSize:10,fontWeight:600,background:j.surface,border:`1px solid ${j.border}`,color:j.textPrimary,cursor:`pointer`,letterSpacing:`.04em`},children:n===`slider`?`◉ Knobs`:`▦ Sliders`})})]}),(0,f.jsx)(`div`,{style:{padding:`6px 14px`,borderBottom:`1px solid ${j.border}`,background:j.surface,flexShrink:0},children:(0,f.jsxs)(`button`,{onClick:s,style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,padding:`10px 14px`,borderRadius:8,border:`2px solid ${e.bypassed?j.red+`66`:j.green+`66`}`,background:e.bypassed?`linear-gradient(180deg, ${j.red+`18`}, ${j.panel})`:`linear-gradient(180deg, ${j.green+`18`}, ${j.panel})`,cursor:`pointer`,transition:`all .12s`},children:[(0,f.jsx)(`div`,{style:{width:12,height:12,borderRadius:`50%`,background:e.bypassed?j.textDim:j.green,boxShadow:e.bypassed?`none`:`0 0 8px ${j.green}`}}),(0,f.jsx)(`span`,{style:{fontSize:12,fontWeight:700,letterSpacing:`.08em`,textTransform:`uppercase`,color:e.bypassed?j.red:j.green},children:e.bypassed?`Bypassed — Tap to Enable`:`Active — Tap to Bypass`})]})}),(0,f.jsx)(`div`,{ref:_,onTouchStart:x,onTouchEnd:S,style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`12px 16px`,display:`flex`,flexDirection:`column`,gap:6},children:m.length===0?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:j.textDim,fontSize:12},children:`No parameters for this block type`}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Se,{defs:m[h],params:t,viewMode:n,color:d,onParamChange:i,onParamChangeEnd:a,compact:y}),(0,f.jsx)(`div`,{style:{flex:1,minHeight:8}})]})}),(0,f.jsxs)(`div`,{style:{padding:`8px 14px 12px`,borderTop:`1px solid ${j.border}`,background:j.panel,flexShrink:0,display:`flex`,flexDirection:`column`,gap:6},children:[m.length>1&&(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:5},children:m.map((e,t)=>(0,f.jsx)(`button`,{onClick:()=>g(t),style:{width:8,height:8,borderRadius:`50%`,border:`none`,padding:0,cursor:`pointer`,background:t===h?d:j.border,opacity:t===h?1:.4,transition:`all .12s`}},t))}),m.length>1&&(0,f.jsxs)(`div`,{style:{textAlign:`center`,fontSize:9,color:j.textDim,fontFamily:`'JetBrains Mono', monospace`,letterSpacing:`.04em`},children:[`Page `,h+1,` / `,m.length,(0,f.jsx)(`span`,{style:{marginLeft:8,opacity:.6},children:`← swipe to navigate →`})]}),c&&(0,f.jsxs)(`button`,{onClick:c,style:{width:`100%`,padding:`8px 14px`,borderRadius:7,background:j.surface,border:`1px solid ${j.border}`,color:j.textPrimary,fontSize:11,fontWeight:600,cursor:`pointer`,letterSpacing:`.04em`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6},children:[(0,f.jsx)(`span`,{children:`🎛`}),` Swap Model / Block Type`]})]})]})}var M={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},we=`/ui/img/`,Te={Distortions:{icon:`fx_distortion`,color:M.red},Dynamics:{icon:`fx_compressor`,color:M.green},Modulations:{icon:`fx_modulator`,color:M.blue},Delays:{icon:`fx_delay`,color:`#60A0E0`},Reverbs:{icon:`fx_reverb`,color:`#60C0D0`},Filters:{icon:`fx_filter`,color:`#D0A060`},Amps:{icon:`fx_amplifier`,color:`#E0A040`},Preamps:{icon:`fx_simulator`,color:`#D08040`},Cabs:{icon:`fx_spatial`,color:`#D07090`},IRs:{icon:`fx_spatial`,color:`#70B090`},"Pitch/Synth":{icon:`fx_pitch`,color:`#A060E0`},"Volume/Pan":{icon:`fx_constant`,color:M.textSec},Looper:{icon:`fx_oscillator`,color:`#80D0A0`},"Send/Return":{icon:`fx_lr`,color:`#9090C0`},Special:{icon:`fx_utility`,color:`#B080C0`}},Ee=[`Distortions`,`Dynamics`,`Modulations`,`Delays`,`Reverbs`,`Filters`,`Amps`,`Preamps`,`Cabs`,`IRs`,`Pitch/Synth`,`Volume/Pan`,`Looper`,`Send/Return`,`Special`],De=[`Preamps`,`Pitch/Synth`],Oe={od:M.amber,overdrive:M.amber,drive:M.amber,dist:M.red,distortion:M.red,fuzz:`#D060E0`,mod:M.blue,chorus:M.blue,flange:M.blue,phaser:M.blue,tremolo:M.blue,vibrato:M.blue,rotary:M.blue,delay:`#60A0E0`,echo:`#60A0E0`,reverb:`#60C0D0`,pitch:`#A060E0`,comp:M.green,compressor:M.green,gate:M.green,filter:`#D0A060`,wah:`#D0A060`,eq:`#80A0B0`,ir:M.green,cab:M.green,nam:`#E0A040`,volume:M.textSec,boost:M.amber,split:`#B080C0`,merge:`#80B0C0`},ke={od:`fx_distortion`,overdrive:`fx_distortion`,drive:`fx_distortion`,dist:`fx_distortion`,distortion:`fx_distortion`,gain:`fx_distortion`,fuzz:`fx_distortion`,delay:`fx_delay`,echo:`fx_delay`,reverb:`fx_reverb`,chorus:`fx_chorus`,flange:`fx_flanger`,flanger:`fx_flanger`,phaser:`fx_phaser`,tremolo:`fx_modulator`,vibrato:`fx_modulator`,rotary:`fx_modulator`,modulator:`fx_modulator`,pitch:`fx_pitch`,harmonizer:`fx_pitch`,shifter:`fx_pitch`,comp:`fx_compressor`,compressor:`fx_compressor`,limiter:`fx_limiter`,gate:`fx_gate`,noise_gate:`fx_gate`,filter:`fx_filter`,wah:`fx_filter`,eq:`fx_eq`,graphic_eq:`fx_eq`,parametric_eq:`fx_parametric_eq`,multiband_eq:`fx_multiband_eq`,ir:`fx_spatial`,cab:`fx_spatial`,cabinet:`fx_spatial`,nam:`fx_simulator`,capture:`fx_simulator`,amp:`fx_amplifier`,amplifier:`fx_amplifier`,volume:`fx_constant`,level:`fx_constant`,boost:`fx_constant`,split:`fx_split_a`,merge:`fx_mixer`,tuner:`fx_analyzer`,mixer:`fx_mixer`,utility:`fx_utility`,plugin:`fx_plugin`,instrument:`fx_instrument`,looper:`fx_oscillator`,converter:`fx_converter`,reamp:`fx_converter`,lr:`fx_lr`},Ae=[{type:`overdrive`,name:`OD-808`,category:`Distortions`,desc:`Classic overdrive`},{type:`distortion`,name:`RAT`,category:`Distortions`,desc:`Aggressive distortion`},{type:`fuzz`,name:`Big Muff`,category:`Distortions`,desc:`Thick fuzz sustain`},{type:`boost`,name:`Clean Boost`,category:`Distortions`,desc:`Clean level boost`},{type:`compressor`,name:`Compressor`,category:`Dynamics`,desc:`Dynamic range control`},{type:`gate`,name:`Noise Gate`,category:`Dynamics`,desc:`Noise suppression`},{type:`chorus`,name:`Chorus`,category:`Modulations`,desc:`Rich chorus effect`},{type:`flanger`,name:`Flanger`,category:`Modulations`,desc:`Jet plane sweep`},{type:`phaser`,name:`Phase 90`,category:`Modulations`,desc:`Iconic phase shift`},{type:`tremolo`,name:`Tremolo`,category:`Modulations`,desc:`Volume modulation`},{type:`delay`,name:`Digital Delay`,category:`Delays`,desc:`Clean digital repeats`},{type:`echo`,name:`Tape Echo`,category:`Delays`,desc:`Warm tape repeats`},{type:`reverb`,name:`Hall Reverb`,category:`Reverbs`,desc:`Lush hall reverb`},{type:`eq`,name:`Equalizer`,category:`Filters`,desc:`3-band tone control`},{type:`wah`,name:`Wah`,category:`Filters`,desc:`Crybaby wah`},{type:`volume`,name:`Volume Pedal`,category:`Volume/Pan`,desc:`Volume control`},{type:`looper`,name:`Looper`,category:`Looper`,desc:`Simple loop recorder`},{type:`split`,name:`Split`,category:`Special`,desc:`Parallel routing`},{type:`merge`,name:`Merge`,category:`Special`,desc:`Sum parallel paths`},{type:`tuner`,name:`Tuner`,category:`Special`,desc:`Instrument tuner`},{type:`loop`,name:`FX Loop`,category:`Send/Return`,desc:`External FX send/return`},{type:`cabinet`,name:`Cabinet`,category:`Cabs`,desc:`Speaker cabinet sim`},{type:`ir`,name:`IR Loader`,category:`IRs`,desc:`Impulse response loader`},{type:`nam`,name:`NAM Model`,category:`Amps`,desc:`Neural amp model`}];function je(e){let t=(e||``).toLowerCase().trim();for(let[e,n]of Object.entries(ke))if(t===e||t.startsWith(e)||t.includes(e))return n;return`fx_plugin`}function Me(e){let t=(e||``).toLowerCase().trim();for(let[e,n]of Object.entries(Oe))if(t===e||t.startsWith(e)||t.includes(e))return n;return M.amber}function Ne({category:e,size:t=14}){let n=Te[e];return n?(0,f.jsx)(`img`,{src:`${we}${n.icon}.svg`,alt:e,style:{width:t,height:t,flexShrink:0,filter:`invert(0.95) brightness(2)`,objectFit:`contain`},onError:e=>{e.target.style.display=`none`}}):null}function Pe({currentBlockType:e,currentBlockName:t,currentModelPath:n,onSelectModel:r,onClose:i}){let[a,o]=(0,l.useState)(`All`),[s,c]=(0,l.useState)(``),[u,d]=(0,l.useState)([]),[p,m]=(0,l.useState)(()=>{try{let e=localStorage.getItem(`helix_model_favorites`);return e?JSON.parse(e):[]}catch{return[]}}),h=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/api/models`).then(e=>e.json());e||d(t.models||[])}catch{}})(),()=>{e=!0}},[]);let g=(0,l.useCallback)(e=>{m(t=>{let n=t.includes(e)?t.filter(t=>t!==e):[...t,e];return localStorage.setItem(`helix_model_favorites`,JSON.stringify(n)),n})},[]),_=n||(e?`builtin:${e}`:null),v=(0,l.useMemo)(()=>{let e=[];for(let t of Ae)e.push({id:`builtin:${t.type}`,type:t.type,name:t.name,category:t.category,desc:t.desc,isBuiltin:!0,iconType:t.type});for(let t of u){let n=t.name||t.filename||`Unnamed Model`;e.push({id:`nam:${n}`,type:`nam`,name:n,category:`Amps`,desc:t.architecture?`${t.architecture} · ${t.size_mb}MB`:`Installed NAM model`,isBuiltin:!1,loaded:t.loaded,modelPath:t.path||t.filename,iconType:`nam`})}return e},[u]),y=(0,l.useMemo)(()=>a===`All`?[...Ee].filter(e=>De.includes(e)?v.some(t=>t.category===e&&!t.isBuiltin):v.some(t=>t.category===e)):a===`★Favorites`?[]:[a],[a,v]),b=(0,l.useMemo)(()=>{let e=v;if(a===`★Favorites`?e=e.filter(e=>p.includes(e.id)):a!==`All`&&(e=e.filter(e=>e.category===a)),s.trim()){let t=s.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.type.toLowerCase().includes(t)||(e.desc||``).toLowerCase().includes(t)||(e.category||``).toLowerCase().includes(t))}return e},[v,a,s,p]),x=(0,l.useMemo)(()=>{if(a!==`All`&&a!==`★Favorites`)return null;let e={};for(let t of b)e[t.category]||(e[t.category]=[]),e[t.category].push(t);return e},[b,a]),S=(0,l.useCallback)(e=>{r?.({type:e.type,name:e.name,modelPath:e.isBuiltin?null:e.modelPath||e.id,isBuiltin:e.isBuiltin}),i?.()},[r,i]),C=[`All`,`★Favorites`,...Ee.filter(e=>De.includes(e)?v.some(t=>t.category===e&&!t.isBuiltin):v.some(t=>t.category===e))];return(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,display:`flex`,flexDirection:`column`,background:M.bg,color:M.textPrimary,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${M.border}`,background:M.panel,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,f.jsx)(`button`,{onClick:i,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:M.surface,border:`1px solid ${M.border}`,color:M.textPrimary,fontSize:16,cursor:`pointer`},children:`✕`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600},children:`Model Browser`}),t&&(0,f.jsxs)(`div`,{style:{fontSize:10,color:M.textSec,marginTop:1},children:[`Current: `,t]})]})]})}),(0,f.jsx)(`div`,{style:{padding:`8px 14px`,borderBottom:`1px solid ${M.border}`,background:M.surface,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,background:M.panel,borderRadius:7,border:`1px solid ${M.border}`,padding:`7px 10px`},children:[(0,f.jsx)(`span`,{style:{color:M.textDim,fontSize:13},children:`🔍`}),(0,f.jsx)(`input`,{ref:h,placeholder:`Search models...`,value:s,onChange:e=>c(e.target.value),style:{flex:1,background:`none`,border:`none`,color:M.textPrimary,fontSize:13,outline:`none`}}),s&&(0,f.jsx)(`button`,{onClick:()=>c(``),style:{background:`none`,border:`none`,color:M.textDim,fontSize:14,cursor:`pointer`,padding:2},children:`✕`})]})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:0,overflowX:`auto`,overflowY:`hidden`,borderBottom:`1px solid ${M.border}`,background:M.panel,flexShrink:0,WebkitOverflowScrolling:`touch`},children:C.map(e=>{let t=Te[e],n=a===e;return(0,f.jsxs)(`button`,{onClick:()=>o(e),style:{padding:`8px 12px`,fontSize:10,fontWeight:600,letterSpacing:`.04em`,whiteSpace:`nowrap`,background:`none`,border:`none`,borderBottom:`2px solid ${n?M.amber:`transparent`}`,color:n?M.textPrimary:M.textSec,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:5,flexShrink:0,transition:`all .12s`},children:[t&&(0,f.jsx)(Ne,{category:e,size:12}),e===`★Favorites`&&(0,f.jsx)(`span`,{children:`★`}),e===`★Favorites`?` Favorites`:e]},e)})}),(0,f.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`10px 14px`,WebkitOverflowScrolling:`touch`},children:[a===`★Favorites`&&b.length===0&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px 20px`,gap:8,color:M.textDim},children:[(0,f.jsx)(`span`,{style:{fontSize:28},children:`☆`}),(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:500},children:`No favorites yet`}),(0,f.jsx)(`div`,{style:{fontSize:11,textAlign:`center`},children:`Star a model to add it to your favorites`})]}),s&&b.length===0&&(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px 20px`,gap:8,color:M.textDim},children:(0,f.jsxs)(`div`,{style:{fontSize:13},children:[`No models matching "`,s,`"`]})}),x?y.map(e=>{let t=x[e]||[];if(t.length===0)return null;let n=Te[e];return(0,f.jsxs)(`div`,{style:{marginBottom:20},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:8},children:[n&&(0,f.jsx)(Ne,{category:e,size:16}),(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:700,letterSpacing:`.08em`,textTransform:`uppercase`,color:M.textSec},children:e}),(0,f.jsx)(`div`,{style:{flex:1,height:1,background:M.border,opacity:.4}})]}),(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(130px, 1fr))`,gap:6},children:t.map(e=>(0,f.jsx)(Fe,{model:e,isCurrent:e.id===_,isFavorite:p.includes(e.id),onSelect:()=>S(e),onToggleFav:()=>g(e.id)},e.id))})]},e)}):(0,f.jsx)(f.Fragment,{children:b.length>0&&(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(130px, 1fr))`,gap:6},children:b.map(e=>(0,f.jsx)(Fe,{model:e,isCurrent:e.id===_,isFavorite:p.includes(e.id),onSelect:()=>S(e),onToggleFav:()=>g(e.id)},e.id))})})]})]})}function Fe({model:e,isCurrent:t,isFavorite:n,onSelect:r,onToggleFav:i}){let a=Me(e.type),[o,s]=(0,l.useState)(!1);return(0,f.jsxs)(`div`,{onClick:r,style:{display:`flex`,flexDirection:`column`,gap:0,padding:`10px 8px 8px`,borderRadius:8,background:t?`linear-gradient(135deg, ${a}18, ${M.panel})`:M.surface,border:`1.5px solid ${t?a+`66`:M.border}`,cursor:`pointer`,position:`relative`,transition:`all .12s`,boxShadow:t?`0 0 12px ${a}33`:`none`,minHeight:72},children:[(0,f.jsx)(`div`,{onClick:e=>{e.stopPropagation(),i()},style:{position:`absolute`,top:4,right:4,fontSize:13,cursor:`pointer`,zIndex:2,color:n?M.amber:M.textDim,textShadow:n?`0 0 4px ${M.amber}`:`none`,transition:`all .15s`,lineHeight:1},children:n?`★`:`☆`}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:34,marginBottom:6},children:o?(0,f.jsx)(`span`,{style:{fontSize:18,color:a,opacity:.7,fontFamily:`'JetBrains Mono', monospace`,fontWeight:700},children:e.name.charAt(0)}):(0,f.jsx)(`img`,{src:`${we}${je(e.iconType||e.type)}.svg`,alt:e.type,style:{width:28,height:28,filter:`invert(0.95) brightness(2) drop-shadow(0 0 4px ${a}44)`,objectFit:`contain`},onError:()=>s(!0)})}),(0,f.jsx)(`div`,{style:{fontSize:11,fontWeight:600,color:t?a:M.textPrimary,textAlign:`center`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3},children:e.name}),(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:3},children:(0,f.jsx)(`span`,{style:{display:`inline-flex`,padding:`1px 5px`,borderRadius:3,fontSize:8,fontWeight:700,letterSpacing:`.05em`,textTransform:`uppercase`,background:`${a}18`,color:a},children:e.type.replace(/_/g,` `)})}),e.desc&&(0,f.jsx)(`div`,{style:{fontSize:8,color:M.textDim,textAlign:`center`,marginTop:3,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.desc}),t&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:4,left:4,width:6,height:6,borderRadius:`50%`,background:M.green,boxShadow:`0 0 6px ${M.green}`}})]})}var Ie={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},Le=[{id:`save`,label:`Save Preset`,icon:`💾`,desc:`Save current preset to bank`},{id:`bypass`,label:`Bypass/Control`,icon:`🔌`,desc:`Footswitch & pedal assignment`},{id:`settings`,label:`Global Settings`,icon:`⚙`,desc:`Master volume, input, MIDI, display`},{id:`eq`,label:`Global EQ`,icon:`📊`,desc:`Low, Mid, High shelving EQ`},{id:`tuner`,label:`Tuner`,icon:`🎵`,desc:`Instrument tuner`},{id:`wifi`,label:`Wi-Fi / Bluetooth`,icon:`📶`,desc:`Wireless & network settings`}];function Re({onClose:e,onItemSelect:t}){let n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let e=n.current;e&&requestAnimationFrame(()=>{e.style.transform=`translateX(0)`})},[]),(0,f.jsx)(`div`,{ref:n,onClick:t=>{t.target===t.currentTarget&&e?.()},style:{position:`fixed`,inset:0,zIndex:999,display:`flex`,background:`rgba(0,0,0,0.55)`,transition:`background .2s ease`},children:(0,f.jsxs)(`div`,{style:{width:260,maxWidth:`75vw`,height:`100%`,background:Ie.panel,borderRight:`1px solid ${Ie.border}`,display:`flex`,flexDirection:`column`,boxShadow:`4px 0 24px rgba(0,0,0,0.5)`,transform:`translateX(-100%)`,transition:`transform .22s cubic-bezier(.22,.61,.36,1)`},children:[(0,f.jsxs)(`div`,{style:{padding:`14px 16px`,borderBottom:`1px solid ${Ie.border}`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexShrink:0},children:[(0,f.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:Ie.textPrimary},children:`☰ Menu`}),(0,f.jsx)(`button`,{onClick:e,style:{width:28,height:28,borderRadius:6,display:`flex`,alignItems:`center`,justifyContent:`center`,background:Ie.surface,border:`1px solid ${Ie.border}`,color:Ie.textSec,fontSize:13,cursor:`pointer`},children:`✕`})]}),(0,f.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 0`},children:Le.map(e=>(0,f.jsxs)(`button`,{onClick:()=>t?.(e.id),style:{width:`100%`,display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,background:`none`,border:`none`,cursor:`pointer`,textAlign:`left`,color:Ie.textPrimary,transition:`background .1s`,borderBottom:`1px solid ${Ie.border}33`},onMouseEnter:e=>{e.currentTarget.style.background=Ie.surface},onMouseLeave:e=>{e.currentTarget.style.background=`none`},children:[(0,f.jsx)(`div`,{style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:Ie.surface,border:`1px solid ${Ie.border}`,fontSize:16,flexShrink:0},children:e.icon}),(0,f.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:600,color:Ie.textPrimary},children:e.label}),(0,f.jsx)(`div`,{style:{fontSize:10,color:Ie.textDim,marginTop:1,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.desc})]}),(0,f.jsx)(`span`,{style:{color:Ie.textDim,fontSize:11},children:`›`})]},e.id))}),(0,f.jsx)(`div`,{style:{padding:`12px 16px`,borderTop:`1px solid ${Ie.border}`,flexShrink:0},children:(0,f.jsx)(`div`,{style:{fontSize:9,color:Ie.textDim,textAlign:`center`,letterSpacing:`.06em`},children:`Helix Stadium v0.1`})})]})})}var N={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},ze={Audio:[{key:`master_volume`,label:`Master Volume`,type:`slider`,min:0,max:100,def:72,unit:`%`,icon:`🔊`},{key:`input_pad`,label:`Input Pad`,type:`select`,def:`off`,options:[{value:`off`,label:`Off (0 dB)`},{value:`-6`,label:`-6 dB`},{value:`-12`,label:`-12 dB`},{value:`-18`,label:`-18 dB`}],icon:`📥`},{key:`input_impedance`,label:`Input Impedance`,type:`select`,def:`1m`,options:[{value:`1m`,label:`1 MΩ`},{value:`500k`,label:`500 kΩ`},{value:`250k`,label:`250 kΩ`},{value:`150k`,label:`150 kΩ`},{value:`68k`,label:`68 kΩ`}],icon:`⚡`}],MIDI:[{key:`midi_channel`,label:`MIDI Channel`,type:`select`,def:`omni`,options:[{value:`omni`,label:`Omni`},...Array.from({length:16},(e,t)=>({value:String(t+1),label:`Channel ${t+1}`}))],icon:`🎹`},{key:`midi_clock`,label:`MIDI Clock`,type:`toggle`,def:!1,icon:`⏱`},{key:`midi_thru`,label:`MIDI Thru`,type:`toggle`,def:!0,icon:`↔`}],Display:[{key:`brightness`,label:`Display Brightness`,type:`slider`,min:1,max:10,def:8,unit:``,icon:`☀️`},{key:`auto_dim`,label:`Auto Dim`,type:`toggle`,def:!0,icon:`🌙`},{key:`screen_saver`,label:`Screen Saver`,type:`select`,def:`5m`,options:[{value:`off`,label:`Off`},{value:`1m`,label:`1 min`},{value:`5m`,label:`5 min`},{value:`15m`,label:`15 min`},{value:`30m`,label:`30 min`}],icon:`💤`}],Tempo:[{key:`tap_tempo`,label:`Tap Tempo`,type:`bpm`,def:120,icon:`🔄`},{key:`tempo_division`,label:`Tempo Division`,type:`select`,def:`quarter`,options:[{value:`half`,label:`½ Note`},{value:`quarter`,label:`¼ Note`},{value:`eighth`,label:`⅛ Note`},{value:`triplet`,label:`⅛ Triplet`},{value:`sixteenth`,label:`¹⁄₁₆ Note`},{value:`dotted_eighth`,label:`Dotted ⅛`}],icon:`🎶`},{key:`tap_tempo_mute`,label:`Mute on Tap`,type:`toggle`,def:!1,icon:`🔇`}]};function Be({label:e,value:t,min:n,max:r,unit:i,onChange:a}){let o=(0,l.useRef)(null),s=(0,l.useRef)(!1),c=(t-n)/(r-n)*100,u=(0,l.useCallback)(e=>{let i=o.current;if(!i)return t;let a=i.getBoundingClientRect(),s=(e.touches?e.touches[0].clientX:e.clientX)-a.left;return Math.round(n+Math.max(0,Math.min(1,s/a.width))*(r-n))},[n,r,t]);(0,l.useEffect)(()=>{let e=e=>{s.current&&(e.preventDefault(),a?.(u(e)))},t=()=>{s.current=!1};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[u,a]);let d=e=>{e.preventDefault(),s.current=!0,a?.(u(e))},p=e=>i=>{i.preventDefault(),i.stopPropagation(),a?.(Math.max(n,Math.min(r,t+e)))};return(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:4},children:[(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:N.textSec},children:e}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,f.jsx)(`button`,{style:{width:26,height:26,borderRadius:`50%`,border:`1px solid ${N.border}`,background:N.panel,color:N.textPrimary,fontSize:14,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:p(-1),onTouchStart:p(-1),children:`−`}),(0,f.jsxs)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:14,fontWeight:700,color:N.amber,minWidth:36,textAlign:`center`},children:[t,i]}),(0,f.jsx)(`button`,{style:{width:26,height:26,borderRadius:`50%`,border:`1px solid ${N.border}`,background:N.panel,color:N.textPrimary,fontSize:14,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:p(1),onTouchStart:p(1),children:`+`})]})]}),(0,f.jsxs)(`div`,{ref:o,onMouseDown:d,onTouchStart:d,style:{position:`relative`,height:32,display:`flex`,alignItems:`center`,cursor:`pointer`,touchAction:`none`},children:[(0,f.jsx)(`div`,{style:{width:`100%`,height:6,background:N.border,borderRadius:3,position:`relative`,overflow:`hidden`},children:(0,f.jsx)(`div`,{style:{height:`100%`,borderRadius:3,position:`absolute`,top:0,left:0,width:`${c}%`,background:N.amber,boxShadow:`0 0 6px ${N.amber}44`,transition:`width .03s`}})}),(0,f.jsx)(`div`,{style:{width:24,height:24,borderRadius:`50%`,position:`absolute`,top:`50%`,left:`${c}%`,transform:`translate(-50%,-50%)`,background:N.amber,border:`3px solid ${N.bg}`,boxShadow:`0 1px 6px rgba(0,0,0,.5)`,pointerEvents:`none`,transition:`left .03s`}})]})]})}function Ve({label:e,value:t,options:n,onChange:r,icon:i}){return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:N.textSec},children:e})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,flexWrap:`wrap`,background:N.panel,borderRadius:6,padding:4},children:n.map(e=>(0,f.jsx)(`button`,{onClick:()=>r?.(e.value),style:{flex:1,padding:`6px 8px`,borderRadius:4,border:`none`,fontSize:10,fontWeight:600,cursor:`pointer`,background:t===e.value?N.amber:`transparent`,color:t===e.value?`#000`:N.textSec,transition:`all .1s`,letterSpacing:`.03em`,whiteSpace:`nowrap`,minWidth:0},children:e.label},e.value))})]})}function He({label:e,value:t,onChange:n}){return(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 0`},children:[(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:N.textSec},children:e}),(0,f.jsx)(`button`,{onClick:()=>n?.(!t),style:{width:44,height:24,borderRadius:12,background:t?N.amber:N.border,border:`none`,cursor:`pointer`,position:`relative`,transition:`background .15s`},children:(0,f.jsx)(`div`,{style:{width:18,height:18,borderRadius:`50%`,background:`#fff`,position:`absolute`,top:3,left:t?23:3,transition:`left .15s`,boxShadow:`0 1px 3px rgba(0,0,0,.3)`}})})]})}function Ue({label:e,value:t,onChange:n}){let r=(0,l.useRef)([]),i=(0,l.useCallback)(()=>{let e=Date.now();if(r.current.push(e),r.current.length>4&&r.current.shift(),r.current.length<2)return;let t=[];for(let e=1;ee+t,0)/t.length,a=Math.max(20,Math.min(300,Math.round(6e4/i)));n?.(a)},[n]);return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:N.textSec},children:e})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(`button`,{onClick:i,style:{padding:`8px 20px`,borderRadius:8,border:`1px solid ${N.amber}66`,background:`${N.amber}15`,color:N.amber,fontSize:12,fontWeight:700,cursor:`pointer`,letterSpacing:`.05em`},children:`TAP`}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,gap:4,background:N.surface,borderRadius:6,border:`1px solid ${N.border}`,padding:`6px 10px`},children:[(0,f.jsx)(`button`,{onClick:()=>n?.(Math.max(20,t-1)),style:{background:`none`,border:`none`,color:N.textDim,fontSize:14,cursor:`pointer`,padding:`0 4px`},children:`−`}),(0,f.jsxs)(`span`,{style:{flex:1,textAlign:`center`,fontFamily:`'JetBrains Mono', monospace`,fontSize:16,fontWeight:700,color:N.amber},children:[t,` BPM`]}),(0,f.jsx)(`button`,{onClick:()=>n?.(Math.min(300,t+1)),style:{background:`none`,border:`none`,color:N.textDim,fontSize:14,cursor:`pointer`,padding:`0 4px`},children:`+`})]})]})]})}function We({onClose:e,onMasterVolume:t}){let[n,r]=(0,l.useState)(()=>{let e={};for(let t of Object.values(ze))for(let n of t)e[n.key]=n.def;return e}),i=Object.entries(ze),a=(0,l.useCallback)((e,n)=>{r(t=>({...t,[e]:n})),e===`master_volume`&&t?.(n)},[t]);return(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:998,display:`flex`,flexDirection:`column`,background:N.bg,color:N.textPrimary,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${N.border}`,background:N.panel,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,f.jsx)(`button`,{onClick:e,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:N.surface,border:`1px solid ${N.border}`,color:N.textPrimary,fontSize:16,cursor:`pointer`},children:`✕`}),(0,f.jsx)(`div`,{children:(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600},children:`Global Settings`})})]})}),(0,f.jsx)(`div`,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`6px 14px 20px`},children:i.map(([e,t])=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:10,fontWeight:700,letterSpacing:`.1em`,textTransform:`uppercase`,color:N.textDim,padding:`14px 0 8px`},children:e}),(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12,background:N.surface,borderRadius:8,border:`1px solid ${N.border}`,padding:`12px 14px`},children:t.map(e=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:10},children:[(0,f.jsx)(`div`,{style:{width:28,height:28,borderRadius:6,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:N.panel,fontSize:13},children:e.icon}),(0,f.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[e.type===`slider`&&(0,f.jsx)(Be,{label:e.label,value:n[e.key]??e.def,min:e.min,max:e.max,unit:e.unit,onChange:t=>a(e.key,t)}),e.type===`select`&&(0,f.jsx)(Ve,{label:e.label,value:n[e.key]??e.def,options:e.options,onChange:t=>a(e.key,t)}),e.type===`toggle`&&(0,f.jsx)(He,{label:e.label,value:n[e.key]??e.def,onChange:t=>a(e.key,t)}),e.type===`bpm`&&(0,f.jsx)(Ue,{label:e.label,value:n[e.key]??e.def,onChange:t=>a(e.key,t)})]})]},e.key))})]},e))})]})}var P={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},Ge=[{key:`low`,label:`Low`,freq:`80 Hz`,color:`#60A0E0`,shadow:`#60A0E044`},{key:`mid`,label:`Mid`,freq:`800 Hz`,color:P.amber,shadow:`${P.amber}44`},{key:`high`,label:`High`,freq:`6.4 kHz`,color:`#60D080`,shadow:`#60D08044`}];function Ke({label:e,freq:t,value:n,min:r,max:i,color:a,onChange:o}){let s=(0,l.useRef)(null),c=(n-r)/(i-r),u=-140+c*280,d=80*.38,p=e=>{e.preventDefault(),s.current={y:e.touches?e.touches[0].clientY:e.clientY,val:n};let t=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,n=(s.current.y-t)/120,a=Math.max(r,Math.min(i,s.current.val+n*(i-r)));o?.(Math.round(a*10)/10)},a=()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`mouseup`,a),window.removeEventListener(`touchmove`,t),window.removeEventListener(`touchend`,a)};window.addEventListener(`mousemove`,t),window.addEventListener(`mouseup`,a),window.addEventListener(`touchmove`,t,{passive:!1}),window.addEventListener(`touchend`,a)},m=48+44*Math.cos(Math.PI/180*-230),h=48+44*Math.sin(Math.PI/180*-230),g=48+44*Math.cos((u-90)*(Math.PI/180)),_=48+44*Math.sin((u-90)*(Math.PI/180)),v=+(c*280>180);return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:4,cursor:`pointer`,minWidth:0},children:[(0,f.jsxs)(`div`,{style:{width:80,height:80,position:`relative`,touchAction:`none`},onMouseDown:p,onTouchStart:p,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-8,width:96,height:96,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:48,cy:48,r:44,fill:`none`,stroke:P.border,strokeWidth:`3`,strokeLinecap:`round`,opacity:`.5`}),c>0&&(0,f.jsx)(`path`,{d:`M ${m} ${h} A 44 44 0 ${v} 1 ${g} ${_}`,fill:`none`,stroke:a,strokeWidth:`3`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 4px ${a})`}})]}),(0,f.jsx)(`div`,{style:{borderRadius:`50%`,width:`100%`,height:`100%`,position:`relative`,background:`radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22)`,boxShadow:`0 3px 12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07)`},children:(0,f.jsx)(`div`,{style:{position:`absolute`,width:4,borderRadius:2,background:a,left:`50%`,transformOrigin:`bottom center`,height:d,top:9.600000000000001,transform:`translateX(-50%) rotate(${u}deg)`,transformOrigin:`50% ${d}px`,boxShadow:`0 0 6px ${a}`}})})]}),(0,f.jsxs)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:14,fontWeight:700,color:a},children:[n>0?`+${n}`:n,` dB`]}),(0,f.jsx)(`div`,{style:{fontSize:8,color:P.textDim,letterSpacing:`.08em`,textTransform:`uppercase`},children:e}),(0,f.jsx)(`div`,{style:{fontSize:8,color:P.textDim,fontFamily:`'JetBrains Mono', monospace`},children:t})]})}function qe({bands:e,values:t}){let n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let r=n.current;if(!r)return;let i=r.getContext(`2d`),a=r.width,o=r.height,s={top:10,bottom:10,left:20,right:10},c=a-s.left-s.right,l=o-s.top-s.bottom;i.clearRect(0,0,a,o),i.strokeStyle=P.border,i.lineWidth=.5;for(let e=-12;e<=12;e+=4){let t=s.top+l*(1-(e+12)/24);i.beginPath(),i.moveTo(s.left,t),i.lineTo(a-s.right,t),i.stroke(),i.fillStyle=P.textDim,i.font=`7px 'JetBrains Mono', monospace`,i.textAlign=`right`,i.fillText(`${e>0?`+`:``}${e}`,s.left-2,t+2)}let u={low:s.left+c*.1,mid:s.left+c*.5,high:s.left+c*.9},d={};e.forEach((e,t)=>{d[e.key]=t});let f=e.map(e=>t[e.key]??0),p=[],m=[];for(let t=0;t<=100;t++){let n=t/100,r=s.left+c*n;e.map((e,t)=>({x:u[e.key],y:-(f[t]||0)}));let i=0;if(n<.1)i=f[0]*(n/.1);else if(n>.9)i=f[2]*((1-n)/.1);else{let e=(n-.1)/.8,t=f[0],r=f[1],a=f[2];i=(1-e)*(1-e)*t+2*(1-e)*e*r+e*e*a}let a=s.top+l*(.5-i/24);p.push(r),m.push(a)}i.beginPath(),i.moveTo(p[0],s.top+l);for(let e=0;e{let t=u[e.key],n=f[d[e.key]]||0,r=s.top+l*(.5-n/24);i.beginPath(),i.arc(t,r,5,0,Math.PI*2),i.fillStyle=e.color,i.fill(),i.strokeStyle=P.bg,i.lineWidth=2,i.stroke()}),i.fillStyle=P.textDim,i.font=`7px 'JetBrains Mono', monospace`,i.textAlign=`center`,i.fillText(`80Hz`,u.low,o-2),i.fillText(`800Hz`,u.mid,o-2),i.fillText(`6.4kHz`,u.high,o-2)},[e,t]),(0,f.jsx)(`canvas`,{ref:n,width:320,height:160,style:{width:`100%`,height:140,borderRadius:8,background:P.panel,border:`1px solid ${P.border}`}})}function Je({onClose:e}){let[t,n]=(0,l.useState)({low:0,mid:0,high:0}),r=(0,l.useCallback)((e,t)=>{n(n=>({...n,[e]:t}))},[]);return(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:998,display:`flex`,flexDirection:`column`,background:P.bg,color:P.textPrimary,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${P.border}`,background:P.panel,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,f.jsx)(`button`,{onClick:e,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:P.surface,border:`1px solid ${P.border}`,color:P.textPrimary,fontSize:16,cursor:`pointer`},children:`✕`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600},children:`Global EQ`}),(0,f.jsx)(`div`,{style:{fontSize:10,color:P.textSec,marginTop:1},children:`3-band shelving equalizer`})]})]})}),(0,f.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`8px 14px`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,f.jsx)(qe,{bands:Ge,values:t}),(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-around`,gap:8,background:P.surface,borderRadius:8,border:`1px solid ${P.border}`,padding:`16px 8px`},children:Ge.map(e=>(0,f.jsx)(Ke,{label:e.label,freq:e.freq,value:t[e.key],min:-12,max:12,color:e.color,onChange:t=>r(e.key,t)},e.key))}),(0,f.jsx)(`button`,{onClick:()=>n({low:0,mid:0,high:0}),style:{width:`100%`,padding:`10px 14px`,borderRadius:8,background:P.surface,border:`1px solid ${P.border}`,color:P.textSec,fontSize:11,fontWeight:600,cursor:`pointer`,letterSpacing:`.06em`},children:`Reset EQ to Flat`})]})]})}var Ye=``,Xe=`guitar`;try{let e=localStorage.getItem(`pedal_channel`);(e===`guitar`||e===`bass`)&&(Xe=e)}catch{}function Ze(e){Xe=e}function Qe(e){return Xe?e+(e.includes(`?`)?`&`:`?`)+`channel=`+encodeURIComponent(Xe):e}async function $e(e,t,n){let r={method:e,headers:{"Content-Type":`application/json`}};n&&(r.body=JSON.stringify(n));let i=await fetch(`${Ye}${Qe(t)}`,r);if(!i.ok)throw Error(`API ${e} ${t}: ${i.status}`);return i.json()}var F={getState:()=>$e(`GET`,`/api/state`),getVu:()=>$e(`GET`,`/api/vu`),updateBlock:(e,t)=>$e(`PATCH`,`/api/block-params`,{id:e,...t}),toggleBlock:(e,t)=>$e(`PATCH`,`/api/blocks`,{id:e,enabled:t}),bypassToggle:()=>$e(`POST`,`/api/bypass/toggle`),masterVolume:e=>$e(`POST`,`/api/volume`,{volume:e/100}),listModels:()=>$e(`GET`,`/api/models`),loadModel:e=>$e(`POST`,`/api/models/load`,{path:e}),listPresets:()=>$e(`GET`,`/api/presets`),getPreset:(e,t)=>$e(`GET`,`/api/presets/${e}/${t}`),activatePreset:(e,t)=>$e(`POST`,`/api/presets/${e}/${t}/activate`),savePreset:(e,t,n,r)=>$e(`PUT`,`/api/presets`,{bank:e,program:t,name:n,tags:r}),searchModels:e=>$e(`GET`,`/api/tonehub/search?q=${encodeURIComponent(e)}`),searchIrs:e=>$e(`GET`,`/api/tonehub/search/irs?q=${encodeURIComponent(e)}`),installModel:(e,t)=>$e(`POST`,`/api/models/tonedownload/install`,{download_url:e,name:t}),installIr:(e,t)=>$e(`POST`,`/api/irs/tonedownload/install`,{download_url:e,name:t}),tunerToggle:e=>$e(`POST`,`/api/tuner`,{enabled:e})},I={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},et={overdrive:[{key:`drive`,label:`Drive`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50},{key:`level`,label:`Level`,min:0,max:100,def:70}],distortion:[{key:`drive`,label:`Drive`,min:0,max:100,def:50},{key:`tone`,label:`Tone`,min:0,max:100,def:40},{key:`level`,label:`Level`,min:0,max:100,def:60}],fuzz:[{key:`fuzz`,label:`Fuzz`,min:0,max:100,def:60},{key:`tone`,label:`Tone`,min:0,max:100,def:30},{key:`level`,label:`Level`,min:0,max:100,def:60}],delay:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],echo:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],reverb:[{key:`decay`,label:`Decay`,min:0,max:100,def:50},{key:`mix`,label:`Mix`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50}],chorus:[{key:`rate`,label:`Rate`,min:0,max:100,def:40},{key:`depth`,label:`Depth`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],flanger:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],phaser:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],compressor:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:50},{key:`ratio`,label:`Ratio`,min:1,max:20,def:4},{key:`gain`,label:`Gain`,min:0,max:100,def:50}],gate:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:30},{key:`release`,label:`Release`,min:0,max:100,def:50}],eq:[{key:`low`,label:`Low`,min:-12,max:12,def:0},{key:`mid`,label:`Mid`,min:-12,max:12,def:0},{key:`high`,label:`High`,min:-12,max:12,def:0},{key:`level`,label:`Level`,min:0,max:100,def:70}],cabinet:[{key:`level`,label:`Level`,min:0,max:100,def:75}],ir:[{key:`level`,label:`Level`,min:0,max:100,def:75}],split:[{key:`splitType`,label:`Split Type`,type:`select`,options:[{value:`y`,label:`Y — Split evenly`,pan:!0},{value:`ab`,label:`A/B — Route to A or B`,pan:!1},{value:`cascade`,label:`Cascade — A feeds B`,pan:!0},{value:`a_to_b`,label:`A→B — Serial extension`,pan:!1}],def:`y`},{key:`panA`,label:`Pan A`,min:0,max:100,def:50,conditional:e=>e.splitType!==`ab`},{key:`panB`,label:`Pan B`,min:0,max:100,def:50,conditional:e=>e.splitType!==`ab`},{key:`activePath`,label:`Active Path`,type:`select`,options:[{value:`A`,label:`A`},{value:`B`,label:`B`}],def:`A`,conditional:e=>e.splitType===`ab`}],merge:[{key:`blend`,label:`Blend`,min:0,max:100,def:100},{key:`levelA`,label:`Level A`,min:0,max:100,def:100},{key:`panA`,label:`Pan A`,min:-100,max:100,def:0},{key:`levelB`,label:`Level B`,min:0,max:100,def:100},{key:`panB`,label:`Pan B`,min:-100,max:100,def:0}],looper:h},tt={overdrive:I.amber,distortion:I.red,fuzz:`#C07030`,delay:I.blue,echo:I.blue,reverb:`#60B0D0`,chorus:I.green,flanger:`#50C080`,phaser:`#80C050`,tremolo:I.green,compressor:`#D09040`,gate:I.textSec,eq:`#7080D0`,cabinet:`#D07090`,ir:`#D07090`,nam:`#E0A040`,boost:I.amber,wah:`#D0A060`,volume:I.textSec,tuner:`#80D0A0`,split:`#B080C0`,merge:`#80B0C0`,looper:m},nt={overdrive:`OD-808`,distortion:`RAT`,fuzz:`Big Muff`,delay:`Digital Delay`,echo:`Tape Echo`,reverb:`Hall Reverb`,chorus:`Chorus`,flanger:`Flanger`,phaser:`Phase 90`,tremolo:`Tremolo`,compressor:`Compressor`,gate:`Noise Gate`,eq:`EQ`,cabinet:`Cabinet`,ir:`IR Loader`,nam:`NAM Model`,boost:`Clean Boost`,wah:`Wah`,volume:`Volume`,tuner:`Tuner`,loop:`FX Loop`,looper:`Looper`,split:`Split`,merge:`Merge`};function rt(e){return et[(e||``).toLowerCase()]||[{key:`level`,label:`Level`,min:0,max:100,def:50}]}function it(e){return tt[(e||``).toLowerCase()]||I.amber}function at(e){let t=(e.type||``).toLowerCase();return e.nam_model_path?e.nam_model_path.split(`/`).pop()?.replace(/\.(nam|wav|aiff?)$/i,``)||`NAM Model`:e.ir_file_path?e.ir_file_path.split(`/`).pop()?.replace(/\.(wav|aiff?|ir)$/i,``)||`IR Loader`:nt[t]||t.charAt(0).toUpperCase()+t.slice(1)}var ot=` + @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap'); + * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; } + html, body { height: 100%; overflow: hidden; background: ${I.bg}; } + body { color: ${I.textPrimary}; font-family: 'Inter', sans-serif; } + :root { --amber: ${I.amber}; --blue: ${I.blue}; --green: ${I.green}; } + .mono { font-family: 'JetBrains Mono', monospace; } + ::-webkit-scrollbar { width: 4px; height: 4px; } + ::-webkit-scrollbar-track { background: ${I.panel}; } + ::-webkit-scrollbar-thumb { background: ${I.border}; border-radius: 2px; } + + /* ── Knob ── */ + .knob-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; } + .knob { border-radius: 50%; position: relative; touch-action: none; } + .knob-inner { border-radius: 50%; width: 100%; height: 100%; position: relative; + background: radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22); + box-shadow: 0 2px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07); } + .knob-dot { position: absolute; width: 3px; border-radius: 2px; background: var(--amber); + left: 50%; transform-origin: bottom center; box-shadow: 0 0 6px var(--amber); } + .knob-label { font-size: 9px; color: ${I.textSec}; letter-spacing: .06em; text-transform: uppercase; text-align: center; } + .knob-value { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: ${I.amber}; } + + /* ── Buttons ── */ + .btn { padding: 8px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; + letter-spacing: .04em; border: none; cursor: pointer; transition: all .12s; } + .btn-primary { background: ${I.amber}; color: #000; } + .btn-primary:active { filter: brightness(.85); transform: scale(.97); } + .btn-ghost { background: ${I.surface}; color: ${I.textPrimary}; border: 1px solid ${I.border}; } + .btn-ghost:active { background: ${I.border}; } + .btn-icon { width: 32px; height: 32px; border-radius: 7px; display: flex; align-items: center; + justify-content: center; background: ${I.surface}; border: 1px solid ${I.border}; cursor: pointer; + font-size: 15px; transition: all .12s; flex-shrink: 0; } + .btn-icon:active { transform: scale(.93); } + .btn-icon.active { background: rgba(232,160,48,.15); border-color: ${I.amber}; color: ${I.amber}; } + + /* ── Badge ── */ + .badge { display: inline-flex; align-items: center; justify-content: center; + padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; + letter-spacing: .06em; text-transform: uppercase; } + .badge-amber { background: rgba(232,160,48,.2); color: ${I.amber}; } + .badge-green { background: rgba(58,184,122,.2); color: ${I.green}; } + .badge-blue { background: rgba(58,123,168,.2); color: ${I.blue}; } + + /* ── Param slider ── */ + .param-panel { background: ${I.surface}; padding: 8px 12px 6px; border-top: 1px solid ${I.border}; flex-shrink: 0; } + .param-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; } + .param-panel-title { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: ${I.textSec}; } + .param-row { display: flex; flex-direction: column; gap: 1px; padding: 1px 0; } + .param-header { display: flex; justify-content: space-between; align-items: center; } + .param-label { font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: ${I.textSec}; } + .param-val { font-family: 'JetBrains Mono',monospace; font-size: 11px; font-weight: 600; } + .param-track-wrap { position: relative; height: 30px; display: flex; align-items: center; cursor: pointer; touch-action: none; } + .param-track { width: 100%; height: 6px; background: ${I.border}; border-radius: 3px; position: relative; overflow: hidden; } + .param-fill { height: 100%; border-radius: 3px; position: absolute; top: 0; left: 0; transition: width .04s; } + .param-thumb { width: 22px; height: 22px; border-radius: 50%; position: absolute; top: 50%; + transform: translate(-50%,-50%); box-shadow: 0 1px 6px rgba(0,0,0,.6); pointer-events: none; + border: 3px solid ${I.bg}; } + .param-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid ${I.border}; + background: ${I.panel}; color: ${I.textPrimary}; font-size: 14px; font-weight: 700; + display: flex; align-items: center; justify-content: center; cursor: pointer; line-height: 1; } + .param-btn:active { background: ${I.border}; transform: scale(.92); } + .param-knobs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 4px 0; } + + /* ── Screen header (overlays) ── */ + .screen-header { padding: 10px 14px 8px; display: flex; align-items: center; + justify-content: space-between; border-bottom: 1px solid ${I.border}; } + .screen-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: ${I.textSec}; } + .screen-body { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; } + + /* ── Preset sidebar chip ── */ + .preset-chip-s { width: 100%; padding: 7px 6px; border-radius: 5px; background: ${I.surface}; border: 1px solid ${I.border}; + display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: all .12s; } + .preset-chip-s.active { border-color: ${I.amber}; background: rgba(232,160,48,.08); } + .preset-chip-s:active { transform: scale(.96); } + .preset-chip-s .pcs-num { font-family: 'JetBrains Mono',monospace; font-size: 14px; font-weight: 700; color: ${I.amber}; line-height: 1.1; } + .preset-chip-s .pcs-name { font-size: 9px; color: ${I.textSec}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; line-height: 1.2; } + .preset-chip-s .pcs-indicator { width: 4px; height: 4px; border-radius: 50%; margin-top: 3px; } + + /* ── Preset row (captures) ── */ + .preset-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; + border-radius: 6px; cursor: pointer; transition: background .12s; border: 1px solid transparent; } + .preset-row:active, .preset-row.active { background: rgba(232,160,48,.08); border-color: rgba(232,160,48,.25); } + .section-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; + color: ${I.textDim}; font-weight: 600; margin-bottom: 8px; } + .card { background: ${I.panel}; border: 1px solid ${I.border}; border-radius: 8px; padding: 14px; } + .card-sm { background: ${I.surface}; border: 1px solid ${I.border}; border-radius: 6px; padding: 10px; } +`+x;function st({label:e,value:t=50,onChange:n,size:r=48,color:i=I.amber,min:a=0,max:o=100}){let s=(0,l.useRef)(null),c=(t-a)/(o-a),u=-140+c*280,d=r*.38,p=r*.5-d,m=e=>{e.preventDefault(),s.current={y:e.touches?e.touches[0].clientY:e.clientY,val:t};let r=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,r=(s.current.y-t)/120,i=Math.max(a,Math.min(o,s.current.val+r*(o-a)));n?.(Math.round(i))},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),window.removeEventListener(`touchmove`,r),window.removeEventListener(`touchend`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i),window.addEventListener(`touchmove`,r,{passive:!1}),window.addEventListener(`touchend`,i)},h=r+12,g=h/2,_=h/2,v=r/2+3,y=g+v*Math.cos(Math.PI/180*-230),b=_+v*Math.sin(Math.PI/180*-230),x=g+v*Math.cos((u-90)*(Math.PI/180)),S=_+v*Math.sin((u-90)*(Math.PI/180)),C=+(c*280>180);return(0,f.jsxs)(`div`,{className:`knob-wrap`,style:{width:r+12},children:[(0,f.jsxs)(`div`,{className:`knob`,style:{width:r,height:r},onMouseDown:m,onTouchStart:m,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-6,width:h,height:h,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:g,cy:_,r:v,fill:`none`,stroke:I.border,strokeWidth:`2`,strokeLinecap:`round`,opacity:`.5`}),c>0&&(0,f.jsx)(`path`,{d:`M ${y} ${b} A ${v} ${v} 0 ${C} 1 ${x} ${S}`,fill:`none`,stroke:i,strokeWidth:`2`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 3px ${i})`}})]}),(0,f.jsx)(`div`,{className:`knob-inner`,style:{"--amber":i},children:(0,f.jsx)(`div`,{className:`knob-dot`,style:{height:d,top:p,transform:`translateX(-50%) rotate(${u}deg)`,transformOrigin:`50% ${d}px`}})})]}),(0,f.jsx)(`div`,{className:`knob-value mono`,style:{color:i},children:t}),(0,f.jsx)(`div`,{className:`knob-label`,children:e})]})}function ct({label:e,value:t=50,onChange:n,onChangeEnd:r,min:i=0,max:a=100,color:o=I.amber}){let s=(0,l.useRef)(null),c=(0,l.useRef)(!1),u=(0,l.useRef)(t),d=(0,l.useRef)(n),p=(0,l.useRef)(r),m=(t-i)/(a-i)*100;(0,l.useEffect)(()=>{d.current=n},[n]),(0,l.useEffect)(()=>{p.current=r},[r]);let h=(0,l.useCallback)(e=>{let n=s.current;if(!n)return t;let r=n.getBoundingClientRect(),o=(e.touches?e.touches[0].clientX:e.clientX)-r.left;return Math.round(i+Math.max(0,Math.min(1,o/r.width))*(a-i))},[i,a,t]);(0,l.useEffect)(()=>{let e=e=>{if(!c.current)return;e.preventDefault();let t=h(e);u.current=t,d.current?.(t)},t=()=>{c.current&&=(p.current?.(u.current),!1)};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[h]);let g=e=>{e.preventDefault();let t=h(e);u.current=t,c.current=!0,d.current?.(t)},_=e=>n=>{n.preventDefault(),n.stopPropagation();let r=Math.max(i,Math.min(a,t+e));d.current?.(r),p.current?.(r)};return(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsxs)(`div`,{className:`param-header`,children:[(0,f.jsx)(`span`,{className:`param-label`,style:{color:o},children:e}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4,alignItems:`center`},children:[(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:_(-5),onTouchStart:_(-5),children:`−`}),(0,f.jsx)(`span`,{className:`param-val`,style:{color:o},children:t}),(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:_(5),onTouchStart:_(5),children:`+`})]})]}),(0,f.jsx)(`div`,{className:`param-track-wrap`,ref:s,onMouseDown:g,onTouchStart:g,children:(0,f.jsxs)(`div`,{className:`param-track`,children:[(0,f.jsx)(`div`,{className:`param-fill`,style:{width:`${m}%`,background:o}}),(0,f.jsx)(`div`,{className:`param-thumb`,style:{left:`${m}%`,background:o}})]})})]})}function lt({def:e,value:t,color:n,onChange:r}){return(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsx)(`div`,{className:`param-header`,children:(0,f.jsx)(`span`,{className:`param-label`,style:{color:n},children:e.label})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,flexWrap:`wrap`,background:`#0A0A10`,borderRadius:6,padding:4},children:(e.options||[]).map(e=>(0,f.jsx)(`button`,{onClick:()=>r?.(e.value),style:{flex:1,padding:`5px 8px`,borderRadius:4,border:`none`,fontSize:10,fontWeight:600,cursor:`pointer`,background:t===e.value?n:`transparent`,color:t===e.value?`#000`:`#8888A0`,transition:`all .1s`,letterSpacing:`.03em`,whiteSpace:`nowrap`},children:e.label},e.value))})]})}function ut({block:e,params:t,onParamChange:n,onParamChangeEnd:r,viewMode:i,onToggleView:a,onFocus:o,onModelBrowser:s}){let c=rt(e.type),l=it(e.type),u=c.filter(e=>!e.conditional||e.conditional(t));return(0,f.jsxs)(`div`,{className:`param-panel`,children:[(0,f.jsxs)(`div`,{className:`param-panel-header`,children:[(0,f.jsxs)(`span`,{className:`param-panel-title`,style:{cursor:s?`pointer`:`default`},onClick:()=>s?.(e.id),children:[(0,f.jsx)(`span`,{style:{color:l},children:`●`}),` `,e.name||e.type||``,s&&(0,f.jsx)(`span`,{style:{marginLeft:4,fontSize:8,color:I.textDim},children:`▼`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4,alignItems:`center`},children:[o&&(0,f.jsx)(`button`,{className:`btn`,style:{padding:`4px 8px`,fontSize:9,fontWeight:600,background:`${I.amber}22`,border:`1px solid ${I.amber}44`,color:I.amber,borderRadius:5,letterSpacing:`.04em`,cursor:`pointer`},onClick:o,children:`🔍 Focus`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:26,height:26,fontSize:11,flexShrink:0},onClick:a,children:i===`slider`?`◉`:`▦`})]})]}),i===`slider`?u.map(e=>e.type===`select`?(0,f.jsx)(lt,{def:e,value:t[e.key]==null?e.def:t[e.key],color:l,onChange:t=>{n?.(e.key,t),r?.(e.key,t)}},e.key):(0,f.jsx)(ct,{label:e.label,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,color:l,onChange:t=>n?.(e.key,t),onChangeEnd:t=>r?.(e.key,t)},e.key)):u.filter(e=>e.type!==`select`).length>0&&(0,f.jsx)(`div`,{className:`param-knobs`,children:u.filter(e=>e.type!==`select`).map(e=>(0,f.jsx)(st,{label:e.label,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,size:48,color:l,onChange:t=>{n?.(e.key,t),r?.(e.key,t)}},e.key))})]})}function dt({level:e=0,height:t=24,vertical:n=!1}){let r=Math.round(e/100*12),i=e=>e>=10?I.red:e>=8?`#E8C030`:I.green;return n?(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column-reverse`,gap:1,height:t,alignItems:`center`},children:Array.from({length:12}).map((e,n)=>(0,f.jsx)(`div`,{style:{width:4,height:(t-12)/12,borderRadius:1,background:n(0,f.jsx)(`div`,{style:{flex:1,height:`100%`,borderRadius:1,background:t{F.listModels().then(e=>c(e.models||[])).catch(()=>{})},[]);let p=async()=>{if(r.trim()){d(!0);try{o((t===`models`?await F.searchModels(r):await F.searchIrs(r)).results||[])}catch{o([])}d(!1)}},m=async e=>{try{t===`models`?await F.installModel(e.download_url,e.name):await F.installIr(e.download_url,e.name),F.listModels().then(e=>c(e.models||[])).catch(()=>{})}catch(e){alert(`Install failed: `+e.message)}};return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,background:I.bg},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Downloads`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:28,height:28,fontSize:13},onClick:e,children:`✕`})]}),(0,f.jsx)(`div`,{style:{padding:`6px 12px`,borderBottom:`1px solid ${I.border}`},children:(0,f.jsxs)(`div`,{className:`toggle`,children:[(0,f.jsx)(`button`,{className:`toggle-btn ${t===`models`?`active`:``}`,onClick:()=>n(`models`),children:`NAM Models`}),(0,f.jsx)(`button`,{className:`toggle-btn ${t===`irs`?`active`:``}`,onClick:()=>n(`irs`),children:`IR Cabs`})]})}),(0,f.jsxs)(`div`,{style:{padding:`6px 12px`,display:`flex`,gap:6,borderBottom:`1px solid ${I.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,background:I.surface,borderRadius:6,border:`1px solid ${I.border}`,padding:`6px 10px`,gap:6,alignItems:`center`},children:[(0,f.jsx)(`span`,{style:{color:I.textDim,fontSize:11},children:`🔍`}),(0,f.jsx)(`input`,{placeholder:`Search ${t===`models`?`NAM models`:`IR cabs`}...`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>e.key===`Enter`&&p(),style:{flex:1,background:`none`,border:`none`,color:I.textPrimary,fontSize:12,outline:`none`}})]}),(0,f.jsx)(`button`,{className:`btn btn-primary`,style:{padding:`6px 11px`,fontSize:11},onClick:p,children:u?`...`:`Search`})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[a===null&&s.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Installed Models`}),s.map((e,t)=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{cursor:`default`},children:[(0,f.jsx)(`div`,{style:{width:26,height:26,borderRadius:5,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:11,background:e.loaded?`${I.green}22`:I.surface,color:e.loaded?I.green:I.textDim},children:`🎛`}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:I.textDim},children:[e.architecture,`·`,e.size_mb,`MB`,e.loaded?`· CURRENT`:``]})]})]},t))]}),a!==null&&a.length===0&&(0,f.jsx)(`div`,{className:`card-sm`,style:{textAlign:`center`,color:I.textDim,padding:20},children:`No results found`}),a!==null&&a.map((e,t)=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{cursor:`default`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:I.textDim},children:[e.author,`·`,e.size_display]})]}),(0,f.jsx)(`button`,{className:`btn btn-ghost`,style:{padding:`4px 9px`,fontSize:11},onClick:()=>m(e),children:`Get`})]},t))]})]})}var pt=[{id:`gate`,type:`gate`,name:`Noise Gate`,bypassed:!1,params:{threshold:40,release:25,depth:70,mix:100}},{id:`split`,type:`split`,name:`Split`,bypassed:!1,params:{splitType:`y`,panA:50,panB:50,activePath:`A`}},{id:`drive_a`,type:`overdrive`,name:`OD-808`,path:`A`,bypassed:!1,params:{drive:65,tone:55,level:70}},{id:`delay_a`,type:`delay`,name:`Digital Delay`,path:`A`,bypassed:!1,params:{time:45,feedback:25,mix:40}},{id:`fuzz_b`,type:`fuzz`,name:`Big Muff`,path:`B`,bypassed:!1,params:{fuzz:75,tone:40,level:65}},{id:`merge`,type:`merge`,name:`Merge`,bypassed:!1,params:{blend:100,levelA:100,panA:0,levelB:100,panB:0}},{id:`reverb`,type:`reverb`,name:`Hall Reverb`,bypassed:!1,params:{decay:60,mix:35,tone:50}},{id:`looper1`,type:`looper`,name:`Looper`,bypassed:!1,params:{level:80,maxTime:8,fade:30,sync:`off`}}],mt=[{num:1,bank:1,name:`Plexi Crunch`},{num:2,bank:1,name:`Modern Hi-Gain`},{num:3,bank:1,name:`Clean Chime`},{num:4,bank:1,name:`Blues Drive`},{num:5,bank:2,name:`Metal Djent`},{num:6,bank:2,name:`Funky Wah`},{num:7,bank:2,name:`Ambient Pad`},{num:8,bank:2,name:`Shoegaze`}];function ht(){let[e,t]=(0,l.useState)(`main`),[n,r]=(0,l.useState)({connected:!1,master_volume:.72,routing_mode:`mono`,cpu_percent:0}),[i,a]=(0,l.useState)(pt),[o,s]=(0,l.useState)(`gate`),[c,u]=(0,l.useState)({}),[d,p]=(0,l.useState)(`slider`),[m,h]=(0,l.useState)(0),[_,v]=(0,l.useState)(1),[y,x]=(0,l.useState)(1),[S,C]=(0,l.useState)(mt),[w,ee]=(0,l.useState)(!1),[te,ne]=(0,l.useState)(!1),[T,re]=(0,l.useState)(null),[ie,ae]=(0,l.useState)(null),[oe,se]=(0,l.useState)(`stomp`),[ce,E]=(0,l.useState)(()=>{try{let e=localStorage.getItem(`pedal_channel`);return e===`guitar`||e===`bass`?e:`guitar`}catch{return`guitar`}}),D=g(),[ue,O]=(0,l.useState)([]),[fe,k]=(0,l.useState)([]),A=(0,l.useRef)({blocks:pt,blockParams:{},selectedBlockId:`gate`}),j=(0,l.useRef)(null);(0,l.useEffect)(()=>{A.current={blocks:i,blockParams:c,selectedBlockId:o}},[i,c,o]);let me=(0,l.useCallback)(()=>{let e=A.current,t={blocks:e.blocks.map(e=>({...e,params:{...e.params}})),blockParams:Object.fromEntries(Object.entries(e.blockParams).map(([e,t])=>[e,{...t}])),selectedBlockId:e.selectedBlockId};O(e=>[...e.slice(-49),t]),k([])},[]),he=(0,l.useCallback)(()=>{j.current||=(me(),setTimeout(()=>{j.current=null},400))},[me]),ge=(0,l.useCallback)(()=>{O(e=>{if(e.length===0)return e;let t=A.current,n={blocks:t.blocks.map(e=>({...e,params:{...e.params}})),blockParams:Object.fromEntries(Object.entries(t.blockParams).map(([e,t])=>[e,{...t}])),selectedBlockId:t.selectedBlockId};k(e=>[...e,n]);let r=e[e.length-1];return a(r.blocks),u(r.blockParams),s(r.selectedBlockId),e.slice(0,-1)})},[]),_e=(0,l.useCallback)(()=>{k(e=>{if(e.length===0)return e;let t=A.current,n={blocks:t.blocks.map(e=>({...e,params:{...e.params}})),blockParams:Object.fromEntries(Object.entries(t.blockParams).map(([e,t])=>[e,{...t}])),selectedBlockId:t.selectedBlockId};O(e=>[...e,n]);let r=e[e.length-1];return a(r.blocks),u(r.blockParams),s(r.selectedBlockId),e.slice(0,-1)})},[]),[ve,ye]=(0,l.useState)(!1),[be,xe]=(0,l.useState)(null),Se=(0,l.useCallback)(e=>{switch(ye(!1),e){case`settings`:xe(`settings`);break;case`eq`:xe(`eq`);break;case`tuner`:r(e=>({...e,tuner_enabled:!0})),F.tunerToggle(!0).catch(()=>{});break;default:break}},[]),M=(0,l.useRef)(!1),we=(0,l.useRef)(!1),Te=(0,l.useCallback)(async()=>{try{let e=await F.getState();r(e),e.input_level!=null&&h(e.input_level),e.current_preset?.name&&!M.current&&v(e.current_preset.program==null?_:e.current_preset.program+1),e.blocks&&e.blocks.length>0&&!we.current&&a(e.blocks)}catch{}},[_]);(0,l.useEffect)(()=>{Te();let e=setInterval(Te,3e3);return()=>clearInterval(e)},[Te]),(0,l.useEffect)(()=>{let e=setInterval(()=>{h(e=>Math.max(0,Math.min(100,e+(Math.random()-.45)*8)))},150);return()=>clearInterval(e)},[]),(0,l.useEffect)(()=>{try{localStorage.setItem(`pedal_channel`,ce)}catch{}Ze(ce)},[ce]),(0,l.useEffect)(()=>{F.listPresets().then(e=>{if(e?.banks){let t=[];e.banks.forEach(e=>{(e.presets||[]).forEach((n,r)=>{n&&t.push({num:r+1,bank:e.number,name:n.name,chain:n.chain})})}),t.length>0&&C(t)}}).catch(()=>{})},[]);let Ee=(0,l.useCallback)(async(e,t)=>{M.current=!0,ne(!0);try{await F.activatePreset(e,t),await new Promise(e=>setTimeout(e,300));let n=await F.getState();r(n),n.current_preset?.name&&v(n.current_preset.program==null?t+1:n.current_preset.program+1);try{let n=await F.getPreset(e,t);n?.chain&&n.chain.length>0&&(a(n.chain.map((e,t)=>{let n={type:e.fx_type||`fx`,enabled:e.enabled!==!1,params:e.params||{},nam_model_path:e.nam_model_path,ir_file_path:e.ir_file_path};return{id:e.id||`block_${e.fx_type||`fx`}_${t}`,type:n.type,name:at(n),bypassed:!e.enabled,enabled:n.enabled,params:n.params,nam_model_path:n.nam_model_path,ir_file_path:n.ir_file_path}})),we.current=!0)}catch(e){console.warn(`Could not fetch chain:`,e)}s(null)}catch(e){console.warn(`Preset activate failed:`,e)}ne(!1),setTimeout(()=>{M.current=!1},5e3),setTimeout(()=>{we.current=!1},5e3)},[]),De=(0,l.useCallback)(async e=>{let t=S.find(t=>t.num===e);t&&(v(e),await Ee(t.bank||1,e-1))},[S,Ee]),Oe=(0,l.useMemo)(()=>i.find(e=>e.id===o),[i,o]);(0,l.useEffect)(()=>{if(Oe&&c[o]==null){let e=rt(Oe.type),t={};e.forEach(e=>{t[e.key]=Oe.params?.[e.key]==null?e.def:Oe.params[e.key]}),u(e=>({...e,[o]:t}))}},[o,Oe,c]);let ke=(0,l.useCallback)(e=>{s(t=>t===e?null:e)},[]),Ae=(0,l.useCallback)((e,t,n)=>{he(),u(r=>({...r,[e]:{...r[e]||{},[t]:n}}))},[he]),je=(0,l.useCallback)(e=>{me(),we.current=!0,a(t=>t.map(t=>t.id===e?{...t,bypassed:!t.bypassed}:t)),F.toggleBlock(e,!1).catch(()=>{}),setTimeout(()=>{we.current=!1},3e3)},[me]),Me=(0,l.useCallback)((e,t,n)=>{F.updateBlock(e,{[t]:n}).catch(()=>{})},[]),Ne=(0,l.useCallback)((e,t)=>{me(),a(n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r})},[me]),Fe=(0,l.useCallback)(()=>{me(),we.current=!0;let e=`block_`+Date.now();a(t=>[...t,{id:e,type:`overdrive`,name:`New Drive`,bypassed:!1,params:{drive:30,tone:50,level:70}}]),setTimeout(()=>{we.current=!1},3e3)},[me]),Ie=(0,l.useCallback)(e=>{me(),we.current=!0,a(t=>t.filter(t=>t.id!==e)),o===e&&s(null),setTimeout(()=>{we.current=!1},3e3)},[me,o]),Le=(0,l.useMemo)(()=>S.filter(e=>e.bank===y),[S,y]),N=String.fromCharCode(64+y),ze=(0,l.useCallback)(()=>{let e=Math.min(y+1,8);x(e);let t=S.filter(t=>t.bank===e);t.length>0&&Ee(t[0].bank,t[0].num-1)},[y,S,Ee]),Be=(0,l.useCallback)(()=>{let e=Math.max(y-1,1);x(e);let t=S.filter(t=>t.bank===e);t.length>0&&Ee(t[0].bank,t[0].num-1)},[y,S,Ee]),Ve=(0,l.useCallback)(()=>{ee(e=>!e),F.bypassToggle().catch(()=>{})},[]),He=(0,l.useCallback)(()=>{let e=!n.tuner_enabled;r(t=>({...t,tuner_enabled:e})),F.tunerToggle(e).catch(()=>{}),e&&t(`main`)},[n.tuner_enabled]),Ue=(0,l.useCallback)(()=>{we.current=!0;let e=T;e&&(a(t=>t.map(t=>t.id===e?{...t,bypassed:!t.bypassed}:t)),F.toggleBlock(e,!1).catch(()=>{}),setTimeout(()=>{we.current=!1},3e3))},[T]),P=(0,l.useCallback)(e=>{ae(e),T&&re(null)},[T]),Ge=(0,l.useCallback)(({type:e,name:t,modelPath:n,isBuiltin:r})=>{let i=ie;i&&(me(),we.current=!0,a(a=>a.map(a=>{if(a.id!==i)return a;let o=rt(e),s={};return o.forEach(e=>{s[e.key]=e.def}),{...a,type:e,name:t||at({type:e}),params:s,nam_model_path:!r&&n&&e===`nam`?n:void 0,ir_file_path:!r&&n&&e===`ir`?n:void 0}})),ae(null),u(e=>{let t={...e};return delete t[i],t}),setTimeout(()=>{we.current=!1},3e3))},[ie,me]),Ke=(0,l.useCallback)((e,t)=>{if(!i.find(e=>e.id===t))return;let n=c[t]?.maxTime??8;switch(e){case`record`:D.record(t,n);break;case`play`:D.play(t,n);break;case`overdub`:D.overdub(t,n);break;case`stop`:D.stop(t);break;case`clear`:D.clearLoop(t);break;case`undo`:D.undoLast(t);break}},[i,c,D]),qe=(0,l.useCallback)(e=>({onRecord:()=>Ke(`record`,e),onPlay:()=>Ke(`play`,e),onOverdub:()=>Ke(`overdub`,e),onStop:()=>Ke(`stop`,e),onClear:()=>Ke(`clear`,e),onUndo:()=>Ke(`undo`,e)}),[Ke]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`style`,{children:ot}),(0,f.jsxs)(`div`,{style:{width:`100%`,height:`100vh`,display:`flex`,flexDirection:`column`,background:I.bg,overflow:`hidden`,fontFamily:`'Inter',sans-serif`,margin:`0 auto`,maxWidth:980},children:[e===`main`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 12px`,background:I.panel,borderBottom:`1px solid ${I.border}`,flexShrink:0,minHeight:32},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(`div`,{style:{width:6,height:6,borderRadius:`50%`,background:n.connected?I.green:I.red,boxShadow:`0 0 6px ${n.connected?I.green:I.red}`}}),(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:9,color:I.textSec},children:n.connected?`CONNECTED`:`OFFLINE`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:20,height:20,fontSize:11,opacity:ue.length>0?1:.3},onClick:ge,disabled:ue.length===0,title:`Undo (Ctrl+Z)`,children:`↶`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:20,height:20,fontSize:11,opacity:fe.length>0?1:.3},onClick:_e,disabled:fe.length===0,title:`Redo (Ctrl+Shift+Z)`,children:`↷`}),(0,f.jsx)(`div`,{style:{width:1,height:12,background:I.border}}),(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:10,color:I.textPrimary,fontWeight:600},children:n.current_preset?.name||S.find(e=>e.num===_)?.name||`—`}),te&&(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:8,color:I.amber},children:`⟳`}),(0,f.jsx)(`div`,{style:{width:1,height:12,background:I.border}}),n.channel_mode===`stereo`?(0,f.jsx)(`span`,{className:`badge badge-amber`,style:{fontSize:9,padding:`2px 7px`,letterSpacing:`.08em`},children:`STEREO`}):(0,f.jsx)(`div`,{className:`toggle`,style:{margin:0,height:20},children:[`guitar`,`bass`].map(e=>(0,f.jsx)(`button`,{onClick:()=>E(e),style:{padding:`2px 6px`,fontSize:9,fontWeight:700,letterSpacing:`.08em`,background:ce===e?I.amber:`transparent`,color:ce===e?`#000`:I.textDim,cursor:`pointer`,border:`none`,display:`flex`,alignItems:`center`,lineHeight:1},children:e===`guitar`?`GUITAR`:`BASS`},e))})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(dt,{level:m,height:24}),(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:9,color:I.textDim},children:[`CPU `,n.cpu_percent==null?`—`:`${n.cpu_percent}%`]})]}),(0,f.jsx)(`div`,{style:{width:1,height:12,background:I.border}}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`},onClick:()=>t(`captures`),title:`Downloads`,children:(0,f.jsx)(`img`,{src:`/ui/img/ic_bank.svg`,alt:`captures`,style:{width:14,height:14,filter:`invert(1) brightness(2)`}})}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`},onClick:()=>t(`presets`),title:`Presets`,children:(0,f.jsx)(`img`,{src:`/ui/img/ic_presets.svg`,alt:`presets`,style:{width:14,height:14,filter:`invert(1) brightness(2)`}})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:2,alignItems:`center`,background:I.surface,borderRadius:4,border:`1px solid ${I.border}`,padding:2,height:24},children:[`stomp`,`preset`].map(e=>(0,f.jsx)(`button`,{onClick:()=>se(e),style:{padding:`1px 5px`,borderRadius:3,border:`none`,height:20,fontSize:8,fontWeight:700,letterSpacing:`.04em`,textTransform:`uppercase`,background:oe===e?I.amber:`transparent`,color:oe===e?`#000`:I.textDim,cursor:`pointer`,lineHeight:1.5,minWidth:34,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e===`stomp`?`SM`:`PR`},e))}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`,background:n.tuner_enabled?`rgba(128,208,160,.15)`:I.surface,borderColor:n.tuner_enabled?I.green:I.border},onClick:He,title:n.tuner_enabled?`Exit Tuner`:`Tuner`,children:(0,f.jsx)(`img`,{src:`/ui/img/fx_analyzer.svg`,alt:`tuner`,style:{width:14,height:14,filter:n.tuner_enabled?`invert(0.9) brightness(2) sepia(0.4) hue-rotate(80deg)`:`invert(1) brightness(2)`}})}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`,background:`rgba(232,160,48,.12)`,borderColor:I.amber},onClick:()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()},title:`Fullscreen`,children:(0,f.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`#E8A030`,children:(0,f.jsx)(`path`,{d:`M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z`})})}),(0,f.jsx)(`div`,{style:{width:1,height:16,background:I.border}}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`},onClick:()=>ye(!0),title:`Main Menu`,children:(0,f.jsx)(`span`,{style:{fontSize:14,color:I.textSec,lineHeight:1},children:`☰`})})]})]}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,overflow:`hidden`},children:[(0,f.jsxs)(`div`,{style:{width:90,flexShrink:0,background:I.surface,borderRight:`1px solid ${I.border}`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,f.jsxs)(`div`,{style:{padding:`6px 8px`,textAlign:`center`,borderBottom:`1px solid ${I.border}`,background:I.panel},children:[(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:14,fontWeight:700,color:I.amber},children:[`Bank `,N]}),(0,f.jsx)(`div`,{style:{fontSize:9,color:I.textDim,letterSpacing:`.06em`,textTransform:`uppercase`},children:`Programs`})]}),(0,f.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`4px 6px`,display:`flex`,flexDirection:`column`,gap:3},children:Le.map(e=>(0,f.jsxs)(`div`,{className:`preset-chip-s ${e.num===_?`active`:``}`,onClick:()=>De(e.num),children:[(0,f.jsxs)(`div`,{className:`pcs-num`,children:[`0`,e.num]}),(0,f.jsx)(`div`,{className:`pcs-name`,children:e.name}),(0,f.jsx)(`div`,{className:`pcs-indicator`,style:{background:e.num===_?I.amber:I.border}})]},e.num))})]}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,overflow:`hidden`,minWidth:0},children:[(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,padding:`3px 8px`,background:I.surface,borderBottom:`1px solid ${I.border}`,flexShrink:0},children:[{label:`Preset`,value:S.find(e=>e.num===_)?.name||`—`},{label:`Routing`,value:(n.routing_mode||`MONO`).toUpperCase()},{label:`Volume`,value:n.master_volume==null?`—`:`${Math.round(n.master_volume*100)}%`},{label:`Bank`,value:N}].map(e=>(0,f.jsxs)(`div`,{style:{flex:1,textAlign:`center`,padding:`2px 6px`,borderRadius:3,background:I.panel,border:`1px solid ${I.border}`},children:[(0,f.jsx)(`div`,{style:{fontSize:7,color:I.textDim,letterSpacing:`.06em`,textTransform:`uppercase`},children:e.label}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:10,fontWeight:600,color:I.amber,marginTop:1},children:e.value})]},e.label))}),(0,f.jsx)(`div`,{style:{flex:Oe?`0 0 auto`:1,overflow:`hidden`},children:(0,f.jsx)(le,{blocks:i,selectedBlockId:o,onSelectBlock:ke,onToggleBlock:je,onReorder:Ne,onAddBlock:Fe,onRemoveBlock:Ie,onModelBrowser:P,looperStores:D.stores})}),Oe&&c[o]?(Oe.type||``).toLowerCase()===`looper`?(0,f.jsx)(b,{block:Oe,params:c[o]||{},looperStore:D.getStore(o),onParamChange:(e,t)=>Ae(o,e,t),onParamChangeEnd:(e,t)=>Me(o,e,t),looperActions:qe(o)}):(0,f.jsx)(ut,{block:Oe,params:c[o]||{},viewMode:d,onToggleView:()=>p(e=>e===`slider`?`knob`:`slider`),onParamChange:(e,t)=>Ae(o,e,t),onParamChangeEnd:(e,t)=>Me(o,e,t),onFocus:()=>re(o),onModelBrowser:P}):(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,background:I.bg,color:I.textDim,fontSize:11},children:`Tap a block to edit parameters`})]})]}),(()=>{let e=i.find(e=>e.id===o),t=e&&(e.type||``).toLowerCase()===`looper`;return(0,f.jsx)(de,{mode:oe,blocks:i,selectedBlockId:o,currentBank:N,currentPreset:_,presets:Le,onSelectBlock:ke,onToggleBlock:je,onBankUp:ze,onBankDown:Be,onGlobalBypass:Ve,globalBypass:w,onTunerToggle:He,tunerEnabled:n.tuner_enabled,onPresetClick:e=>{let t=Le[parseInt(e)];t&&Ee(t.bank,t.num-1)},looperActive:t,looperTransport:t?qe(o):void 0})})()]}),T&&i.find(e=>e.id===T)&&c[T]&&(0,f.jsx)(Ce,{block:i.find(e=>e.id===T),params:c[T]||{},viewMode:d,onClose:()=>re(null),onParamChange:(e,t)=>Ae(T,e,t),onParamChangeEnd:(e,t)=>Me(T,e,t),onToggleView:()=>p(e=>e===`slider`?`knob`:`slider`),onToggleBypass:Ue,onOpenModelBrowser:()=>P(T)}),e===`captures`&&(0,f.jsx)(ft,{onClose:()=>t(`main`)}),e===`presets`&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,background:I.bg},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Presets`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:28,height:28,fontSize:13},onClick:()=>t(`main`),children:`✕`})]}),(0,f.jsx)(`div`,{className:`screen-body`,children:S.map((e,n)=>(0,f.jsxs)(`div`,{className:`preset-row ${e.num===_?`active`:``}`,onClick:()=>{De(e.num),t(`main`)},children:[(0,f.jsx)(`div`,{className:`mono`,style:{width:26,height:26,borderRadius:5,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:11,fontWeight:700,background:e.num===_?`${I.amber}22`:I.surface,color:e.num===_?I.amber:I.textDim,border:`1px solid ${e.num===_?I.amber+`60`:I.border}`},children:e.num}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:600},children:e.name}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:9,color:I.textDim},children:[`Bank `,e.bank||1,`·Program `,e.num-1]})]}),e.num===_&&(0,f.jsx)(`span`,{style:{color:I.amber,fontSize:16},children:`●`})]},n))})]}),n.tuner_enabled&&(0,f.jsx)(pe,{tunerData:n,connected:n.connected,onExit:()=>{r(e=>({...e,tuner_enabled:!1})),F.tunerToggle(!1).catch(()=>{})}}),ie&&(()=>{let e=i.find(e=>e.id===ie);return e?(0,f.jsx)(Pe,{currentBlockType:e.type,currentBlockName:e.name,currentModelPath:e.nam_model_path||e.ir_file_path,onSelectModel:Ge,onClose:()=>ae(null)}):null})(),ve&&(0,f.jsx)(Re,{onClose:()=>ye(!1),onItemSelect:Se}),be===`settings`&&(0,f.jsx)(We,{onClose:()=>xe(null),onMasterVolume:e=>F.masterVolume(e).catch(()=>{})}),be===`eq`&&(0,f.jsx)(Je,{onClose:()=>xe(null)})]})]})}(0,u.createRoot)(document.getElementById(`root`)).render((0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(ht,{})})); \ No newline at end of file diff --git a/src/web/ui-dist/assets/index-BiNA-JeT.js b/src/web/ui-dist/assets/index-BiNA-JeT.js deleted file mode 100644 index 083d765..0000000 --- a/src/web/ui-dist/assets/index-BiNA-JeT.js +++ /dev/null @@ -1,184 +0,0 @@ -var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function w(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function T(e,t){return w(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=T(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,E());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var ee=!1,S=-1,C=5,te=-1;function w(){return g?!0:!(e.unstable_now()-tet&&w());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?E():ee=!1}}}var E;if(typeof y==`function`)E=function(){y(T)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=T,E=function(){re.postMessage(null)}}else E=function(){_(T,0)};function ie(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,E()))),r},e.unstable_shouldYield=w,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1de||(e.current=ue[de],ue[de]=null,de--)}function A(e,t){de++,ue[de]=e.current,e.current=t}var pe=fe(null),me=fe(null),he=fe(null),ge=fe(null);function _e(e,t){switch(A(he,t),A(me,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}k(pe),A(pe,e)}function ve(){k(pe),k(me),k(he)}function ye(e){e.memoizedState!==null&&A(ge,e);var t=pe.current,n=Hd(t,e.type);t!==n&&(A(me,e),A(pe,n))}function be(e){me.current===e&&(k(pe),k(me)),ge.current===e&&(k(ge),Qf._currentValue=le)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,"passive",{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var bn=null,xn=null,Sn=null;function Cn(){if(Sn)return Sn;var e,t=xn,n=t.length,r,i=`value`in bn?bn.value:bn.textContent,a=i.length;for(e=0;e=tr),ir=` `,ar=!1;function or(e,t){switch(e){case`keyup`:return $n.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function sr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var cr=!1;function lr(e,t){switch(e){case`compositionend`:return sr(t);case`keypress`:return t.which===32?(ar=!0,ir):null;case`textInput`:return e=t.data,e===ir&&ar?null:e;default:return null}}function ur(e,t){if(cr)return e===`compositionend`||!er&&or(e,t)?(e=Cn(),Sn=xn=bn=null,cr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Mr(n)}}function Pr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wt(e.document)}return t}function Ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Lr=_n&&`documentMode`in document&&11>=document.documentMode,Rr=null,zr=null,Br=null,Vr=!1;function Hr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vr||Rr==null||Rr!==Wt(r)||(r=Rr,`selectionStart`in r&&Ir(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Br&&jr(Br,r)||(Br=r,r=Ed(zr,`onSelect`),0>=o,i-=o,Pi=1<<32-Ge(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),M&&Ii(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),M&&Ii(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return M&&Ii(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),M&&Ii(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Pa(l)===r.type){n(e,r.sibling),c=i(r,a.props),Va(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=xi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=bi(a.type,a.key,a.props,null,e.mode,c),Va(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=wi(a,e.mode,c),c.return=e,e=c}return o(e);case E:return a=Pa(a),b(e,r,a,c)}if(ce(a))return h(e,r,a,c);if(ae(a)){if(l=ae(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Ba(a),c);if(a.$$typeof===S)return b(e,r,la(e,a),c);Ha(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=Si(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{za=0;var i=b(e,t,n,r);return Ra=null,i}catch(t){if(t===Oa||t===Aa)throw t;var a=gi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Wa=Ua(!0),Ga=Ua(!1),Ka=!1;function qa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ja(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=pi(e),fi(e,null,n),t}return li(e,r,t,n),pi(e)}function Za(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}function Qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var $a=!1;function eo(){if($a){var e=ya;if(e!==null)throw e}}function to(e,t,n,r){$a=!1;var i=e.updateQueue;Ka=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(q&f)===f:(r&f)===f){f!==0&&f===va&&($a=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ka=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function no(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function ro(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=D.T,s={};D.T=s,Rs(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,Sa(c,r),pu(e)):Ls(e,t,r,pu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=ks(e).queue;Es(e,i,t,le,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},pu())}function js(){return ca(Qf)}function Ms(){return z().memoizedState}function Ns(){return z().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ya(n);var r=Xa(t,e,n);r!==null&&(hu(r,t,n),Za(r,t,n)),t={cache:ma()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ui(e,t,n,r),n!==null&&(hu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,pu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ar(s,o))return li(e,t,i,0),G===null&&ci(),!1}catch{}if(n=ui(e,t,i,r),n!==null)return hu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(s(479))}else t=ui(e,n,r,2),t!==null&&hu(t,e,2)}function zs(e){var t=e.alternate;return e===F||t!==null&&t===F}function Bs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var Hs={readContext:ca,use:Lo,useCallback:R,useContext:R,useEffect:R,useImperativeHandle:R,useLayoutEffect:R,useInsertionEffect:R,useMemo:R,useReducer:R,useRef:R,useState:R,useDebugValue:R,useDeferredValue:R,useTransition:R,useSyncExternalStore:R,useId:R,useHostTransitionStatus:R,useFormState:R,useActionState:R,useOptimistic:R,useMemoCache:R,useCacheRefresh:R};Hs.useEffectEvent=R;var Us={readContext:ca,use:Lo,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:ca,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=Po();t=t===void 0?null:t;var r=e();if(xo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(xo){We(!0);try{n(t)}finally{We(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,F,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,F,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(Po(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,F,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=F,i=Po();if(M){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),G===null)throw Error(s(349));q&127||Wo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ps(Ko.bind(null,r,a,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),n},useId:function(){var e=Po(),t=G.identifierPrefix;if(M){var n=Fi,r=Pi;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[mt]=t,a[ht]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ic(t)}}return V(t),Lc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=he.current,Ji(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Vi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Gi(t,!0)}else e=Bd(e).createTextNode(r),e[mt]=t,t.stateNode=e}return V(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ji(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[mt]=t}else Yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;V(t),e=!1}else n=Xi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(go(t),t):(go(t),null);if(t.flags&128)throw Error(s(558))}return V(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ji(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[mt]=t}else Yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;V(t),i=!1}else i=Xi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(go(t),t):(go(t),null)}return go(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),zc(t,t.updateQueue),V(t),null);case 4:return ve(),e===null&&Sd(t.stateNode.containerInfo),V(t),null;case 10:return na(t.type),V(t),null;case 19:if(k(P),r=t.memoizedState,r===null)return V(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Bc(r,!1);else{if(Y!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=_o(e),a!==null){for(t.flags|=128,Bc(r,!1),e=a.updateQueue,t.updateQueue=e,zc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)yi(n,e),n=n.sibling;return A(P,P.current&1|2),M&&Ii(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>nu&&(t.flags|=128,i=!0,Bc(r,!1),t.lanes=4194304)}else{if(!i)if(e=_o(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,zc(t,e),Bc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!M)return V(t),null}else 2*Ne()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,i=!0,Bc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(V(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,n=P.current,A(P,i?n&1|2:n&1),M&&Ii(t,r.treeForkCount),e);case 22:case 23:return go(t),co(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(V(t),t.subtreeFlags&6&&(t.flags|=8192)):V(t),n=t.updateQueue,n!==null&&zc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&k(wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),na(N),V(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Hc(e,t){switch(zi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return na(N),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(go(t),t.alternate===null)throw Error(s(340));Yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(go(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(P),null;case 4:return ve(),null;case 10:return na(t.type),null;case 22:case 23:return go(t),co(),e!==null&&k(wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return na(N),null;case 25:return null;default:return null}}function Uc(e,t){switch(zi(t),t.tag){case 3:na(N),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&go(t);break;case 13:go(t);break;case 19:k(P);break;case 10:na(t.type);break;case 22:case 23:go(t),co(),e!==null&&k(wa);break;case 24:na(N)}}function Wc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Gc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Kc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ro(t,n)}catch(t){Z(e,e.return,t)}}}function qc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Jc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Yc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Xc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Zc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ht]=t}catch(t){Z(e,e.return,t)}}function Qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function $c(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[mt]=e,t[ht]=n}catch(t){Z(e,e.return,t)}}var rl=!1,H=!1,il=!1,al=typeof WeakSet==`function`?WeakSet:Set,ol=null;function sl(e,t){if(e=e.containerInfo,Rd=sp,e=Fr(e),Ir(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,ol=t;ol!==null;)if(t=ol,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ol=e;else for(;ol!==null;){switch(t=ol,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(a,r,n),a[mt]=e,Dt(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;cg&&(o=g,g=h,h=o);var _=Nr(s,h),v=Nr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,D.T=null,n=lu,lu=null;var a=au,o=su;if(X=0,ou=au=null,su=0,W&6)throw Error(s(331));var c=W;if(W|=4,Il(a.current),Ol(a,a.current,o,n),W=c,id(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,a)}catch{}return!0}finally{O.p=i,D.T=r,Vu(e,t)}}function Wu(e,t,n){t=Ei(n,t),t=nc(e.stateNode,t,2),e=Xa(e,t,2),e!==null&&(it(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=Ei(n,e),n=rc(2),r=Xa(t,n,2),r!==null&&(ic(n,r,t,e),it(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,G===e&&(q&n)===n&&(Y===4||Y===3&&(q&62914560)===q&&300>Ne()-eu?!(W&2)&&Su(e,0):Jl|=n,Xl===q&&(Xl=0)),rd(e)}function qu(e,t){t===0&&(t=nt()),e=di(e,t),e!==null&&(it(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return ke(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=q,a=$e(r,r===G?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ne(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}X!==0&&X!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Kt(n.imageSizes)+`"]`)):i+=`[href="`+Kt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Kt(r)+`"][href="`+Kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Et(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Dt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=he.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Et(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=Et(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Et(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+Kt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Dt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Kt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Kt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,Dt(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),Dt(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,Dt(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Dt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n(),u=c(),d=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=e(((e,t)=>{t.exports=d()}))(),p={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},m=window.location.origin,h=m.replace(/^http/,`ws`)+`/ws`,g=`guitar`;try{let e=localStorage.getItem(`pedal_channel`);(e===`guitar`||e===`bass`)&&(g=e)}catch{}function _(e){g=e}function v(e){let t=g;return t?e+(e.includes(`?`)?`&`:`?`)+`channel=`+encodeURIComponent(t):e}async function y(e){let t=await fetch(`${m}${v(e)}`);if(!t.ok)throw Error(`${e} => ${t.status}`);return t.json()}async function b(e,t){let n=await fetch(`${m}${v(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:t==null?void 0:JSON.stringify(t)});if(!n.ok)throw Error(`${e} => ${n.status}`);return n.json()}async function x(e,t){let n=await fetch(`${m}${v(e)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`${e} => ${n.status}`);return n.json()}async function ee(e){let t=await fetch(`${m}${v(e)}`,{method:`DELETE`});if(!t.ok)throw Error(`${e} => ${t.status}`);return t.json()}async function S(e,t){let n=new FormData;n.append(`file`,t);let r=await fetch(`${m}${v(e)}`,{method:`POST`,body:n});if(!r.ok)throw Error(`${e} => ${r.status}`);return r.json()}function C(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(!1),i=(0,l.useRef)(null),a=(0,l.useRef)(null);return(0,l.useEffect)(()=>{y(`/api/state`).then(e=>{t(e),r(!0)}).catch(()=>{r(!1)});let e;function n(){try{let a=new WebSocket(h);a.onmessage=e=>{try{let n=JSON.parse(e.data);(n.type===`connected`||n.type===`state`)&&(t(n.state),r(!0)),n.type===`preset_changed`&&n.state&&t(n.state),n.type===`bypass_changed`&&t(e=>e&&{...e,bypass:n.bypass}),n.type===`tuner_changed`&&t(e=>e&&{...e,tuner_enabled:n.tuner_enabled}),n.type===`routing_changed`&&t(e=>e&&{...e,routing_mode:n.routing_mode,routing_breakpoint:n.routing_breakpoint}),n.type===`channel_mode_changed`&&t(e=>e&&{...e,channel_mode:n.channel_mode}),(n.type===`model_loaded`||n.type===`ir_loaded`)&&y(`/api/state`).then(e=>t(e)),n.type===`snapshot_recalled`&&n.state&&t(n.state),n.type===`snapshot_saved`&&y(`/api/state`).then(e=>t(e))}catch{}},a.onclose=()=>{r(!1),e=setTimeout(n,3e3)},a.onerror=()=>a.close(),i.current=a}catch{e=setTimeout(n,3e3)}}return n(),a.current=setInterval(()=>{y(`/api/state`).then(e=>{t(e),r(!0)}).catch(()=>{})},5e3),()=>{clearInterval(a.current),clearTimeout(e),i.current&&i.current.close()}},[]),{state:e,connected:n,refresh:(0,l.useCallback)(()=>{y(`/api/state`).then(e=>{t(e),r(!0)}).catch(()=>{})},[])}}var te=` - @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap'); - * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; } - body { background: ${p.bg}; color: ${p.textPrimary}; font-family: 'Inter', sans-serif; user-select: none; } - :root { --amber: ${p.amber}; --blue: ${p.blue}; --green: ${p.green}; } - - .mono { font-family: 'JetBrains Mono', monospace; } - - ::-webkit-scrollbar { width: 4px; height: 4px; } - ::-webkit-scrollbar-track { background: ${p.panel}; } - ::-webkit-scrollbar-thumb { background: ${p.border}; border-radius: 2px; } - - input, textarea, select { font-family: inherit; } - - .knob-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; } - .knob { border-radius: 50%; position: relative; touch-action: none; } - .knob-inner { border-radius: 50%; width: 100%; height: 100%; position: relative; - background: radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22); - box-shadow: 0 2px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07); } - .knob-dot { position: absolute; width: 3px; border-radius: 2px; background: var(--amber); - left: 50%; transform-origin: bottom center; box-shadow: 0 0 6px var(--amber); } - .knob-ring { position: absolute; inset: -5px; border-radius: 50%; } - .knob-label { font-size: 10px; color: ${p.textSec}; letter-spacing: .06em; text-transform: uppercase; text-align: center; } - .knob-value { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: ${p.amber}; } - - .toggle { display: flex; background: ${p.surface}; border-radius: 6px; border: 1px solid ${p.border}; overflow: hidden; } - .toggle-btn { flex: 1; padding: 7px 12px; font-size: 12px; font-weight: 500; letter-spacing: .04em; - background: none; border: none; color: ${p.textSec}; cursor: pointer; transition: all .15s; } - .toggle-btn.active { background: ${p.amber}; color: #000; } - - .vu-bar { display: flex; gap: 2px; align-items: flex-end; height: 100%; } - .vu-seg { width: 4px; border-radius: 1px; transition: opacity .05s; } - - .fader-track { width: 4px; border-radius: 2px; background: ${p.border}; position: relative; cursor: pointer; touch-action: none; } - .fader-fill { width: 100%; border-radius: 2px; position: absolute; bottom: 0; transition: height .05s; } - .fader-thumb { width: 28px; height: 10px; border-radius: 3px; position: absolute; left: 50%; transform: translateX(-50%); - background: linear-gradient(180deg, #3A3A4A, #252530); - border: 1px solid #4A4A5A; box-shadow: 0 2px 4px rgba(0,0,0,.5); - cursor: grab; touch-action: none; } - .fader-thumb::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); - width: 16px; height: 2px; border-radius: 1px; background: rgba(255,255,255,.15); - box-shadow: 0 3px 0 rgba(255,255,255,.15), 0 -3px 0 rgba(255,255,255,.15); } - - .tabbar { display: flex; background: ${p.panel}; border-bottom: 1px solid ${p.border}; flex-shrink: 0; } - .tab { flex: 1; padding: 10px 4px; font-size: 10px; font-weight: 500; letter-spacing: .04em; - text-align: center; text-transform: uppercase; color: ${p.textDim}; - cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s; } - .tab.active { color: ${p.amber}; border-bottom-color: ${p.amber}; } - - .card { background: ${p.panel}; border: 1px solid ${p.border}; border-radius: 10px; padding: 16px; } - .card-sm { background: ${p.surface}; border: 1px solid ${p.border}; border-radius: 8px; padding: 12px; } - - .btn { padding: 10px 18px; border-radius: 7px; font-size: 13px; font-weight: 600; - letter-spacing: .04em; border: none; cursor: pointer; transition: all .12s; } - .btn-primary { background: ${p.amber}; color: #000; } - .btn-primary:active { filter: brightness(.85); transform: scale(.97); } - .btn-ghost { background: ${p.surface}; color: ${p.textPrimary}; border: 1px solid ${p.border}; } - .btn-ghost:active { background: ${p.border}; } - .btn-danger { background: rgba(200,64,64,.2); color: ${p.red}; border: 1px solid rgba(200,64,64,.3); } - .btn-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; - justify-content: center; background: ${p.surface}; border: 1px solid ${p.border}; cursor: pointer; - font-size: 16px; transition: all .12s; } - .btn-icon:active { transform: scale(.93); } - .btn-icon.active { background: rgba(232,160,48,.15); border-color: ${p.amber}; color: ${p.amber}; } - .btn-sm { padding: 6px 12px; font-size: 12px; } - - .fx-block { background: ${p.panel}; border: 1px solid ${p.border}; border-radius: 10px; - overflow: hidden; transition: border-color .15s; } - .fx-block.active { border-color: ${p.amber}; } - .fx-block.bypassed { opacity: .45; } - .fx-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; - border-bottom: 1px solid ${p.border}; background: ${p.surface}; cursor: pointer; } - .fx-body { padding: 12px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; } - .bypass-led { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } - .led-on { background: ${p.green}; box-shadow: 0 0 8px ${p.green}; } - .led-off { background: ${p.textDim}; } - - .waveform-wrap { position: relative; overflow: hidden; border-radius: 6px; background: #0F0F14; } - .waveform-canvas { display: block; } - .playhead { position: absolute; top: 0; bottom: 0; width: 1.5px; background: ${p.amber}; - box-shadow: 0 0 8px ${p.amber}; pointer-events: none; transition: left .08s linear; } - - .nam-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; - background: rgba(58,123,168,.15); border: 1px solid rgba(58,123,168,.35); border-radius: 5px; - font-family: 'JetBrains Mono', monospace; font-size: 11px; color: ${p.blue}; } - - .section-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; - color: ${p.textDim}; font-weight: 600; margin-bottom: 10px; } - - .preset-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; - border-radius: 8px; cursor: pointer; transition: background .12s; border: 1px solid transparent; } - .preset-row:active, .preset-row.active { background: rgba(232,160,48,.08); border-color: rgba(232,160,48,.25); } - - .transport-btn { width: 44px; height: 44px; border-radius: 50%; display: flex; - align-items: center; justify-content: center; font-size: 16px; cursor: pointer; - border: 2px solid ${p.border}; background: ${p.surface}; transition: all .12s; } - .transport-btn:active { transform: scale(.92); } - .transport-btn.rec { border-color: ${p.red}; background: rgba(200,64,64,.15); } - .transport-btn.play { border-color: ${p.green}; background: rgba(58,184,122,.15); } - - .badge { display: inline-flex; align-items: center; justify-content: center; - padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; - letter-spacing: .06em; text-transform: uppercase; } - .badge-amber { background: rgba(232,160,48,.2); color: ${p.amber}; } - .badge-green { background: rgba(58,184,122,.2); color: ${p.green}; } - .badge-blue { background: rgba(58,123,168,.2); color: ${p.blue}; } - .badge-red { background: rgba(200,64,64,.2); color: ${p.red}; } - - .screen-header { padding: 12px 14px 8px; display: flex; align-items: center; - justify-content: space-between; border-bottom: 1px solid ${p.border}; flex-shrink: 0; } - .screen-title { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: ${p.textSec}; } - - .screen-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; - flex-direction: column; gap: 12px; } - - /* Settings lists */ - .setting-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid ${p.border}; } - .setting-label { font-size: 13px; color: ${p.textPrimary}; } - .setting-desc { font-size: 11px; color: ${p.textDim}; margin-top: 2px; } - .switch { width: 40px; height: 22px; border-radius: 11px; background: ${p.border}; cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; } - .switch.on { background: ${p.green}; } - .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform .15s; } - .switch.on::after { transform: translateX(18px); } - - .search-bar { display: flex; background: ${p.surface}; border-radius: 7px; border: 1px solid ${p.border}; - padding: 8px 12px; gap: 8px; align-items: center; } - .search-bar input { background: none; border: none; outline: none; color: ${p.textPrimary}; font-size: 13px; flex: 1; } - .search-bar input::placeholder { color: ${p.textDim}; } - - .file-drop { border: 2px dashed ${p.border}; border-radius: 8px; padding: 20px; text-align: center; - cursor: pointer; transition: all .15s; font-size: 13px; color: ${p.textDim}; } - .file-drop:hover, .file-drop.dragover { border-color: ${p.amber}; color: ${p.amber}; } - - .loader { width: 20px; height: 20px; border: 2px solid ${p.border}; border-top-color: ${p.amber}; - border-radius: 50%; animation: spin .6s linear infinite; } - @keyframes spin { to { transform: rotate(360deg); } } - - .slide-panel { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; - display: flex; align-items: flex-end; justify-content: center; } - .slide-panel-inner { background: ${p.bg}; max-width: 440px; width: 100%; max-height: 85vh; - border-radius: 16px 16px 0 0; overflow: hidden; display: flex; flex-direction: column; } - .slide-panel-handle { width: 36px; height: 4px; border-radius: 2px; background: ${p.border}; - margin: 8px auto; flex-shrink: 0; } - - /* Snapshot slots */ - .snap-grid { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; } - .snap-slot { min-width: 60px; flex-shrink: 0; border-radius: 8px; border: 1.5px solid ${p.border}; - background: ${p.surface}; cursor: pointer; text-align: center; padding: 8px 4px; - transition: all .12s; touch-action: manipulation; position: relative; } - .snap-slot:active { transform: scale(.95); } - .snap-slot.filled { border-color: ${p.amberDim}; } - .snap-slot.active { border-color: ${p.amber}; background: rgba(232,160,48,.08); } - .snap-slot .snap-num { font-family: 'JetBrains Mono', monospace; font-size: 16px; - font-weight: 700; color: ${p.textDim}; } - .snap-slot.filled .snap-num { color: ${p.amber}; } - .snap-slot.active .snap-num { color: ${p.amber}; text-shadow: 0 0 8px ${p.amber}; } - .snap-slot .snap-name { font-size: 9px; color: ${p.textDim}; margin-top: 3px; - overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } - .snap-slot.filled .snap-name { color: ${p.textSec}; } - .snap-slot.active .snap-name { color: ${p.amber}; } - .snap-slot .snap-empty { font-size: 9px; color: ${p.textDim}; margin-top: 3px; font-style: italic; } - .snap-slot .snap-save-indicator { position: absolute; top: -3px; right: -3px; - width: 10px; height: 10px; border-radius: 50%; background: ${p.green}; - box-shadow: 0 0 6px ${p.green}; animation: snap-pop .3s ease-out; } - @keyframes snap-pop { 0% { transform: scale(2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } } - .snap-name-input { background: ${p.surface}; border: 1px solid ${p.amber}; border-radius: 4px; - padding: 2px 6px; color: ${p.amber}; font-size: 10px; text-align: center; outline: none; - font-family: 'Inter', sans-serif; width: 100%; } - .snap-header-btn { cursor: pointer; border: none; background: none; color: ${p.textSec}; - font-size: 16px; padding: 4px 6px; border-radius: 6px; transition: all .12s; - display: flex; align-items: center; gap: 4px; } - .snap-header-btn:hover { color: ${p.amber}; background: rgba(232,160,48,.1); } - .snap-header-btn.active { color: ${p.amber}; background: rgba(232,160,48,.15); } - .snap-header-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; - font-weight: 700; color: ${p.amber}; min-width: 16px; text-align: center; } -`;function w({label:e,value:t=50,onChange:n,size:r=52,color:i=p.amber,min:a=0,max:o=100}){let s=(0,l.useRef)(null),c=(0,l.useRef)(null),u=(t-a)/(o-a),d=-140+u*280,m=e=>{e.preventDefault(),c.current={y:e.touches?e.touches[0].clientY:e.clientY,val:t};let r=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,r=(c.current.y-t)/120,i=Math.max(a,Math.min(o,c.current.val+r*(o-a)));n?.(Math.round(i))},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),window.removeEventListener(`touchmove`,r),window.removeEventListener(`touchend`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i),window.addEventListener(`touchmove`,r,{passive:!1}),window.addEventListener(`touchend`,i)},h=r+12,g=h/2,_=h/2,v=r/2+3,y=(d-90)*(Math.PI/180),b=g+v*Math.cos(y),x=_+v*Math.sin(y);return(0,f.jsxs)(`div`,{className:`knob-wrap`,style:{width:r+12},children:[(0,f.jsxs)(`div`,{className:`knob`,style:{width:r,height:r},onMouseDown:m,onTouchStart:m,ref:s,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-6,width:h,height:h,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:g,cy:_,r:v,fill:`none`,stroke:p.border,strokeWidth:`2.5`,strokeLinecap:`round`,opacity:`.5`}),u>0&&(0,f.jsx)(`path`,{d:`M ${g} ${_-v} A ${v} ${v} 0 ${+(u>.5)} 1 ${b} ${x}`,fill:`none`,stroke:i,strokeWidth:`2.5`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 3px ${i})`}})]}),(0,f.jsx)(`div`,{className:`knob-inner`,style:{"--amber":i},children:(0,f.jsx)(`div`,{className:`knob-dot`,style:{height:r*.38,bottom:r/2-2,transform:`translateX(-50%) rotate(${d}deg)`,transformOrigin:`50% ${r*.38}px`}})})]}),(0,f.jsx)(`div`,{className:`knob-value mono`,style:{color:i},children:t}),(0,f.jsx)(`div`,{className:`knob-label`,children:e})]})}function T({level:e=0,height:t=60,vertical:n=!0}){let r=Math.round(e/100*12),i=e=>e>=10?p.red:e>=8?`#E8C030`:p.green;return n?(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column-reverse`,gap:2,height:t,alignItems:`center`},children:Array.from({length:12}).map((e,n)=>(0,f.jsx)(`div`,{style:{width:6,height:(t-24)/12,borderRadius:1,background:n(0,f.jsx)(`div`,{style:{flex:1,height:`100%`,borderRadius:1,background:te.default??e.default??50));return(0,f.jsxs)(`div`,{className:`fx-block ${n?`active`:``} ${r?`bypassed`:``}`,children:[(0,f.jsxs)(`div`,{className:`fx-header`,onClick:()=>s(e=>!e),children:[(0,f.jsx)(`div`,{className:`bypass-led ${r?`led-off`:`led-on`}`,onClick:e=>{e.stopPropagation(),a?.()}}),(0,f.jsx)(`span`,{style:{flex:1,fontSize:13,fontWeight:600},children:e}),(0,f.jsx)(`span`,{className:`badge badge-blue`,style:{fontSize:10},children:t}),(0,f.jsx)(`span`,{style:{color:p.textDim,fontSize:18,marginLeft:6},children:o?`▾`:`▸`})]}),o&&(0,f.jsx)(`div`,{className:`fx-body`,children:i.map((e,t)=>(0,f.jsx)(w,{label:e.name,value:c[t],size:44,onChange:e=>u(n=>n.map((n,r)=>r===t?e:n)),min:e.min??0,max:e.max??100},e.key||e.name))})]})}function ne({children:e,onClose:t}){return(0,f.jsx)(`div`,{className:`slide-panel`,onClick:t,children:(0,f.jsxs)(`div`,{className:`slide-panel-inner`,onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(`div`,{className:`slide-panel-handle`}),e]})})}function re({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)(e?.master_volume==null?80:Math.round(e.master_volume*100)),[a,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(null),u=a??e?.bypass??!1,d=s??e?.tuner_enabled??!1;(0,l.useEffect)(()=>{e?.master_volume!=null&&i(Math.round(e.master_volume*100))},[e?.master_volume]),(0,l.useEffect)(()=>{e?.bypass!==void 0&&o(null),e?.tuner_enabled!==void 0&&c(null)},[e?.bypass,e?.tuner_enabled]);let m=async e=>{i(e);try{await x(`/api/volume`,{volume:e/100})}catch{}},h=async()=>{let e=!u;o(e);try{await b(`/api/bypass`,{bypass:e})}catch{o(null)}},g=async()=>{let e=!d;c(e);try{await b(`/api/tuner`,{enabled:e})}catch{c(null)}},_=e?.input_level??0,v=e?.output_level??0;return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Active Rig`}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,marginTop:4,flexWrap:`wrap`,alignItems:`center`},children:[e?.current_preset?(0,f.jsx)(`span`,{className:`nam-chip`,style:{color:p.amber,borderColor:`${p.amber}55`,background:`${p.amber}15`},children:e.current_preset.name}):(0,f.jsx)(`span`,{style:{fontSize:11,color:p.textDim},children:`No preset loaded`}),t?(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Connected`}):(0,f.jsx)(`span`,{className:`badge badge-red`,children:`Offline`})]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,f.jsx)(T,{level:_,height:44}),(0,f.jsx)(T,{level:v,height:44})]})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[(0,f.jsxs)(`div`,{className:`card-sm`,style:{display:`flex`,gap:10,justifyContent:`space-around`},children:[(0,f.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:4},children:`Bypass`}),(0,f.jsx)(`div`,{className:`switch ${u?`on`:``}`,onClick:h,style:{margin:`0 auto`}})]}),(0,f.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:4},children:`Tuner`}),(0,f.jsx)(`div`,{className:`switch ${d?`on`:``}`,onClick:g,style:{margin:`0 auto`}})]}),(0,f.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:4},children:`Routing`}),(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:12,color:p.amber},children:e?.routing_mode||`mono`})]})]}),d&&(0,f.jsxs)(`div`,{className:`card-sm`,style:{background:`${p.amber}15`,borderColor:p.amber,textAlign:`center`,padding:`20px 16px`},children:[(0,f.jsx)(`div`,{style:{fontSize:32,marginBottom:8},children:`🎵`}),(0,f.jsx)(`div`,{className:`section-label`,style:{color:p.amber,marginBottom:4,fontSize:14},children:`TUNER ACTIVE`}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:24,color:p.amber,letterSpacing:4},children:`—————●—————`}),(0,f.jsx)(`div`,{style:{fontSize:11,color:p.textDim,marginTop:8},children:`Tap switch again to exit tuner mode`})]}),(0,f.jsxs)(`div`,{className:`card`,style:{display:`flex`,gap:20,alignItems:`center`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Master Volume`}),(0,f.jsx)(`input`,{type:`range`,min:0,max:100,value:r,onChange:e=>m(+e.target.value),style:{width:`100%`,accentColor:p.amber}}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:11,color:p.amber,marginTop:4},children:[r,`%`]})]}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:11,color:p.textSec,textAlign:`right`},children:[e?.nam_loaded?`NAM: Active`:`NAM: —`,(0,f.jsx)(`br`,{}),e?.ir_loaded?`IR: Active`:`IR: —`]})]}),(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Signal Chain`}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,overflowX:`auto`,padding:`4px 0`},children:[`IN`,e?.bypass?`BYP`:e?.nam_loaded?`NAM`:`AMP`,e?.ir_loaded?`IR`:`CAB`,`OUT`].map((e,t,n)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(`div`,{style:{padding:`3px 8px`,borderRadius:4,fontSize:10,fontWeight:700,background:t===0||t===n.length-1?p.blueDim:p.amberDim,color:t===0||t===n.length-1?p.blue:p.amber,border:`1px solid ${t===0||t===n.length-1?p.blue:p.amber}60`},children:e}),t{let e=document.querySelector(`.tabbar`)?.children;e&&e[3]?.click()},children:`Browse IRs`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,style:{flex:1,fontSize:10},onClick:()=>{let e=document.querySelector(`.tabbar`)?.children;e&&e[2]?.click()},children:`Browse Models`})]})]})]})}var ie={noise_gate:`Noise Gate`,compressor:`Compressor`,boost:`Boost`,overdrive:`Overdrive`,distortion:`Distortion`,fuzz:`Fuzz`,eq:`EQ`,chorus:`Chorus`,flanger:`Flanger`,phaser:`Phaser`,tremolo:`Tremolo`,vibrato:`Vibrato`,delay:`Delay`,reverb:`Reverb`,volume:`Volume`,nam_amp:`NAM Amp`,ir_cab:`IR Cab`,octaver:`Octaver`,pitch_shifter:`Pitch Shifter`,harmonizer:`Harmonizer`,whammy:`Whammy`,detune:`Detune`,ring_modulator:`Ring Mod`,auto_wah:`Auto Wah`,envelope_filter:`Env Filter`,rotary_speaker:`Rotary`,uni_vibe:`Uni-Vibe`,auto_pan:`Auto Pan`,stereo_widener:`Stereo Widener`,bitcrusher:`Bitcrusher`,wavefolder:`Wavefolder`,rectifier:`Rectifier`,expander:`Expander`,de_esser:`De-esser`,transient_shaper:`Transient Shaper`,parametric_eq:`Parametric EQ`,high_pass_filter:`High Pass`,low_pass_filter:`Low Pass`,band_pass_filter:`Band Pass`,notch_filter:`Notch Filter`,formant_filter:`Formant Filter`,ping_pong_delay:`Ping Pong Delay`,multi_tap_delay:`Multi Tap`,reverse_delay:`Reverse Delay`,tape_echo:`Tape Echo`,shimmer_reverb:`Shimmer Reverb`,looper:`Looper`,early_reflections:`Early Reflections`,sidechain_compressor:`Sidechain Comp`};function ae({state:e,connected:t}){let[n,r]=(0,l.useState)(null),[i,a]=(0,l.useState)(!0),[o,s]=(0,l.useState)(!1),[c,u]=(0,l.useState)({}),d=(0,l.useCallback)(async e=>{if(c[e])return c[e];try{let t=await y(`/api/block-params/${e}`);return u(n=>({...n,[e]:t.params||[]})),t.params||[]}catch{return[]}},[c]);(0,l.useEffect)(()=>{if(!t||!e?.current_preset){r([]),a(!1);return}y(`/api/presets`).then(async t=>{let n=t.banks||[],i=e.current_preset,o=n[i.bank]?.presets?.[i.program];o?.chain&&r(await Promise.all(o.chain.map(async(e,t)=>{let n=await d(e.fx_type);return{id:t+1,title:ie[e.fx_type]||e.fx_type.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),type:e.fx_type,bypassed:e.bypass||!e.enabled,params:n}}))),a(!1)}).catch(()=>{r([]),a(!1)})},[t,e,d]);let m=e=>r(t=>t&&t.map(t=>t.id===e?{...t,bypassed:!t.bypassed}:t)),h=async e=>{s(!1);let t=await d(e);r(n=>[...n||[],{id:Date.now(),title:ie[e]||e,type:e,bypassed:!1,params:t}])};return i?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})}):(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{className:`screen-title`,children:[`FX Chain `,(n?.length||0)>0?`(${n.length})`:``]}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>s(!0),children:`+ Add Block`})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[n&&n.length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 2px`,overflowX:`auto`},children:[`IN`,...n.map(e=>e.type.toUpperCase()),`OUT`].map((e,t,n)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(`div`,{style:{padding:`3px 8px`,borderRadius:4,fontSize:10,fontWeight:700,background:e===`IN`||e===`OUT`?p.blueDim:p.amberDim,color:e===`IN`||e===`OUT`?p.blue:p.amber,border:`1px solid ${e===`IN`||e===`OUT`?p.blue:p.amber}60`},children:e}),ts(!0),children:`+ Add your first block`})]}):n.map(e=>(0,f.jsx)(E,{...e,active:!e.bypassed,onToggle:()=>m(e.id)},e.id))]}),o&&(0,f.jsxs)(ne,{onClose:()=>s(!1),children:[(0,f.jsx)(`div`,{className:`screen-header`,children:(0,f.jsx)(`div`,{className:`screen-title`,children:`Add FX Block`})}),(0,f.jsx)(`div`,{className:`screen-body`,style:{gap:4},children:Object.entries(ie).map(([e,t])=>(0,f.jsxs)(`div`,{className:`preset-row`,onClick:()=>h(e),style:{borderRadius:6},children:[(0,f.jsx)(`span`,{className:`badge badge-blue`,style:{width:60,flexShrink:0},children:e.split(`_`)[0]}),(0,f.jsx)(`span`,{style:{flex:1,fontSize:13},children:t}),(0,f.jsx)(`span`,{style:{color:p.textDim},children:`+`})]},e))})]})]})}function oe({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(!0),[u,d]=(0,l.useState)(!1),[m,h]=(0,l.useState)(``),[g,_]=(0,l.useState)([]),[v,x]=(0,l.useState)(!1),[ee,C]=(0,l.useState)(!1),te=(0,l.useRef)(null),w=(0,l.useCallback)(async()=>{if(!t){c(!1);return}try{let e=await y(`/api/models`);i(e.models||[]),o(e.current)}catch{}c(!1)},[t]);(0,l.useEffect)(()=>{w()},[w]);let T=async e=>{try{await b(`/api/models/load`,{path:e}),await w(),n()}catch{alert(`Failed to load model`)}},E=async()=>{try{await b(`/api/models/unload`),o(null),await w(),n()}catch{alert(`Failed to unload`)}},ne=async e=>{let t=e.target.files?.[0];if(t){C(!0);try{await S(`/api/models/upload`,t),await w()}catch{alert(`Upload failed`)}C(!1)}},re=(0,l.useCallback)(async()=>{if(m.trim()){d(!0);try{_((await y(`/api/models/tonedownload/search?q=${encodeURIComponent(m)}`)).results||[])}catch{alert(`Search failed`)}d(!1)}},[m]),ie=async e=>{try{await b(`/api/models/tonedownload/install`,{download_url:e.download_url,name:e.name||e.filename,id:e.id,size:e.size,pack_name:e.pack_name,display_name:e.name}),await w(),n()}catch{alert(`Install failed`)}};return s?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})}):(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{className:`screen-title`,children:[`NAM Models (`,r.length,`)`]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>x(!v),children:v?`Local`:`Search`}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>te.current?.click(),children:ee?`...`:`+ Upload`}),(0,f.jsx)(`input`,{ref:te,type:`file`,accept:`.nam`,style:{display:`none`},onChange:ne})]})]}),v&&(0,f.jsxs)(`div`,{style:{padding:`8px 12px`,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{className:`search-bar`,children:[(0,f.jsx)(`span`,{style:{color:p.textDim},children:`🔍`}),(0,f.jsx)(`input`,{type:`text`,placeholder:`Search Tone3000…`,value:m,onChange:e=>h(e.target.value),onKeyDown:e=>e.key===`Enter`&&re()}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:re,disabled:u,children:u?`...`:`Go`})]}),g.length>0&&(0,f.jsx)(`div`,{style:{marginTop:8,maxHeight:240,overflow:`auto`},children:g.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,onClick:()=>ie(e),style:{borderBottom:`1px solid ${p.border}`,borderRadius:0},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.author,` · `,e.size_display,` · `,e.architecture]})]}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,children:`Get`})]},e.id))})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[a&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:6},children:`Loaded Model`}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(`div`,{className:`nam-chip`,children:a}),(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:E,children:`Unload`})]})]}),r.length===0?(0,f.jsxs)(`div`,{style:{textAlign:`center`,padding:30,color:p.textDim,fontSize:14},children:[`No NAM models found.`,(0,f.jsx)(`br`,{}),`Upload a .nam file or search Tone3000.`]}):r.map(e=>(0,f.jsxs)(`div`,{className:`preset-row ${e.loaded?`active`:``}`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.architecture,` · `,e.size_mb,` MB`]})]}),e.loaded?(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Loaded`}):(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>T(e.path),children:`Load`})]},e.name))]})]})}function se({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(!0),[u,d]=(0,l.useState)(!1),[m,h]=(0,l.useState)(``),[g,_]=(0,l.useState)([]),[v,x]=(0,l.useState)(!1),[ee,C]=(0,l.useState)(!1),te=(0,l.useRef)(null),w=(0,l.useCallback)(async()=>{if(!t){c(!1);return}try{let e=await y(`/api/irs`);i(e.irs||[]),o(e.current)}catch{}c(!1)},[t]);(0,l.useEffect)(()=>{w()},[w]);let T=async e=>{try{await b(`/api/irs/load`,{path:e}),await w(),n()}catch{alert(`Failed to load IR`)}},E=async()=>{try{await b(`/api/irs/unload`),o(null),await w(),n()}catch{alert(`Failed to unload`)}},ne=async e=>{let t=e.target.files?.[0];if(t){C(!0);try{await S(`/api/irs/upload`,t),await w()}catch{alert(`Upload failed`)}C(!1)}},re=(0,l.useCallback)(async()=>{if(m.trim()){d(!0);try{_((await y(`/api/irs/tonedownload/search?q=${encodeURIComponent(m)}`)).results||[])}catch{alert(`Search failed`)}d(!1)}},[m]),ie=async e=>{try{await b(`/api/irs/tonedownload/install`,{download_url:e.download_url,name:e.name||e.filename,id:e.id,size:e.size,display_name:e.name}),await w(),n()}catch{alert(`Install failed`)}};return s?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})}):(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{className:`screen-title`,children:[`IR Files (`,r.length,`)`]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>x(!v),children:v?`Local`:`Search`}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>te.current?.click(),children:ee?`...`:`+ Upload`}),(0,f.jsx)(`input`,{ref:te,type:`file`,accept:`.wav`,style:{display:`none`},onChange:ne})]})]}),v&&(0,f.jsxs)(`div`,{style:{padding:`8px 12px`,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{className:`search-bar`,children:[(0,f.jsx)(`span`,{style:{color:p.textDim},children:`🔍`}),(0,f.jsx)(`input`,{type:`text`,placeholder:`Search Tone3000 IRs…`,value:m,onChange:e=>h(e.target.value),onKeyDown:e=>e.key===`Enter`&&re()}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:re,disabled:u,children:u?`...`:`Go`})]}),g.length>0&&(0,f.jsx)(`div`,{style:{marginTop:8,maxHeight:240,overflow:`auto`},children:g.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,onClick:()=>ie(e),style:{borderBottom:`1px solid ${p.border}`,borderRadius:0},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.author,` · `,e.size_display]})]}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,children:`Get`})]},e.id))})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[a&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:6},children:`Loaded IR`}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(`div`,{className:`nam-chip`,style:{color:p.green,borderColor:`${p.green}55`,background:`${p.green}15`},children:a}),(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:E,children:`Unload`})]})]}),r.length===0?(0,f.jsxs)(`div`,{style:{textAlign:`center`,padding:30,color:p.textDim,fontSize:14},children:[`No IR files found.`,(0,f.jsx)(`br`,{}),`Upload a .wav file or search Tone3000.`]}):r.map(e=>(0,f.jsxs)(`div`,{className:`preset-row ${e.loaded?`active`:``}`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.sample_rate,` Hz · `,e.length_ms,` ms · `,e.num_taps,` taps`]})]}),e.loaded?(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Loaded`}):(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>T(e.path),children:`Load`})]},e.name))]})]})}function ce({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(0),[s,c]=(0,l.useState)(!0),[u,d]=(0,l.useState)(``),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(null),v=(0,l.useCallback)(async()=>{if(!t){i([{name:`Default`,number:0,presets:[{name:`Edge of Breakup`,bank:0,program:0},{name:`Modern High Gain`,bank:0,program:1},null,null]}]),c(!1);return}try{i((await y(`/api/presets`)).banks||[])}catch{}c(!1)},[t]);(0,l.useEffect)(()=>{v()},[v]);let S=async(e,t)=>{try{await b(`/api/presets/${e}/${t}/activate`),await v(),n()}catch{alert(`Failed to load preset`)}},C=async()=>{if(!u.trim())return;let t=e?.current_preset?.bank??0,n=e?.current_preset?.program??0;try{await x(`/api/presets/${t}/${n}`,{name:u}),h(!1),await v()}catch{alert(`Failed to save`)}},te=async()=>{let e=a,t=r[e]?.presets||[],i=t.findIndex(e=>e==null);i===-1&&(i=t.length);let o=`New Preset ${i+1}`;try{await x(`/api/presets/${e}/${i}`,{name:o}),await v(),await b(`/api/presets/${e}/${i}/activate`),n()}catch{alert(`Failed to create preset`)}},w=async(e,t)=>{try{await ee(`/api/presets/${e}/${t}`),_(null),await v()}catch{alert(`Failed to delete`)}};if(s)return(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})});let T=e?.current_preset,E=r[a]?.presets||[];return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Presets`}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>h(!0),children:`Save`}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:te,children:`+ New`})]})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[r.length>1&&(0,f.jsx)(`div`,{className:`toggle`,children:r.map((e,t)=>(0,f.jsx)(`button`,{className:`toggle-btn ${a===t?`active`:``}`,onClick:()=>o(t),children:e.name},e.number))}),T&&(0,f.jsx)(`div`,{className:`card-sm`,style:{display:`flex`,alignItems:`center`,gap:8},children:(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:11,color:p.textDim},children:`Current`}),(0,f.jsxs)(`div`,{style:{fontSize:14,fontWeight:600,color:p.amber},children:[T.name,(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:10,color:p.textDim,marginLeft:8},children:[`Bank `,T.bank,` · Prog `,T.program]})]})]})}),E.length===0?(0,f.jsx)(`div`,{style:{textAlign:`center`,padding:30,color:p.textDim,fontSize:14},children:`No presets in this bank.`}):E.map((e,t)=>{if(!e)return null;let n=T?.bank===e.bank&&T?.program===e.program,r=g===`${e.bank}-${e.program}`;return(0,f.jsxs)(`div`,{className:`preset-row ${n?`active`:``}`,onClick:()=>!r&&S(e.bank,e.program),children:[(0,f.jsx)(`div`,{className:`mono`,style:{width:28,height:28,borderRadius:6,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:12,fontWeight:700,background:n?`${p.amber}22`:p.surface,color:n?p.amber:p.textDim,border:`1px solid ${n?p.amber+`60`:p.border}`},children:e.program+1}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:600},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[`Bank `,e.bank,` · Program `,e.program]})]}),n&&(0,f.jsx)(`span`,{style:{color:p.amber,fontSize:16},children:`●`}),r?(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:t=>{t.stopPropagation(),w(e.bank,e.program)},children:`Confirm`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:e=>{e.stopPropagation(),_(null)},children:`Cancel`})]}):(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,style:{color:p.red},onClick:t=>{t.stopPropagation(),_(`${e.bank}-${e.program}`)},children:`Delete`})]},t)})]}),m&&(0,f.jsxs)(ne,{onClose:()=>h(!1),children:[(0,f.jsx)(`div`,{className:`screen-header`,children:(0,f.jsx)(`div`,{className:`screen-title`,children:`Save Preset`})}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[(0,f.jsx)(`div`,{className:`search-bar`,children:(0,f.jsx)(`input`,{type:`text`,placeholder:`Preset name…`,value:u,onChange:e=>d(e.target.value),autoFocus:!0,onKeyDown:e=>e.key===`Enter`&&C()})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,f.jsx)(`button`,{className:`btn btn-primary`,style:{flex:1},onClick:C,children:`Save`}),(0,f.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>h(!1),children:`Cancel`})]})]})]})]})}function D({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)(`wifi`),[a,o]=(0,l.useState)([]),[s,c]=(0,l.useState)([]),[u,d]=(0,l.useState)([]),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(!1),[v,x]=(0,l.useState)(``),[ee,S]=(0,l.useState)(``),[C,te]=(0,l.useState)(null),[w,T]=(0,l.useState)(e?.routing_mode||`mono`),[E,ne]=(0,l.useState)(e?.routing_breakpoint||7),[re,ie]=(0,l.useState)(e?.channel_mode||`dual-mono`);(0,l.useEffect)(()=>{e?.routing_mode&&T(e.routing_mode),e?.routing_breakpoint!=null&&ne(e.routing_breakpoint),e?.channel_mode&&ie(e.channel_mode)},[e?.routing_mode,e?.routing_breakpoint,e?.channel_mode]);let ae=async()=>{h(!0);try{o((await y(`/api/wifi/scan`)).networks||[])}catch{}h(!1)},oe=async(e,t)=>{try{await b(`/api/wifi/connect`,{ssid:e,password:t}),te(null),x(``),S(``),setTimeout(n,2e3)}catch{alert(`Failed to connect`)}},se=async()=>{try{await b(`/api/wifi/disconnect`),setTimeout(n,2e3)}catch{}},ce=async()=>{let t=e?.wifi?.hotspot_active;try{t?await b(`/api/wifi/hotspot/disable`):await b(`/api/wifi/hotspot/enable`,{ssid:`Pi-Pedal`,password:`pedal1234`}),setTimeout(n,2e3)}catch{}},D=async e=>{try{await b(`/api/bluetooth/power`,{on:e}),setTimeout(n,1e3)}catch{}},O=async()=>{_(!0);try{c((await b(`/api/bluetooth/scan`)).devices||[])}catch{}_(!1)},le=async()=>{try{d((await y(`/api/bluetooth/paired`)).devices||[])}catch{}},ue=async e=>{try{await b(`/api/bluetooth/pair`,{address:e}),await le()}catch{alert(`Pairing failed`)}},de=async(e,t)=>{try{await b(`/api/routing`,{routing_mode:e,routing_breakpoint:t})}catch{}},fe=async e=>{try{await b(`/api/channel-mode`,{channel_mode:e}),ie(e)}catch{}};(0,l.useEffect)(()=>{t&&(ae(),le())},[t]);let k=e?.wifi,A=e?.bluetooth;return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsx)(`div`,{className:`screen-header`,children:(0,f.jsx)(`div`,{className:`screen-title`,children:`Settings`})}),(0,f.jsx)(`div`,{className:`toggle`,style:{margin:`6px 10px`},children:[{id:`wifi`,label:`WiFi`},{id:`bt`,label:`Bluetooth`},{id:`routing`,label:`Routing`}].map(e=>(0,f.jsx)(`button`,{className:`toggle-btn ${r===e.id?`active`:``}`,onClick:()=>i(e.id),children:e.label},e.id))}),(0,f.jsxs)(`div`,{className:`screen-body`,style:{gap:4},children:[r===`wifi`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`setting-row`,style:{border:`none`,paddingTop:0},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`WiFi`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:k?.connected?`Connected to ${k.ssid}`:`Disconnected`})]}),(0,f.jsx)(`div`,{className:`switch ${k?.connected?`on`:``}`,onClick:se})]}),k?.connected&&(0,f.jsxs)(`div`,{style:{fontSize:11,color:p.textDim},children:[`IP: `,k.ip,` · Signal: `,k.signal,`%`]}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Hotspot`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:k?.hotspot_active?`Active: ${k.hotspot_ssid}`:`Off`})]}),(0,f.jsx)(`div`,{className:`switch ${k?.hotspot_active?`on`:``}`,onClick:ce})]})]}),(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:0},children:`Networks`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:ae,disabled:m,children:m?`...`:`Scan`})]}),a.length===0?(0,f.jsx)(`div`,{style:{fontSize:12,color:p.textDim,padding:`8px 0`},children:`Scan to see available networks.`}):a.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},onClick:()=>wpaState?.ssid!==e.ssid&&te(e.ssid),children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.ssid}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:[`Signal: `,e.signal,`% · `,e.encryption||`Open`]})]}),k?.ssid===e.ssid&&(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Connected`})]},e.ssid))]}),C&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`section-label`,children:[`Connect to `,C]}),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,f.jsx)(`input`,{type:`password`,placeholder:`Password (leave blank for open network)`,value:ee,onChange:e=>S(e.target.value),style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`8px 12px`,color:p.textPrimary,fontSize:13,outline:`none`},onKeyDown:e=>e.key===`Enter`&&oe(C,ee)}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,style:{flex:1},onClick:()=>oe(C,ee),children:`Connect`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>te(null),children:`Cancel`})]})]})]})]}),r===`bt`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`setting-row`,style:{border:`none`,paddingTop:0},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Bluetooth`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:A?.powered?`Powered on`:`Off`})]}),(0,f.jsx)(`div`,{className:`switch ${A?.powered?`on`:``}`,onClick:()=>D(!A?.powered)})]}),A?.powered&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Discoverable`}),(0,f.jsxs)(`div`,{className:`setting-desc`,children:[A?.name,` (`,A?.address,`)`]})]}),(0,f.jsx)(`div`,{className:`switch ${A?.discoverable?`on`:``}`,onClick:async()=>{try{await b(`/api/bluetooth/discoverable`,{on:!A?.discoverable}),setTimeout(n,500)}catch{}}})]}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Bluetooth MIDI`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:A?.midi_enabled?`Enabled`:`Disabled`})]}),(0,f.jsx)(`div`,{className:`switch ${A?.midi_enabled?`on`:``}`,onClick:async()=>{try{await(A?.midi_enabled?b(`/api/bluetooth/midi-disable`):b(`/api/bluetooth/midi-enable`)),setTimeout(n,500)}catch{}}})]})]})]}),A?.powered&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,f.jsxs)(`div`,{className:`section-label`,style:{marginBottom:0},children:[`Paired Devices (`,u.length,`)`]}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:O,disabled:g,children:g?`...`:`Scan`})]}),u.length===0?(0,f.jsx)(`div`,{style:{fontSize:12,color:p.textDim,padding:`8px 0`},children:`No paired devices.`}):u.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name||e.address}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:[e.address,` · `,e.connected?`Connected`:`Paired`]})]}),!e.connected&&(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:async()=>{try{await b(`/api/bluetooth/connect`,{address:e.address})}catch{alert(`Failed`)}},children:`Connect`})]},e.address))]}),g&&s.length>0&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:6},children:`Discovered`}),s.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name||e.address}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:e.address})]}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>ue(e.address),children:`Pair`})]},e.address))]})]}),r===`routing`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,children:`4CM Routing`}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Mode`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:`Mono (normal) or 4CM (4-cable method)`})]}),(0,f.jsxs)(`select`,{value:w,onChange:e=>{T(e.target.value),de(e.target.value,E)},style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`6px 10px`,color:p.textPrimary,fontSize:13,outline:`none`},children:[(0,f.jsx)(`option`,{value:`mono`,children:`Mono`}),(0,f.jsx)(`option`,{value:`4cm`,children:`4CM`})]})]}),w===`4cm`&&(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Breakpoint`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:`Chain position for amp send/return`})]}),(0,f.jsx)(`input`,{type:`number`,min:1,max:15,value:E,onChange:e=>{let t=+e.target.value;ne(t),de(w,t)},style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`6px 10px`,color:p.textPrimary,fontSize:13,width:60,outline:`none`,textAlign:`center`}})]})]}),(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Channel Mode`}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Routing`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:`Dual-mono: two independent channels · Stereo: linked as L/R pair`})]}),(0,f.jsxs)(`select`,{value:re,onChange:e=>fe(e.target.value),style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`6px 10px`,color:p.textPrimary,fontSize:13,outline:`none`},children:[(0,f.jsx)(`option`,{value:`dual-mono`,children:`Dual-Mono`}),(0,f.jsx)(`option`,{value:`stereo`,children:`Stereo`})]})]}),(0,f.jsx)(`div`,{style:{fontSize:10,color:p.textDim,marginTop:4,padding:`4px 0`},children:re===`dual-mono`?`Each channel controlled independently from its own phone.`:`Channels A (Left) and B (Right) are controlled together.`})]})]})]})]})}function O({state:e}){let[t,n]=(0,l.useState)(!1),[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(!0),s=e?.input_level??0,c=e?.output_level??0,u=(0,l.useCallback)(async()=>{try{i((await y(`/api/captures`)).captures||[])}catch{}o(!1)},[]);return(0,l.useEffect)(()=>{u()},[u]),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Looper / Recorder`}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:[e?.sample_rate?`${e.sample_rate/1e3}kHz`:`—`,t&&(0,f.jsx)(`span`,{style:{color:p.red,marginLeft:8},children:`● RECORDING`})]})]}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:t?(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:async()=>{try{await b(`/api/capture/stop`),n(!1),u()}catch{alert(`Failed to stop recording`)}},style:{padding:`8px 16px`},children:`⏹ Stop`}):(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:async()=>{try{await b(`/api/capture/start`),n(!0)}catch{alert(`Failed to start recording`)}},style:{padding:`8px 16px`,background:p.red,color:`#fff`},children:`● Record`})})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[(0,f.jsxs)(`div`,{className:`card`,style:{padding:`16px`,display:`flex`,gap:16,alignItems:`center`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Input Level`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:2,height:20,marginTop:4},children:Array.from({length:12}).map((e,t)=>{let n=Math.round(s/100*12)>t,r=t>=10?p.red:t>=8?`#E8C030`:p.green;return(0,f.jsx)(`div`,{style:{flex:1,borderRadius:2,background:n?r:p.border,transition:`all .05s`}},t)})})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Output Level`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:2,height:20,marginTop:4},children:Array.from({length:12}).map((e,t)=>{let n=Math.round(c/100*12)>t,r=t>=10?p.red:t>=8?`#E8C030`:p.green;return(0,f.jsx)(`div`,{style:{flex:1,borderRadius:2,background:n?r:p.border,transition:`all .05s`}},t)})})]})]}),t&&(0,f.jsxs)(`div`,{className:`card-sm`,style:{background:`${p.red}15`,borderColor:p.red,textAlign:`center`,padding:20},children:[(0,f.jsx)(`div`,{style:{fontSize:40,marginBottom:8,animation:`pulse 1s ease-in-out infinite`},children:`🔴`}),(0,f.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:p.red},children:`Recording...`}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:11,color:p.textDim,marginTop:4},children:`Saving to captures folder — tap Stop to finish`})]}),!t&&(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`section-label`,style:{marginBottom:6},children:[`Recordings (`,r.length,`)`]}),a?(0,f.jsx)(`div`,{className:`loader`,style:{margin:`10px auto`}}):r.length===0?(0,f.jsx)(`div`,{style:{fontSize:12,color:p.textDim,padding:`10px 0`},children:`No recordings yet. Tap ● Record to capture audio.`}):r.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:e.size_display})]}),(0,f.jsx)(`a`,{href:`/api/captures/${e.name}`,target:`_blank`,rel:`noopener`,className:`btn btn-ghost btn-sm`,style:{textDecoration:`none`},children:`▶ Play`})]},e.name))]})})]}),(0,f.jsx)(`style`,{children:`@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }`})]})}function le({onClose:e,state:t,connected:n}){let[r,i]=(0,l.useState)({}),[a,o]=(0,l.useState)(!0),[s,c]=(0,l.useState)(null),[u,d]=(0,l.useState)(``),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)(!1),v=(0,l.useRef)(null),S=t?.current_snapshot??0,C=(0,l.useCallback)(async()=>{if(!n){o(!1);return}try{i((await y(`/api/snapshots`)).snapshots||{})}catch{}o(!1)},[n]);(0,l.useEffect)(()=>{C()},[C]);let te=e=>{v.current=setTimeout(()=>{v.current=null,E(e)},600)},w=e=>{v.current&&(clearTimeout(v.current),v.current=null,r[String(e)]?re(e):E(e))},T=()=>{v.current&&=(clearTimeout(v.current),null)},E=async e=>{try{await b(`/api/snapshots/${e}/save`),h(e),setTimeout(()=>h(null),800),await C()}catch{}},re=async e=>{try{await b(`/api/snapshots/${e}/recall`),await C()}catch{}},ie=async e=>{if(u.trim())try{await x(`/api/snapshots/${e}`,{name:u.trim()}),c(null),await C()}catch{}},ae=async e=>{try{await ee(`/api/snapshots/${e}`),await C()}catch{}};return(0,f.jsxs)(ne,{onClose:e,children:[(0,f.jsxs)(`div`,{className:`screen-header`,style:{justifyContent:`space-between`},children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Snapshots`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:(0,f.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:4,fontSize:10,color:p.textDim,cursor:`pointer`},children:[(0,f.jsx)(`div`,{className:`switch ${g?`on`:``}`,style:{width:28,height:16},onClick:()=>_(e=>!e),children:(0,f.jsx)(`div`,{style:{position:`absolute`,top:1,left:g?11:1,width:13,height:13,borderRadius:`50%`,background:`#fff`,transition:`left .15s`}})}),`Discard Edits`]})})]}),(0,f.jsxs)(`div`,{className:`screen-body`,style:{gap:8},children:[(0,f.jsxs)(`div`,{style:{fontSize:11,color:p.textDim,marginBottom:4},children:[`Tap to recall · Hold to save`,g&&(0,f.jsx)(`span`,{style:{color:p.amber,marginLeft:8},children:`Edits will be discarded on recall`})]}),(0,f.jsx)(`div`,{className:`snap-grid`,children:[1,2,3,4,5,6,7,8].map(e=>{let t=r[String(e)],n=S===e,i=!!t,a=s===e,o=m===e;return(0,f.jsxs)(`div`,{className:`snap-slot ${i?`filled`:``} ${n?`active`:``}`,onMouseDown:()=>te(e),onTouchStart:()=>te(e),onMouseUp:()=>w(e),onTouchEnd:()=>w(e),onMouseLeave:T,onTouchCancel:T,style:o?{background:`rgba(58,184,122,.15)`}:{},children:[(0,f.jsx)(`div`,{className:`snap-num`,children:e}),a?(0,f.jsx)(`input`,{className:`snap-name-input`,value:u,onChange:e=>d(e.target.value),onBlur:()=>ie(e),onKeyDown:t=>{t.key===`Enter`&&ie(e),t.key===`Escape`&&c(null)},autoFocus:!0,onClick:e=>e.stopPropagation()}):t?(0,f.jsx)(`div`,{className:`snap-name`,onClick:n=>{n.stopPropagation(),c(e),d(t.name)},children:t.name}):(0,f.jsx)(`div`,{className:`snap-empty`,children:`Empty`}),o&&(0,f.jsx)(`div`,{className:`snap-save-indicator`}),n&&(0,f.jsx)(`div`,{style:{position:`absolute`,bottom:-2,left:`50%`,transform:`translateX(-50%)`,width:20,height:2,borderRadius:1,background:p.amber}})]},e)})}),S>0&&r[String(S)]&&(0,f.jsx)(`div`,{style:{marginTop:8,display:`flex`,gap:8},children:(0,f.jsxs)(`button`,{className:`btn btn-danger btn-sm`,style:{flex:1},onClick:()=>ae(S),children:[`Delete Snapshot `,S]})})]})]})}var ue=[{id:`rig`,label:`Rig`,icon:`🎛`},{id:`fx`,label:`FX Chain`,icon:`⛓`},{id:`models`,label:`Models`,icon:`📁`},{id:`irs`,label:`IRs`,icon:`🎚`},{id:`presets`,label:`Presets`,icon:`⭐`},{id:`settings`,label:`Settings`,icon:`⚙`},{id:`record`,label:`Looper`,icon:`🎙`}];function de(){let[e,t]=(0,l.useState)(`rig`),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(()=>{try{return localStorage.getItem(`pedal_channel`)||`guitar`}catch{return`guitar`}}),{state:o,connected:s,refresh:c}=C();(0,l.useEffect)(()=>{document.title=`Pi Multi-FX Pedal`},[]),(0,l.useEffect)(()=>{try{localStorage.setItem(`pedal_channel`,i)}catch{}_(i)},[i]);let u=e=>{a(e)};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`style`,{children:te}),(0,f.jsxs)(`div`,{style:{width:`100%`,maxWidth:440,margin:`0 auto`,height:`100dvh`,display:`flex`,flexDirection:`column`,background:p.bg,overflow:`hidden`,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 10px`,background:p.panel,borderBottom:`1px solid ${p.border}`,flexShrink:0},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,f.jsx)(`div`,{style:{width:6,height:6,borderRadius:`50%`,background:s?p.green:p.red,boxShadow:s?`0 0 6px ${p.green}`:`none`}}),o?.channel_mode===`stereo`?(0,f.jsx)(`span`,{className:`badge badge-amber`,style:{fontSize:9,padding:`2px 7px`,letterSpacing:`.08em`},children:`STEREO`}):(0,f.jsxs)(`div`,{className:`toggle`,style:{margin:0,height:22},children:[(0,f.jsx)(`button`,{className:`toggle-btn ${i===`guitar`?`active`:``}`,onClick:()=>u(`guitar`),style:{padding:`2px 8px`,fontSize:10,fontWeight:700,letterSpacing:`.1em`},children:`GUITAR`}),(0,f.jsx)(`button`,{className:`toggle-btn ${i===`bass`?`active`:``}`,onClick:()=>u(`bass`),style:{padding:`2px 8px`,fontSize:10,fontWeight:700,letterSpacing:`.1em`},children:`BASS`})]}),o?.tuner_enabled&&(0,f.jsx)(`span`,{className:`badge badge-amber`,style:{fontSize:8,padding:`1px 5px`},children:`TUNER`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsxs)(`button`,{className:`snap-header-btn ${n?`active`:``}`,onClick:()=>r(!0),title:`Snapshots`,children:[`📷`,o?.current_snapshot>0&&(0,f.jsx)(`span`,{className:`snap-header-num`,children:o.current_snapshot})]}),o?.cpu_percent!=null&&(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:9,color:p.textDim},children:[`CPU `,o.cpu_percent,`%`]}),o?.sample_rate&&(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:9,color:p.textDim},children:[o.sample_rate/1e3,`kHz`]}),o?.bypass&&(0,f.jsx)(`span`,{className:`badge badge-red`,style:{fontSize:8,padding:`1px 5px`},children:`BYP`}),o?.nam_loaded&&(0,f.jsx)(`span`,{className:`badge badge-blue`,style:{fontSize:8,padding:`1px 5px`},children:`NAM`}),o?.ir_loaded&&(0,f.jsx)(`span`,{className:`badge badge-green`,style:{fontSize:8,padding:`1px 5px`},children:`IR`})]})]}),(0,f.jsxs)(`div`,{style:{flex:1,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[e===`rig`&&(0,f.jsx)(re,{state:o,connected:s,refresh:c}),e===`fx`&&(0,f.jsx)(ae,{state:o,connected:s}),e===`models`&&(0,f.jsx)(oe,{state:o,connected:s,refresh:c}),e===`irs`&&(0,f.jsx)(se,{state:o,connected:s,refresh:c}),e===`presets`&&(0,f.jsx)(ce,{state:o,connected:s,refresh:c}),e===`settings`&&(0,f.jsx)(D,{state:o,connected:s,refresh:c}),e===`record`&&(0,f.jsx)(O,{state:o})]}),(0,f.jsx)(`div`,{className:`tabbar`,children:ue.map(n=>(0,f.jsxs)(`div`,{className:`tab ${e===n.id?`active`:``}`,onClick:()=>t(n.id),children:[(0,f.jsx)(`span`,{style:{fontSize:14,display:`block`},children:n.icon}),n.label]},n.id))}),n&&(0,f.jsx)(le,{onClose:()=>r(!1),state:o,connected:s})]})]})}(0,u.createRoot)(document.getElementById(`root`)).render((0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(de,{})})); \ No newline at end of file diff --git a/src/web/ui-dist/assets/index-CV8EM6Xu.js b/src/web/ui-dist/assets/index-CV8EM6Xu.js new file mode 100644 index 0000000..d78b526 --- /dev/null +++ b/src/web/ui-dist/assets/index-CV8EM6Xu.js @@ -0,0 +1,100 @@ +var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function te(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ne(e,t){return te(e.type,t,e.props)}function T(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function re(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ie=/\/+/g;function ae(e,t){return typeof e==`object`&&e&&e.key!=null?re(``+e.key):t.toString(36)}function oe(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function se(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,se(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ae(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ie,`$&/`)+`/`),se(o,r,i,``,function(e){return e})):o!=null&&(T(o)&&(o=ne(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ie,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,T());else{var t=n(l);t!==null&&ae(x,t.startTime-e)}}var S=!1,C=-1,w=5,ee=-1;function te(){return g?!0:!(e.unstable_now()-eet&&te());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ae(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?T():S=!1}}}var T;if(typeof y==`function`)T=function(){y(ne)};else if(typeof MessageChannel<`u`){var re=new MessageChannel,ie=re.port2;re.port1.onmessage=ne,T=function(){ie.postMessage(null)}}else T=function(){_(ne,0)};function ae(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ae(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,T()))),r},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1O||(e.current=de[O],de[O]=null,O--)}function A(e,t){O++,de[O]=e.current,e.current=t}var pe=fe(null),j=fe(null),me=fe(null),he=fe(null);function ge(e,t){switch(A(me,t),A(j,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}k(pe),A(pe,e)}function _e(){k(pe),k(j),k(me)}function ve(e){e.memoizedState!==null&&A(he,e);var t=pe.current,n=Hd(t,e.type);t!==n&&(A(j,e),A(pe,n))}function ye(e){j.current===e&&(k(pe),k(j)),he.current===e&&(k(he),Qf._currentValue=ue)}var be,xe;function Se(e){if(be===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||``,xe=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Se(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return Se(e.type);case 16:return Se(`Lazy`);case 13:return e.child!==t&&t!==null?Se(`Suspense Fallback`):Se(`Suspense`);case 19:return Se(`SuspenseList`);case 0:case 15:return M(e.type,!1);case 11:return M(e.type.render,!1);case 1:return M(e.type,!0);case 31:return Se(`Activity`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,Oe=t.unstable_cancelCallback,ke=t.unstable_shouldYield,Ae=t.unstable_requestPaint,je=t.unstable_now,Me=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Pe=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,N=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,P=t.unstable_setDisableYieldValue,Re=null,ze=null;function Be(e){if(typeof Le==`function`&&P(e),ze&&typeof ze.setStrictMode==`function`)try{ze.setStrictMode(Re,e)}catch{}}var Ve=Math.clz32?Math.clz32:F,He=Math.log,Ue=Math.LN2;function F(e){return e>>>=0,e===0?32:31-(He(e)/Ue|0)|0}var We=256,Ge=262144,Ke=4194304;function qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Je(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=qe(n))):i=qe(o):i=qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=qe(n))):i=qe(o)):i=qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function I(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function L(){var e=Ke;return Ke<<=1,!(Ke&62914560)&&(Ke=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Lt(r)||(r=jr,`selectionStart`in r&&kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&wr(Nr,r)||(Nr=r,r=Ed(Mr,`onSelect`),0>=o,i-=o,Di=1<<32-Ve(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),z&&ki(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),z&&ki(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return z&&ki(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),z&&ki(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Oa(l)===r.type){n(e,r.sibling),c=i(r,a.props),Fa(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=mi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=pi(a.type,a.key,a.props,null,e.mode,c),Fa(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=_i(a,e.mode,c),c.return=e,e=c}return o(e);case T:return a=Oa(a),b(e,r,a,c)}if(le(a))return h(e,r,a,c);if(oe(a)){if(l=oe(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Pa(a),c);if(a.$$typeof===C)return b(e,r,na(e,a),c);Ia(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=hi(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function Ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function Ka(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var qa=!1;function Ja(){if(qa){var e=pa;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===fa&&(qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ba=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=E.T,s={};E.T=s,Fs(e,!1,t,n);try{var c=i(),l=E.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,ga(c,r),pu(e)):Ps(e,t,r,pu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{D.p=a,o!==null&&s.types!==null&&(o.types=s.types),E.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Es(e).queue;Cs(e,i,t,ue,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:ue},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},pu())}function Os(){return ta(Qf)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ua(n);var r=Wa(t,e,n);r!==null&&(hu(r,t,n),Ga(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=ri(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,pu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Cr(s,o))return ni(e,t,i,0),K===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(s(479))}else t=ri(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===B||t!==null&&t===B}function Ls(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var zs={readContext:ta,use:Po,useCallback:H,useContext:H,useEffect:H,useImperativeHandle:H,useLayoutEffect:H,useInsertionEffect:H,useMemo:H,useReducer:H,useRef:H,useState:H,useDebugValue:H,useDeferredValue:H,useTransition:H,useSyncExternalStore:H,useId:H,useHostTransitionStatus:H,useFormState:H,useActionState:H,useOptimistic:H,useMemoCache:H,useCacheRefresh:H};zs.useEffectEvent=H;var Bs={readContext:ta,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(_o){Be(!0);try{e()}finally{Be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(_o){Be(!0);try{n(t)}finally{Be(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,B,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,i=Ao();if(z){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),K===null)throw Error(s(349));J&127||Vo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,us(Uo.bind(null,r,a,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),n},useId:function(){var e=Ao(),t=K.identifierPrefix;if(z){var n=Oi,r=Di;n=(r&~(1<<32-Ve(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[st]=t,a[ct]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=me.current,Vi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Pi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ri(t,!0)}else e=Bd(e).createTextNode(r),e[st]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Vi(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[st]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(s(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Vi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[st]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),i=!1}else i=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),U(t),null);case 4:return _e(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return Yi(t.type),U(t),null;case 19:if(k(uo),r=t.memoizedState,r===null)return U(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Rc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=fo(e),a!==null){for(t.flags|=128,Rc(r,!1),e=a.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return A(uo,uo.current&1|2),z&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&je()>tu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}else{if(!i)if(e=fo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!z)return U(t),null}else 2*je()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=je(),e.sibling=null,n=uo.current,A(uo,i?n&1|2:n&1),z&&ki(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&k(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(sa),U(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Bc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(sa),_e(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(s(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(uo),null;case 4:return _e(),null;case 10:return Yi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&k(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(sa),null;case 25:return null;default:return null}}function Vc(e,t){switch(Mi(t),t.tag){case 3:Yi(sa),_e();break;case 26:case 27:case 5:ye(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:k(uo);break;case 10:Yi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&k(va);break;case 24:Yi(sa)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Za(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ct]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[st]=e,t[ct]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Or(e),kr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(a,r,n),a[st]=e,bt(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;cg&&(o=g,g=h,h=o);var _=Er(s,h),v=Er(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,E.T=null,n=lu,lu=null;var a=au,o=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(s(331));var c=G;if(G|=4,Fl(a.current),Dl(a,a.current,o,n),G=c,id(0,!1),ze&&typeof ze.onPostCommitFiberRoot==`function`)try{ze.onPostCommitFiberRoot(Re,a)}catch{}return!0}finally{D.p=i,E.T=r,Vu(e,t)}}function Wu(e,t,n){t=yi(n,t),t=$s(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(Ze(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=yi(n,e),n=ec(2),r=Wa(t,n,2),r!==null&&(tc(n,r,t,e),Ze(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>je()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=L()),e=ii(e,t),e!==null&&(Ze(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return De(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ve(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=Je(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||I(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=je(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=yt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);bt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=yt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),bt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=yt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),bt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=me.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=yt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=yt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=yt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+zt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),bt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+zt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,bt(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),bt(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,bt(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),bt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n(),u=c(),d=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=e(((e,t)=>{t.exports=d()}))(),p={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},m=`#40C8A0`,h=[{key:`level`,label:`Level`,min:0,max:100,def:80},{key:`maxTime`,label:`Max Time`,type:`select`,options:[{value:4,label:`4 sec`},{value:8,label:`8 sec`},{value:16,label:`16 sec`},{value:32,label:`32 sec`}],def:8},{key:`fade`,label:`Fade`,min:0,max:100,def:30},{key:`sync`,label:`Sync`,type:`select`,options:[{value:`off`,label:`Off`},{value:`1bar`,label:`1 Bar`},{value:`2bar`,label:`2 Bars`},{value:`4bar`,label:`4 Bars`}],def:`off`}];function g(){let[e,t]=(0,l.useState)({}),n=(0,l.useRef)({}),r=(0,l.useRef)(e);r.current=e;let i=(0,l.useCallback)(e=>r.current[e]||{status:`stopped`,elapsed:0,maxDuration:8,layers:0},[]),a=(0,l.useCallback)(e=>{n.current[e]&&(clearInterval(n.current[e]),delete n.current[e])},[]),o=(0,l.useCallback)((e,r)=>{a(e),n.current[e]=setInterval(()=>{t(t=>{let n=t[e];if(!n||n.status===`stopped`)return t;let i=+(n.elapsed+.1).toFixed(1);return i>=r?n.status===`recording`?{...t,[e]:{...n,status:`playing`,elapsed:0,layers:n.layers+1}}:{...t,[e]:{...n,elapsed:0}}:{...t,[e]:{...n,elapsed:i}}})},100)},[a]),s=(0,l.useCallback)((e,n)=>{let r=i(e);r.status!==`recording`&&(a(e),t(t=>({...t,[e]:{...r,status:`recording`,elapsed:0,maxDuration:n}})),o(e,n))},[i,a,o]),c=(0,l.useCallback)((e,n)=>{let r=i(e);if(r.layers===0){s(e,n);return}a(e),t(t=>({...t,[e]:{...r,status:`playing`}})),o(e,n)},[i,a,o,s]),u=(0,l.useCallback)((e,n)=>{let r=i(e);if(r.layers===0){s(e,n);return}a(e),t(t=>({...t,[e]:{...r,status:`overdubbing`}})),o(e,n)},[i,a,o,s]),d=(0,l.useCallback)(e=>{a(e);let n=i(e);t(t=>({...t,[e]:{...n,status:`stopped`,elapsed:0}}))},[a,i]),f=(0,l.useCallback)(e=>{a(e),t(t=>{let n={...t};return delete n[e],n})},[a]),p=(0,l.useCallback)(e=>{let n=i(e);if(n.layers<=0)return;let r=n.layers-1;r===0?(a(e),t(t=>({...t,[e]:{...n,layers:0,status:`stopped`,elapsed:0}}))):t(t=>({...t,[e]:{...n,layers:r}}))},[i,a]);return(0,l.useEffect)(()=>()=>{Object.values(n.current).forEach(clearInterval)},[]),{stores:e,getStore:i,record:s,play:c,overdub:u,stop:d,clearLoop:f,undoLast:p}}var _=e=>{let t=Math.floor(e/60),n=Math.floor(e%60);return`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}`};function v({block:e,selected:t,onSelect:n,onToggle:r,looperStore:i,onModelBrowser:a}){let o=i||{status:`stopped`,elapsed:0,maxDuration:8,layers:0},s=!e.bypassed,{status:c,elapsed:u,maxDuration:d,layers:h}=o,g=c===`recording`?p.red:c===`playing`?p.green:c===`overdubbing`?p.amber:p.textDim,v=c===`recording`?`REC`:c===`playing`?`PLAY`:c===`overdubbing`?`OVDB`:`STOP`,y=c===`recording`||c===`overdubbing`,b=(0,l.useRef)(null),x=(0,l.useCallback)(()=>{b.current=setTimeout(()=>{b.current=null,a?.(e.id)},500)},[e.id,a]),S=(0,l.useCallback)(()=>{b.current&&=(clearTimeout(b.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:x,onTouchEnd:S,onTouchMove:S,onMouseDown:S,onMouseUp:S,style:{minWidth:150,width:150,height:100,borderRadius:8,background:`linear-gradient(135deg, #142020, ${p.panel})`,border:`2px solid ${t?p.amber:m}60`,opacity:s?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${p.amber}44, inset 0 0 0 1px ${p.amber}22`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, ${m}, #80D0A0)`,boxShadow:s?`0 0 6px ${m}`:`none`}}),(0,f.jsx)(`div`,{style:{position:`absolute`,top:5,left:5,fontSize:9,color:p.textDim,letterSpacing:1.5,lineHeight:1,cursor:`grab`,opacity:.5},children:`⋮⋮`}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:s?p.green:p.textDim,boxShadow:s?`0 0 8px ${p.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${s?`${p.green}88`:p.border}`},title:s?`Active`:`Bypassed`}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`18px 8px 4px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[(0,f.jsxs)(`div`,{style:{fontSize:10,fontWeight:700,color:m,letterSpacing:`.06em`,textTransform:`uppercase`,display:`flex`,alignItems:`center`,gap:5},children:[(0,f.jsx)(`span`,{style:{fontSize:12},children:`◉`}),(0,f.jsx)(`span`,{children:`LOOPER`})]}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:17,fontWeight:800,color:g,marginTop:3,letterSpacing:`.06em`,textShadow:y?`0 0 8px ${g}66`:`none`},children:[_(u),(0,f.jsxs)(`span`,{style:{fontSize:11,color:p.textDim,fontWeight:500},children:[`/`,_(d)]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,marginTop:1},children:[(0,f.jsx)(`span`,{style:{fontSize:8,fontWeight:800,letterSpacing:`.1em`,color:g,textTransform:`uppercase`,background:`${g}18`,padding:`1px 5px`,borderRadius:3},children:v}),h>0&&(0,f.jsxs)(`span`,{style:{fontSize:8,color:p.textSec},children:[h,`L`]})]})]})]})}function y({store:e,onRecord:t,onPlay:n,onOverdub:r,onStop:i,onClear:a,onUndo:o}){let{status:s,layers:c}=e,l=e=>({width:44,height:44,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:16,cursor:`pointer`,border:`2px solid`,transition:`all .12s`,touchAction:`manipulation`,flexShrink:0,...e});return(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,justifyContent:`center`,alignItems:`center`,padding:`6px 0`},children:[(0,f.jsx)(`div`,{onClick:t,style:l({borderColor:s===`recording`?p.red:p.border,background:s===`recording`?`rgba(200,64,64,.2)`:p.surface,color:p.red,animation:s===`recording`?`looperPulse 0.8s ease-in-out infinite`:`none`}),title:`Record`,children:`●`}),(0,f.jsx)(`div`,{onClick:n,style:l({borderColor:s===`playing`?p.green:p.border,background:s===`playing`?`rgba(58,184,122,.2)`:p.surface,color:p.green}),title:`Play`,children:`▶`}),(0,f.jsx)(`div`,{onClick:r,style:l({borderColor:s===`overdubbing`?p.amber:p.border,background:s===`overdubbing`?`rgba(232,160,48,.2)`:p.surface,color:p.amber,opacity:c>0?1:.3}),title:`Overdub`,children:`⏺`}),(0,f.jsx)(`div`,{onClick:i,style:{...l({}),width:36,height:36,fontSize:13,borderColor:p.border,background:p.surface,color:p.textPrimary},title:`Stop`,children:`■`}),(0,f.jsx)(`div`,{onClick:a,style:{...l({}),width:32,height:32,fontSize:11,borderColor:p.border,background:p.surface,color:p.red,opacity:s!==`stopped`||c>0?1:.3},title:`Clear`,children:`✕`}),(0,f.jsx)(`div`,{onClick:o,style:{...l({}),width:32,height:32,fontSize:13,borderColor:p.border,background:p.surface,color:p.amber,opacity:c>0?1:.3},title:`Undo last layer`,children:`↩`})]})}function b({block:e,params:t,looperStore:n,onParamChange:r,onParamChangeEnd:i,looperActions:a}){let o=m;return(0,f.jsxs)(`div`,{className:`param-panel`,children:[(0,f.jsx)(`div`,{className:`param-panel-header`,children:(0,f.jsxs)(`span`,{className:`param-panel-title`,children:[(0,f.jsx)(`span`,{style:{color:o},children:`●`}),` Looper`]})}),a&&(0,f.jsx)(`div`,{style:{background:`${p.panel}`,borderRadius:8,marginBottom:6,border:`1px solid ${p.border}`},children:(0,f.jsx)(y,{store:n,...a})}),n&&(n.status!==`stopped`||n.layers>0)&&(0,f.jsxs)(`div`,{style:{display:`flex`,gap:10,padding:`4px 0 8px`,justifyContent:`center`,fontSize:10,color:p.textSec,borderBottom:`1px solid ${p.border}`,marginBottom:6},children:[(0,f.jsxs)(`span`,{children:[`Status: `,(0,f.jsx)(`strong`,{style:{color:n.status===`recording`?p.red:n.status===`playing`?p.green:n.status===`overdubbing`?p.amber:p.textDim},children:n.status.toUpperCase()})]}),(0,f.jsxs)(`span`,{children:[`Layers: `,(0,f.jsx)(`strong`,{children:n.layers})]}),(0,f.jsxs)(`span`,{children:[`Time: `,(0,f.jsx)(`strong`,{children:`${_(n.elapsed)} / ${_(n.maxDuration)}`})]})]}),h.filter(e=>!e.conditional||e.conditional(t)).map(e=>e.type===`select`?(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsx)(`div`,{className:`param-header`,children:(0,f.jsx)(`span`,{className:`param-label`,style:{color:o},children:e.label})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,flexWrap:`wrap`,background:`#0A0A10`,borderRadius:6,padding:4},children:(e.options||[]).map(n=>(0,f.jsx)(`button`,{onClick:()=>{r?.(e.key,n.value),i?.(e.key,n.value)},style:{flex:1,padding:`5px 8px`,borderRadius:4,border:`none`,fontSize:10,fontWeight:600,cursor:`pointer`,background:(t[e.key]==null?e.def:t[e.key])===n.value?o:`transparent`,color:(t[e.key]==null?e.def:t[e.key])===n.value?`#000`:p.textSec,transition:`all .1s`,letterSpacing:`.03em`,whiteSpace:`nowrap`},children:n.label},n.value))})]},e.key):(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsxs)(`div`,{className:`param-header`,children:[(0,f.jsx)(`span`,{className:`param-label`,style:{color:o},children:e.label}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4,alignItems:`center`},children:[(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:n=>{n.preventDefault();let a=Math.max(e.min,((t[e.key]==null?e.def:t[e.key])||0)-5);r?.(e.key,a),i?.(e.key,a)},onTouchStart:n=>{n.preventDefault();let a=Math.max(e.min,((t[e.key]==null?e.def:t[e.key])||0)-5);r?.(e.key,a),i?.(e.key,a)},children:`−`}),(0,f.jsx)(`span`,{className:`param-val`,style:{color:o},children:t[e.key]==null?e.def:t[e.key]}),(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:n=>{n.preventDefault();let a=Math.min(e.max,((t[e.key]==null?e.def:t[e.key])||0)+5);r?.(e.key,a),i?.(e.key,a)},onTouchStart:n=>{n.preventDefault();let a=Math.min(e.max,((t[e.key]==null?e.def:t[e.key])||0)+5);r?.(e.key,a),i?.(e.key,a)},children:`+`})]})]}),(0,f.jsx)(`div`,{className:`param-track-wrap`,onMouseDown:t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),a=Math.max(0,Math.min(1,(t.clientX-n.left)/n.width)),o=Math.round(e.min+a*(e.max-e.min));r?.(e.key,o),i?.(e.key,o)},onTouchStart:t=>{let n=t.currentTarget.getBoundingClientRect(),a=Math.max(0,Math.min(1,(t.touches[0].clientX-n.left)/n.width)),o=Math.round(e.min+a*(e.max-e.min));r?.(e.key,o),i?.(e.key,o)},children:(0,f.jsxs)(`div`,{className:`param-track`,children:[(0,f.jsx)(`div`,{className:`param-fill`,style:{width:`${((t[e.key]==null?e.def:t[e.key])-e.min)/(e.max-e.min)*100}%`,background:o}}),(0,f.jsx)(`div`,{className:`param-thumb`,style:{left:`${((t[e.key]==null?e.def:t[e.key])-e.min)/(e.max-e.min)*100}%`,background:o}})]})})]},e.key))]})}var x=` +@keyframes looperPulse { + 0%, 100% { opacity: 1; transform: scale(1); } + 50% { opacity: 0.5; transform: scale(0.95); } +} +`,S={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},C={y:{label:`Y`,desc:`Split evenly`,icon:`⬡`},ab:{label:`A/B`,desc:`Route all to A or B`,icon:`⇄`},cascade:{label:`Cascade`,desc:`A feeds into B`,icon:`⇢`},a_to_b:{label:`A→B`,desc:`Serial path extension`,icon:`↷`}},w={od:S.amber,overdrive:S.amber,drive:S.amber,dist:S.red,distortion:S.red,fuzz:`#D060E0`,mod:S.blue,chorus:S.blue,flange:S.blue,phaser:S.blue,tremolo:S.blue,vibrato:S.blue,rotary:S.blue,delay:`#60A0E0`,echo:`#60A0E0`,reverb:`#60C0D0`,pitch:`#A060E0`,comp:S.green,compressor:S.green,gate:S.green,filter:`#D0A060`,wah:`#D0A060`,eq:`#80A0B0`,ir:S.green,cab:S.green,nam:`#E0A040`,volume:S.textSec,boost:S.amber,split:`#B080C0`,merge:`#80B0C0`},ee={od:`fx_distortion`,overdrive:`fx_distortion`,drive:`fx_distortion`,dist:`fx_distortion`,distortion:`fx_distortion`,gain:`fx_distortion`,fuzz:`fx_distortion`,delay:`fx_delay`,echo:`fx_delay`,reverb:`fx_reverb`,chorus:`fx_chorus`,flange:`fx_flanger`,flanger:`fx_flanger`,phaser:`fx_phaser`,tremolo:`fx_modulator`,vibrato:`fx_modulator`,rotary:`fx_modulator`,modulator:`fx_modulator`,pitch:`fx_pitch`,harmonizer:`fx_pitch`,shifter:`fx_pitch`,comp:`fx_compressor`,compressor:`fx_compressor`,limiter:`fx_limiter`,gate:`fx_gate`,noise_gate:`fx_gate`,filter:`fx_filter`,wah:`fx_filter`,eq:`fx_eq`,graphic_eq:`fx_eq`,parametric_eq:`fx_parametric_eq`,multiband_eq:`fx_multiband_eq`,ir:`fx_spatial`,cab:`fx_spatial`,cabinet:`fx_spatial`,nam:`fx_simulator`,capture:`fx_simulator`,amp:`fx_amplifier`,amplifier:`fx_amplifier`,volume:`fx_constant`,level:`fx_constant`,boost:`fx_constant`,split:`fx_split_a`,merge:`fx_mixer`,tuner:`fx_analyzer`,mixer:`fx_mixer`,utility:`fx_utility`,plugin:`fx_plugin`,instrument:`fx_instrument`,reamp:`fx_converter`,looper:`fx_oscillator`},te=`/ui/img/`;function ne({type:e,size:t=14,style:n={}}){let r=(e||``).toLowerCase().trim(),i=`fx_plugin`,a=!1;for(let[e,t]of Object.entries(ee))if(r===e||r.startsWith(e)||r.includes(e)){i=t,a=!0;break}if(!a&&r){let e=r.replace(/[^a-z0-9]+/g,`_`).replace(/^_|_$/g,``);ee[e]&&(i=ee[e])}return(0,f.jsx)(`img`,{src:`${te}${i}.svg`,alt:e||`fx`,style:{width:t,height:t,flexShrink:0,filter:`invert(0.95) brightness(2)`,objectFit:`contain`,...n},onError:e=>{e.target.style.display=`none`}})}function T(e){let t=(e||``).toLowerCase().trim();for(let[e,n]of Object.entries(w))if(t===e||t.startsWith(e)||t.includes(e))return n;return S.amber}function re({color:e=S.border,narrow:t=!1}){let n=t?14:18;return(0,f.jsxs)(`svg`,{width:n,height:`24`,viewBox:`0 0 ${n} 24`,fill:`none`,style:{flexShrink:0},children:[(0,f.jsx)(`line`,{x1:`0`,y1:`12`,x2:n-6,y2:`12`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`polyline`,{points:`${n-10},7 ${n-4},12 ${n-10},17`,fill:`none`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function ie({label:e,isLeft:t}){return(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0,flexDirection:t?`row`:`row-reverse`},children:[!t&&(0,f.jsx)(re,{}),(0,f.jsx)(`div`,{style:{padding:`7px 12px`,borderRadius:6,fontSize:10,fontWeight:700,letterSpacing:`.12em`,background:S.blueDim,color:S.blue,border:`1px solid ${S.blue}60`,textTransform:`uppercase`,whiteSpace:`nowrap`},children:e}),t&&(0,f.jsx)(re,{})]})}function ae({block:e,selected:t,onSelect:n,onToggle:r,onModelBrowser:i}){let a=e.params||{},o=a.splitType||`y`,s=C[o]||C.y,c=!e.bypassed,u=T(`split`),d=(0,l.useRef)(null),p=(0,l.useCallback)(()=>{d.current=setTimeout(()=>{d.current=null,i?.(e.id)},500)},[e.id,i]),m=(0,l.useCallback)(()=>{d.current&&=(clearTimeout(d.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:p,onTouchEnd:m,onTouchMove:m,onMouseDown:m,onMouseUp:m,style:{minWidth:130,width:130,height:76,borderRadius:8,background:`linear-gradient(135deg, ${S.panel}, #1A1520)`,border:`2px solid ${t?S.amber:u}60`,opacity:c?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${S.amber}44, inset 0 0 0 1px ${S.amber}22`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, #B080C0, #80B0C0)`}}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:c?S.green:S.textDim,boxShadow:c?`0 0 8px ${S.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${c?`${S.green}88`:S.border}`}}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`14px 10px 6px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[(0,f.jsxs)(`div`,{style:{fontSize:12,fontWeight:700,color:u,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3,display:`flex`,alignItems:`center`,gap:6},children:[(0,f.jsx)(ne,{type:`split`,size:16}),(0,f.jsxs)(`span`,{children:[`SPLIT `,s.label]})]}),(0,f.jsx)(`div`,{style:{fontSize:9,color:S.textSec,marginTop:2},children:s.desc})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,borderTop:`1px solid ${S.border}44`},children:[(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#B080C0`,letterSpacing:`.1em`,borderRight:`1px solid ${S.border}44`},children:[`A `,o===`ab`&&(a.activePath===`B`?`—`:`✓`)]}),(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#80B0C0`,letterSpacing:`.1em`},children:[`B `,o===`ab`&&a.activePath===`B`?`✓`:`—`]})]})]})}function oe({block:e,selected:t,onSelect:n,onToggle:r,onModelBrowser:i}){let a=e.params||{},o=!e.bypassed,s=(0,l.useRef)(null),c=(0,l.useCallback)(()=>{s.current=setTimeout(()=>{s.current=null,i?.(e.id)},500)},[e.id,i]),u=(0,l.useCallback)(()=>{s.current&&=(clearTimeout(s.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:c,onTouchEnd:u,onTouchMove:u,onMouseDown:u,onMouseUp:u,style:{minWidth:130,width:130,height:76,borderRadius:8,background:`linear-gradient(135deg, #15201A, ${S.panel})`,border:`2px solid ${t?S.amber:`#80B0C0`}60`,opacity:o?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${S.amber}44, inset 0 0 0 1px ${S.amber}22`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, #80B0C0, #60A080)`}}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:o?S.green:S.textDim,boxShadow:o?`0 0 8px ${S.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${o?`${S.green}88`:S.border}`}}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`14px 10px 6px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[(0,f.jsxs)(`div`,{style:{fontSize:12,fontWeight:700,color:`#80B0C0`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3,display:`flex`,alignItems:`center`,gap:6},children:[(0,f.jsx)(ne,{type:`merge`,size:16}),(0,f.jsx)(`span`,{children:`MERGE`})]}),(0,f.jsxs)(`div`,{style:{fontSize:9,color:S.textSec,marginTop:2},children:[`Blend `,a.blend??100,`%`]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,borderTop:`1px solid ${S.border}44`},children:[(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#B080C0`,letterSpacing:`.1em`,borderRight:`1px solid ${S.border}44`},children:[`Lv `,a.levelA??100]}),(0,f.jsxs)(`div`,{style:{flex:1,fontSize:8,fontWeight:700,textAlign:`center`,padding:`1px 0`,color:`#80B0C0`,letterSpacing:`.1em`},children:[`Lv `,a.levelB??100]})]})]})}function se({block:e,selected:t,onSelect:n,onToggle:r,pathLabel:i,onModelBrowser:a}){let o=T(e.type),s=!e.bypassed,c=(0,l.useRef)(null),u=(0,l.useCallback)(()=>{c.current=setTimeout(()=>{c.current=null,a?.(e.id)},500)},[e.id,a]),d=(0,l.useCallback)(()=>{c.current&&=(clearTimeout(c.current),null)},[]);return(0,f.jsxs)(`div`,{draggable:!0,onClick:()=>n(e.id),onTouchStart:u,onTouchEnd:d,onTouchMove:d,onMouseDown:d,onMouseUp:d,style:{minWidth:120,width:120,height:76,borderRadius:8,background:i===`B`?`#1A1820`:S.panel,border:`2px solid ${t?S.amber:S.border}`,opacity:s?1:.35,cursor:`pointer`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`,transition:`all .15s ease`,flexShrink:0,boxShadow:t?`0 0 16px ${S.amber}44, inset 0 0 0 1px ${S.amber}22`:i===`B`?`inset 0 0 0 1px rgba(128,176,192,0.15)`:`none`,transform:t?`scale(1.05)`:`scale(1)`},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:o,boxShadow:s?`0 0 6px ${o}`:`none`}}),(0,f.jsx)(`div`,{style:{position:`absolute`,top:5,left:5,fontSize:9,color:S.textDim,letterSpacing:1.5,lineHeight:1,cursor:`grab`,opacity:.5},children:`⋮⋮`}),(0,f.jsx)(`div`,{onClick:t=>{t.stopPropagation(),r(e.id)},style:{position:`absolute`,top:6,right:6,width:10,height:10,borderRadius:`50%`,background:s?S.green:S.textDim,boxShadow:s?`0 0 8px ${S.green}`:`none`,transition:`all .15s`,cursor:`pointer`,zIndex:2,border:`1px solid ${s?`${S.green}88`:S.border}`},title:s?`Active — tap to bypass`:`Bypassed — tap to enable`}),(0,f.jsxs)(`div`,{style:{flex:1,padding:`14px 10px 6px`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:[i&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:5,right:20,fontSize:7,fontWeight:700,color:i===`A`?`#B080C0`:`#80B0C0`,letterSpacing:`.08em`,background:`${S.bg}88`,padding:`0 4px`,borderRadius:2,lineHeight:1.4},children:i===`A`?`A`:`B`}),(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:600,color:S.textPrimary,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3,paddingRight:16},children:e.name||e.type||`FX`}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5,marginTop:3},children:[(0,f.jsx)(ne,{type:e.type,size:14}),(0,f.jsx)(`span`,{style:{fontSize:9,fontWeight:700,color:o,letterSpacing:`.08em`,textTransform:`uppercase`,background:`${o}18`,padding:`1px 5px`,borderRadius:3},children:(e.type||`fx`).replace(/_/g,` `).toUpperCase()})]})]})]})}function ce(e){let t=e.findIndex(e=>e.type===`split`),n=e.findIndex(e=>e.type===`merge`);if(t===-1||n===-1)return{type:`serial`,blocks:e};let r=e.slice(0,t),i=e[t],a=e.slice(t+1,n),o=e[n],s=e.slice(n+1),c=a.filter(e=>!e.path||e.path===`A`),l=a.filter(e=>e.path===`B`);return{type:`parallel`,beforeSplit:r,splitBlock:i,pathABlocks:c,pathBBlocks:l,mergeBlock:o,afterMerge:s,parallelBlockCount:Math.max(c.length,l.length)}}function le({blocks:e,selectedBlockId:t,onSelectBlock:n,onToggleBlock:r,onReorder:i,onAddBlock:a,onRemoveBlock:o,onModelBrowser:s,looperStores:c={}}){let u=(0,l.useRef)(null),d=(0,l.useRef)(null),[p,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(0),_=(0,l.useMemo)(()=>ce(e),[e]),y=(0,l.useCallback)((e,t)=>{m(t),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(t))},[]),b=(0,l.useCallback)(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`},[]),x=(0,l.useCallback)((e,t)=>{e.preventDefault(),p!==null&&p!==t&&i&&i(p,t),m(null)},[p,i]),C=(0,l.useCallback)(()=>{m(null)},[]),w=(0,l.useCallback)(()=>{if(!u.current||!t)return;let n=(_.type===`serial`?e:[..._.beforeSplit,_.splitBlock,..._.pathABlocks,_.mergeBlock,..._.afterMerge].filter(Boolean)).findIndex(e=>e.id===t);if(n<0)return;let r=u.current.children[n+(_.type,1)];r&&r.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})},[t,_,e]),ee=(0,l.useRef)(t);t!==ee.current&&(ee.current=t,setTimeout(w,50));let te=(0,l.useCallback)(e=>{g(e.target.scrollLeft),d.current&&(d.current.scrollLeft=e.target.scrollLeft)},[]);return e.find(e=>e.id===t),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[_.type===`parallel`?(()=>{let{beforeSplit:e,splitBlock:i,pathABlocks:a,pathBBlocks:o,mergeBlock:l,afterMerge:p,parallelBlockCount:m}=_,h=[],g=Math.max(a.length,o.length);for(let e=0;e(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(e.type||``).toLowerCase()===`looper`?(0,f.jsx)(v,{block:e,selected:e.id===t,onSelect:n,onToggle:r,looperStore:c[e.id],onModelBrowser:s}):(0,f.jsx)(se,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]},e.id)),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(ae,{block:i,selected:i.id===t,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]}),a.map((e,i)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(e.type||``).toLowerCase()===`looper`?(0,f.jsx)(v,{block:e,selected:e.id===t,onSelect:n,onToggle:r,looperStore:c[e.id],onModelBrowser:s}):(0,f.jsx)(se,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,pathLabel:`A`,onModelBrowser:s}),(0,f.jsx)(re,{})]},e.id)),a.length>0&&(0,f.jsx)(re,{}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(oe,{block:l,selected:l.id===t,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]}),p.map((e,i)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(e.type||``).toLowerCase()===`looper`?(0,f.jsx)(v,{block:e,selected:e.id===t,onSelect:n,onToggle:r,looperStore:c[e.id],onModelBrowser:s}):(0,f.jsx)(se,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]},e.id)),(0,f.jsx)(ie,{label:`OUT`,isLeft:!1})]}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`stretch`,padding:`0 12px`,position:`relative`},children:(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,minHeight:24},children:(0,f.jsx)(`div`,{style:{width:`calc(100%)`,position:`relative`}})})}),(0,f.jsxs)(`div`,{ref:d,style:{display:`flex`,alignItems:`center`,gap:4,padding:`2px 12px 8px`,overflowX:`auto`,overflowY:`hidden`,minHeight:76,scrollBehavior:`smooth`,WebkitOverflowScrolling:`touch`,borderTop:`1px solid ${S.border}33`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,paddingRight:4,opacity:.3,pointerEvents:`none`},children:e.length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:e.map((e,t)=>(0,f.jsx)(`div`,{style:{minWidth:124,height:20,fontSize:8,color:S.textDim,display:`flex`,alignItems:`center`,gap:4},children:(0,f.jsx)(`span`,{children:`──`})},e.id))})}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,opacity:.6},children:(0,f.jsxs)(`svg`,{width:`22`,height:`24`,viewBox:`0 0 22 24`,fill:`none`,style:{flexShrink:0},children:[(0,f.jsx)(`line`,{x1:`8`,y1:`0`,x2:`8`,y2:`18`,stroke:S.blue,strokeWidth:`1.5`,strokeDasharray:`3,2`}),(0,f.jsx)(`line`,{x1:`2`,y1:`18`,x2:`18`,y2:`18`,stroke:S.blue,strokeWidth:`1.5`}),(0,f.jsx)(`polyline`,{points:`14,14 18,18 14,22`,fill:`none`,stroke:S.blue,strokeWidth:`1.5`})]})}),o.length===0&&(0,f.jsxs)(`div`,{style:{flexShrink:0,padding:`16px 16px`,color:S.textDim,fontSize:10,border:`1px dashed ${S.border}44`,borderRadius:6,display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(`span`,{style:{color:`#80B0C0`,fontSize:8,fontWeight:700,letterSpacing:`.1em`},children:`PATH B`}),(0,f.jsx)(`span`,{children:`Add blocks to Path B`})]}),o.map((i,a)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(0,f.jsx)(se,{block:i,selected:i.id===t,index:a+e.length+1,onSelect:n,onToggle:r,pathLabel:`B`}),(0,f.jsx)(re,{narrow:!0})]},i.id)),o.length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0,opacity:.6},children:(0,f.jsxs)(`svg`,{width:`22`,height:`24`,viewBox:`0 0 22 24`,fill:`none`,style:{flexShrink:0},children:[(0,f.jsx)(`line`,{x1:`14`,y1:`24`,x2:`14`,y2:`6`,stroke:S.blue,strokeWidth:`1.5`,strokeDasharray:`3,2`}),(0,f.jsx)(`line`,{x1:`4`,y1:`6`,x2:`20`,y2:`6`,stroke:S.blue,strokeWidth:`1.5`}),(0,f.jsx)(`polyline`,{points:`8,10 4,6 8,2`,fill:`none`,stroke:S.blue,strokeWidth:`1.5`})]})}),(0,f.jsx)(`div`,{style:{flex:1,minWidth:20}}),o.length>0&&(0,f.jsx)(`div`,{style:{flexShrink:0,fontSize:7,fontWeight:700,color:`#80B0C0`,letterSpacing:`.12em`,textTransform:`uppercase`,padding:`0 8px`,opacity:.5},children:`Path B`})]}),(0,f.jsxs)(`div`,{style:{position:`absolute`,left:0,top:0,bottom:0,width:20,display:`flex`,flexDirection:`column`,pointerEvents:`none`,opacity:.4},children:[(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:8,fontWeight:700,color:`#B080C0`,writingMode:`vertical-rl`,letterSpacing:`.2em`},children:`A`}),(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:8,fontWeight:700,color:`#80B0C0`,writingMode:`vertical-rl`,letterSpacing:`.2em`},children:`B`})]})]})})():(0,f.jsxs)(`div`,{ref:u,onScroll:te,style:{display:`flex`,alignItems:`center`,gap:4,padding:`10px 12px`,overflowX:`auto`,overflowY:`hidden`,minHeight:96,background:S.bg,borderBottom:`1px solid ${S.border}`,scrollBehavior:`smooth`,WebkitOverflowScrolling:`touch`},children:[(0,f.jsx)(ie,{label:`IN`,isLeft:!0}),e.map((e,i)=>(0,f.jsxs)(`div`,{draggable:!0,onDragStart:e=>y(e,i),onDragOver:b,onDrop:e=>x(e,i),onDragEnd:C,style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[(e.type||``).toLowerCase()===`looper`?(0,f.jsx)(v,{block:e,selected:e.id===t,onSelect:n,onToggle:r,looperStore:c[e.id],onModelBrowser:s}):(0,f.jsx)(se,{block:e,selected:e.id===t,index:i,onSelect:n,onToggle:r,onModelBrowser:s}),(0,f.jsx)(re,{})]},e.id)),e.length===0&&(0,f.jsx)(`div`,{style:{flexShrink:0,padding:`22px 20px`,color:S.textDim,fontSize:12,textAlign:`center`,border:`1px dashed ${S.border}`,borderRadius:8,minWidth:140},children:`No blocks in chain`}),(0,f.jsx)(ie,{label:`OUT`,isLeft:!1})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,padding:`8px 12px`,borderBottom:`1px solid ${S.border}`,background:S.panel},children:[(0,f.jsx)(`button`,{onClick:a,style:{flex:1,padding:`10px`,borderRadius:7,background:S.surface,border:`1px dashed ${S.border}`,color:S.textSec,fontSize:12,fontWeight:600,cursor:`pointer`,letterSpacing:`.04em`,transition:`all .12s`},children:`+ Add Block`}),t&&(0,f.jsx)(`button`,{onClick:()=>o(t),style:{padding:`10px 14px`,borderRadius:7,background:`rgba(200,64,64,.15)`,border:`1px solid rgba(200,64,64,.3)`,color:S.red,fontSize:12,fontWeight:600,cursor:`pointer`,transition:`all .12s`},children:`✕ Remove`})]})]})}var E={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`};E.amber,E.amber,E.red,E.blue,E.blue,E.blue,E.blue,E.green,E.green,E.green,E.green;function D(e){return{gate:`GATE`,overdrive:`OD`,distortion:`DST`,fuzz:`FUZZ`,chorus:`CHO`,flanger:`FLN`,phaser:`PHA`,tremolo:`TRE`,delay:`DLY`,echo:`ECH`,reverb:`REV`,compressor:`CMP`,eq:`EQ`,cabinet:`CAB`,ir:`IR`,nam:`NAM`}[(e||``).toLowerCase()]||(e||`FX`).toUpperCase().slice(0,4)}function ue({id:e,label:t,mainLabel:n,type:r,sub:i,active:a,enabled:o,onClick:s,onDoubleClick:c,isBank:u,bankDir:d}){let p=(0,l.useRef)(null);(0,l.useEffect)(()=>{let t=p.current;if(!t||!c)return;let n=0,r=()=>{let t=Date.now();t-n<300?(c(e),n=0):n=t};return t.addEventListener(`click`,r),()=>t.removeEventListener(`click`,r)},[e,c]);let m=r===`bypass`,h=r===`bank`,g=a||m&&!o;return(0,f.jsxs)(`div`,{ref:p,onClick:()=>s?.(e),style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:2,padding:`6px 3px 8px`,borderRadius:8,border:`1px solid ${g?E.amber:h?E.blueDim:E.border}`,background:g&&!m?`linear-gradient(180deg, ${E.amber}15 0%, ${E.panel} 100%)`:m&&!o?`linear-gradient(180deg, ${E.red}15 0%, ${E.panel} 100%)`:E.surface,cursor:`pointer`,minHeight:58,position:`relative`,transition:`all .1s`,WebkitTapHighlightColor:`transparent`,boxShadow:g&&!m?`0 0 8px ${E.amber}33, inset 0 0 0 1px ${E.amber}22`:m&&!o?`0 0 8px ${E.red}33`:`none`},children:[(0,f.jsx)(`div`,{style:{width:`100%`,background:`#0A0A10`,border:`1px solid ${g?E.amber+`66`:E.border}`,borderRadius:3,padding:`2px 2px`,textAlign:`center`,minHeight:18,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:g?`inset 0 0 4px ${E.amber}22`:`none`},children:(0,f.jsx)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:7,fontWeight:700,letterSpacing:`.02em`,color:g?E.amber:m&&!o?E.red:E.textPrimary,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,lineHeight:1.1},children:t})}),(0,f.jsx)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:h?10:9,fontWeight:700,color:o===!1?E.textDim:E.textPrimary,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,lineHeight:1.2,marginTop:1},children:n||t||r||e||`FX`}),i&&(0,f.jsx)(`div`,{style:{fontSize:7,color:E.textDim,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,lineHeight:1},children:i}),!h&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:3,right:3,width:4,height:4,borderRadius:`50%`,background:o===!1?E.textDim:E.green,boxShadow:o===!1?`none`:`0 0 5px ${E.green}`,transition:`all .15s`}}),h&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:3,right:3,fontSize:6,padding:`1px 3px`,borderRadius:2,background:`${E.blueDim}88`,color:E.blue,fontWeight:700,lineHeight:1},children:d===`up`?`▲`:`▼`})]})}function de({mode:e=`stomp`,blocks:t=[],selectedBlockId:n,currentBank:r=`A`,presets:i=[],currentPreset:a,snapshots:o=[],currentSnapshot:s,onSelectBlock:c,onToggleBlock:l,onBankUp:u,onBankDown:d,onGlobalBypass:p,globalBypass:m,onTunerToggle:h,tunerEnabled:g,onPresetClick:_,onSnapshotClick:v,looperActive:y,looperTransport:b}){let x=[];if(e===`stomp`||e===`stomp-b`)if(y&&b)x=[{id:`looper_record`,type:`looper`,label:`REC`,mainLabel:`Record`,enabled:!0,looperAction:`record`},{id:`looper_play`,type:`looper`,label:`PLAY`,mainLabel:`Play`,enabled:!0,looperAction:`play`},{id:`looper_stop`,type:`looper`,label:`STOP`,mainLabel:`Stop`,enabled:!0,looperAction:`stop`}],t.filter(e=>e.id!==n).slice(0,3).forEach(e=>{x.push({id:e.id,type:`block`,label:D(e.type),mainLabel:e.name||e.type||`FX`,sub:e.bypassed?`BYPASSED`:``,enabled:!e.bypassed})}),x=x.slice(0,5),x.push({id:`bypass`,type:`bypass`,label:m?`MUTED`:`BYPASS`,mainLabel:`GLOBAL`,sub:m?``:`tap to mute`,enabled:!m});else{let e=t.length>5?6:Math.max(4,t.length),n=t.slice(0,e).map(e=>({id:e.id,type:`block`,label:D(e.type),mainLabel:e.name||e.type||`FX`,sub:e.bypassed?`BYPASSED`:``,enabled:!e.bypassed}));for(;n.length<5;)n.push({id:`empty_`+n.length,type:`empty`,label:`—`,mainLabel:`Empty`,enabled:!1});x=[...n.slice(0,5),{id:`bypass`,type:`bypass`,label:m?`MUTED`:`BYPASS`,mainLabel:`GLOBAL`,sub:m?``:`tap to mute`,enabled:!m}]}else if(e===`preset`)x=[{id:`bank_up`,type:`bank`,label:`BANK ▲`,mainLabel:`${r} · ${a}`,bankDir:`up`,enabled:!0},...i.slice(0,4).map((e,t)=>({id:`preset_`+t,type:`preset`,label:`0${e.num||t+1}`,mainLabel:e.name||`P${t+1}`,sub:e.num===a?`ACTIVE`:``,enabled:!0})),{id:`bank_down`,type:`bank`,label:`BANK ▼`,mainLabel:`${r} · ${a}`,bankDir:`down`,enabled:!0}];else if(e===`snapshot`)for(x=[...o.slice(0,6).map((e,t)=>({id:`snap_`+(e.num||t),type:`snapshot`,label:`SNAP ${e.num||t+1}`,mainLabel:e.name||`Snapshot ${e.num||t+1}`,sub:(e.num||t+1)===s?`ACTIVE`:``,enabled:!0}))];x.length<6;)x.push({id:`snap_empty_`+x.length,type:`empty`,label:`—`,mainLabel:`Empty`,enabled:!1});return(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,padding:`6px 8px 10px`,background:E.bg,borderTop:`1px solid ${E.border}`,flexShrink:0},children:x.map(t=>(0,f.jsx)(ue,{id:t.id,label:t.label,mainLabel:t.mainLabel,type:t.type,sub:t.sub,active:t.id===n||t.type===`preset`&&t.sub===`ACTIVE`||t.type===`snapshot`&&t.sub===`ACTIVE`,enabled:t.enabled,isBank:t.type===`bank`,bankDir:t.bankDir,onClick:t=>{t===`bank_up`?u?.():t===`bank_down`?d?.():t===`bypass`?p?.():t?.startsWith(`preset_`)?_?.(t.replace(`preset_`,``)):t?.startsWith(`snap_`)?v?.(t.replace(`snap_`,``)):t?.startsWith(`looper_`)&&b?b[t.replace(`looper_`,``)]?.():(e===`stomp`||e===`stomp-b`)&&c?.(t)},onDoubleClick:t=>{t!==`bank_up`&&t!==`bank_down`&&t!==`bypass`&&!t?.startsWith(`looper_`)&&(e===`stomp`||e===`stomp-b`)&&l?.(t)}},t.id))})}var O={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},fe=[{num:6,name:`E`,freq:82.41,color:`#C84040`},{num:5,name:`A`,freq:110,color:`#D07030`},{num:4,name:`D`,freq:146.83,color:`#E8A030`},{num:3,name:`G`,freq:196,color:`#60A0E0`},{num:2,name:`B`,freq:246.94,color:`#3A7BA8`},{num:1,name:`e`,freq:329.63,color:`#50C080`}],k=[{note:`E2`,freq:82.41},{note:`F2`,freq:87.31},{note:`G2`,freq:98},{note:`A2`,freq:110},{note:`B2`,freq:123.47},{note:`C3`,freq:130.81},{note:`D3`,freq:146.83},{note:`E3`,freq:164.81},{note:`F3`,freq:174.61},{note:`G3`,freq:196},{note:`A3`,freq:220},{note:`B3`,freq:246.94},{note:`C4`,freq:261.63},{note:`D4`,freq:293.66},{note:`E4`,freq:329.63}];function A(){let e=Date.now()/1e3,t=k[Math.floor(e*.3%k.length)],n=Math.sin(e*2.5)*15,r=.6+Math.sin(e*.7)*.25,i=-1;for(let e=0;e({note:`--`,cents:0,string:-1,confidence:0,frequency:0}));(0,l.useEffect)(()=>{t&&e&&i({note:e.tuner_note||`--`,cents:e.tuner_cents??0,string:e.tuner_string??-1,confidence:e.tuner_confidence??0,frequency:e.tuner_frequency??0})},[t,e]),(0,l.useEffect)(()=>{if(t&&e?.tuner_enabled)return;let n=setInterval(()=>{i(A())},200);return()=>clearInterval(n)},[t,e]),(0,l.useEffect)(()=>{if(!t||!e?.tuner_enabled)return;let n=!1,r=async()=>{try{let e=await fetch(`/api/tuner/pitch`);if(!n&&e.ok){let t=await e.json();i({note:t.note||`--`,cents:t.cents??0,string:t.string??-1,confidence:t.confidence??0,frequency:t.frequency??0})}}catch{}};r();let a=setInterval(r,80);return()=>{n=!0,clearInterval(a)}},[t,e?.tuner_enabled]);let a=r.cents,o=r.confidence,s=(Math.max(-50,Math.min(50,a))+50)/100,c=Math.abs(a)<=3,u=Math.abs(a)<=10,d=r.string,p=[];for(let e=-50;e<=50;e+=5)p.push(e);let m=c?O.green:u?O.amber:O.textPrimary;return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,background:O.bg,overflow:`hidden`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`6px 12px`,background:O.panel,borderBottom:`1px solid ${O.border}`,flexShrink:0},children:[(0,f.jsx)(`div`,{style:{fontSize:10,fontWeight:700,letterSpacing:`.12em`,textTransform:`uppercase`,color:c?O.green:O.amber},children:c?`● In Tune`:`◌ Tuner`}),(0,f.jsx)(`button`,{onClick:n,style:{padding:`6px 14px`,borderRadius:6,background:O.surface,border:`1px solid ${O.border}`,color:O.textPrimary,fontSize:11,fontWeight:600,cursor:`pointer`},children:`✕ Exit Tuner`})]}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:6,padding:`8px 16px`},children:[(0,f.jsx)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:72,fontWeight:700,color:m,textShadow:c?`0 0 30px ${O.green}44`:u?`0 0 20px ${O.amber}33`:`none`,lineHeight:1,letterSpacing:`.02em`,transition:`color .08s, text-shadow .08s`,minHeight:76,display:`flex`,alignItems:`center`,justifyContent:`center`},children:r.note}),(0,f.jsxs)(`div`,{style:{width:`100%`,maxWidth:320,height:60,position:`relative`,marginTop:4},children:[(0,f.jsx)(`div`,{style:{position:`absolute`,bottom:16,left:0,right:0,height:16,display:`flex`,alignItems:`flex-end`,justifyContent:`space-between`,padding:`0 10px`},children:p.map((e,t)=>{let n=e===0,r=e%10==0;return(0,f.jsx)(`div`,{style:{width:n?3:r?2:1,height:n?16:r?10:5,background:n?O.amber:O.border,borderRadius:1,flexShrink:0}},t)})}),(0,f.jsxs)(`div`,{style:{position:`absolute`,bottom:2,left:0,right:0,display:`flex`,justifyContent:`space-between`,padding:`0 6px`,fontSize:7,color:O.textDim,fontFamily:`'JetBrains Mono', monospace`},children:[(0,f.jsx)(`span`,{children:`-50¢`}),(0,f.jsx)(`span`,{children:`-25¢`}),(0,f.jsx)(`span`,{children:`0¢`}),(0,f.jsx)(`span`,{children:`+25¢`}),(0,f.jsx)(`span`,{children:`+50¢`})]}),(0,f.jsxs)(`div`,{style:{position:`absolute`,bottom:16,left:`calc(10px + ${s} * (100% - 20px))`,transform:`translateX(-50%)`,transition:`left .04s ease-out`},children:[(0,f.jsx)(`div`,{style:{width:2,height:44,background:c?O.green:u?O.amber:O.textPrimary,borderRadius:1,margin:`0 auto`,boxShadow:c?`0 0 8px ${O.green}`:`0 0 4px ${u?O.amber:`transparent`}`}}),(0,f.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:c?O.green:u?O.amber:O.textPrimary,margin:`-1px auto 0`,boxShadow:c?`0 0 12px ${O.green}`:`0 0 6px ${u?O.amber:`transparent`}`}})]})]}),(0,f.jsxs)(`div`,{style:{fontSize:13,fontFamily:`'JetBrains Mono', monospace`,color:m,letterSpacing:`.04em`,minHeight:18},children:[a>0?`+${a}¢`:`${a}¢`,c&&(0,f.jsx)(`span`,{style:{color:O.green},children:` ✓`})]})]}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:6,padding:`8px 16px 12px`,justifyContent:`center`,borderTop:`1px solid ${O.border}`,flexShrink:0},children:fe.map(e=>{let t=e.num===d;return(0,f.jsxs)(`div`,{style:{width:40,height:40,borderRadius:8,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,background:t?`${e.color}22`:O.surface,border:`2px solid ${t?e.color:O.border}`,transition:`all .1s`,boxShadow:t?`0 0 12px ${e.color}44`:`none`},children:[(0,f.jsx)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:16,fontWeight:700,color:t?e.color:O.textDim,lineHeight:1},children:e.name}),(0,f.jsx)(`span`,{style:{fontSize:8,color:t?e.color:O.textDim,opacity:.7,lineHeight:1},children:e.num})]},e.num)})}),(0,f.jsxs)(`div`,{style:{padding:`0 16px 8px`,display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[(0,f.jsx)(`span`,{style:{fontSize:8,color:O.textDim,fontFamily:`'JetBrains Mono', monospace`},children:`SIG`}),(0,f.jsx)(`div`,{style:{flex:1,height:3,borderRadius:2,background:O.border,overflow:`hidden`},children:(0,f.jsx)(`div`,{style:{height:`100%`,width:`${Math.max(0,Math.min(100,o*100))}%`,background:o>.7?O.green:o>.3?O.amber:O.red,borderRadius:2,transition:`width .08s`}})}),(0,f.jsxs)(`span`,{style:{fontSize:8,color:O.textDim,fontFamily:`'JetBrains Mono', monospace`,minWidth:20,textAlign:`right`},children:[Math.round(o*100),`%`]})]})]})}var j={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},me={overdrive:[{key:`drive`,label:`Drive`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50},{key:`level`,label:`Level`,min:0,max:100,def:70}],distortion:[{key:`drive`,label:`Drive`,min:0,max:100,def:50},{key:`tone`,label:`Tone`,min:0,max:100,def:40},{key:`level`,label:`Level`,min:0,max:100,def:60}],fuzz:[{key:`fuzz`,label:`Fuzz`,min:0,max:100,def:60},{key:`tone`,label:`Tone`,min:0,max:100,def:30},{key:`level`,label:`Level`,min:0,max:100,def:60}],delay:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],echo:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],reverb:[{key:`decay`,label:`Decay`,min:0,max:100,def:50},{key:`mix`,label:`Mix`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50}],chorus:[{key:`rate`,label:`Rate`,min:0,max:100,def:40},{key:`depth`,label:`Depth`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],flanger:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],phaser:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],compressor:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:50},{key:`ratio`,label:`Ratio`,min:1,max:20,def:4},{key:`gain`,label:`Gain`,min:0,max:100,def:50}],gate:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:30},{key:`release`,label:`Release`,min:0,max:100,def:50}],eq:[{key:`low`,label:`Low`,min:-12,max:12,def:0},{key:`mid`,label:`Mid`,min:-12,max:12,def:0},{key:`high`,label:`High`,min:-12,max:12,def:0},{key:`level`,label:`Level`,min:0,max:100,def:70}],cabinet:[{key:`level`,label:`Level`,min:0,max:100,def:75}],ir:[{key:`level`,label:`Level`,min:0,max:100,def:75}],looper:h.filter(e=>e.type!==`select`)},he={overdrive:j.amber,distortion:j.red,fuzz:`#C07030`,delay:j.blue,echo:j.blue,reverb:`#60B0D0`,chorus:j.green,flanger:`#50C080`,phaser:`#80C050`,tremolo:j.green,compressor:`#D09040`,gate:j.textSec,eq:`#7080D0`,cabinet:`#D07090`,ir:`#D07090`,nam:`#E0A040`,boost:j.amber,wah:`#D0A060`,volume:j.textSec,tuner:`#80D0A0`,looper:m},ge={overdrive:`OD-808`,distortion:`RAT`,fuzz:`Big Muff`,delay:`Digital Delay`,echo:`Tape Echo`,reverb:`Hall Reverb`,chorus:`Chorus`,flanger:`Flanger`,phaser:`Phase 90`,tremolo:`Tremolo`,compressor:`Compressor`,gate:`Noise Gate`,eq:`EQ`,cabinet:`Cabinet`,ir:`IR Loader`,nam:`NAM Model`,boost:`Clean Boost`,wah:`Wah`,volume:`Volume`,tuner:`Tuner`,loop:`FX Loop`,looper:`Looper`};function _e(e){return me[(e||``).toLowerCase()]||[{key:`level`,label:`Level`,min:0,max:100,def:50}]}function ve(e){return he[(e||``).toLowerCase()]||j.amber}function ye(e){let t=(e.type||``).toLowerCase();return e.nam_model_path?e.nam_model_path.split(`/`).pop()?.replace(/\.(nam|wav|aiff?)$/i,``)||`NAM Model`:e.ir_file_path?e.ir_file_path.split(`/`).pop()?.replace(/\.(wav|aiff?|ir)$/i,``)||`IR Loader`:ge[t]||t.charAt(0).toUpperCase()+t.slice(1)}function be({label:e,value:t=50,onChange:n,size:r=72,color:i=j.amber,min:a=0,max:o=100,compact:s=!1}){let c=(0,l.useRef)(null),u=(t-a)/(o-a),d=-140+u*280,p=r*.38,m=r*.5-p,h=e=>{e.preventDefault(),c.current={y:e.touches?e.touches[0].clientY:e.clientY,val:t};let r=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,r=(c.current.y-t)/120,i=Math.max(a,Math.min(o,c.current.val+r*(o-a)));n?.(Math.round(i))},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),window.removeEventListener(`touchmove`,r),window.removeEventListener(`touchend`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i),window.addEventListener(`touchmove`,r,{passive:!1}),window.addEventListener(`touchend`,i)},g=r+16,_=g/2,v=g/2,y=r/2+4,b=_+y*Math.cos(Math.PI/180*-230),x=v+y*Math.sin(Math.PI/180*-230),S=_+y*Math.cos((d-90)*(Math.PI/180)),C=v+y*Math.sin((d-90)*(Math.PI/180)),w=+(u*280>180);return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:s?2:6,cursor:`pointer`},children:[(0,f.jsxs)(`div`,{style:{width:r,height:r,position:`relative`,touchAction:`none`},onMouseDown:h,onTouchStart:h,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-8,width:g,height:g,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:_,cy:v,r:y,fill:`none`,stroke:j.border,strokeWidth:`3`,strokeLinecap:`round`,opacity:`.5`}),u>0&&(0,f.jsx)(`path`,{d:`M ${b} ${x} A ${y} ${y} 0 ${w} 1 ${S} ${C}`,fill:`none`,stroke:i,strokeWidth:`3`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 4px ${i})`}})]}),(0,f.jsx)(`div`,{style:{borderRadius:`50%`,width:`100%`,height:`100%`,position:`relative`,background:`radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22)`,boxShadow:`0 3px 12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07)`},children:(0,f.jsx)(`div`,{style:{position:`absolute`,width:4,borderRadius:2,background:i,left:`50%`,transformOrigin:`bottom center`,height:p,top:m,transform:`translateX(-50%) rotate(${d}deg)`,transformOrigin:`50% ${p}px`,boxShadow:`0 0 6px ${i}`}})})]}),(0,f.jsx)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:s?11:14,fontWeight:700,color:i},children:t}),(0,f.jsx)(`div`,{style:{fontSize:s?7:9,color:j.textSec,letterSpacing:`.06em`,textTransform:`uppercase`,textAlign:`center`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:r+16},children:e})]})}function xe({label:e,value:t=50,onChange:n,onChangeEnd:r,min:i=0,max:a=100,color:o=j.amber}){let s=(0,l.useRef)(null),c=(0,l.useRef)(!1),u=(0,l.useRef)(t),d=(0,l.useRef)(n),p=(0,l.useRef)(r),m=(t-i)/(a-i)*100,[h,g]=(0,l.useState)(null);(0,l.useMemo)(()=>{d.current=n},[n]),(0,l.useMemo)(()=>{p.current=r},[r]);let _=(0,l.useCallback)(e=>{let n=s.current;if(!n)return t;let r=n.getBoundingClientRect(),o=(e.touches?e.touches[0].clientX:e.clientX)-r.left;return Math.round(i+Math.max(0,Math.min(1,o/r.width))*(a-i))},[i,a,t]);(0,l.useMemo)(()=>{let e=e=>{if(!c.current)return;e.preventDefault();let t=_(e);u.current=t,g(t),d.current?.(t)},t=()=>{c.current&&(p.current?.(u.current),c.current=!1,g(null))};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[_]);let v=e=>{e.preventDefault();let t=_(e);u.current=t,c.current=!0,g(t),d.current?.(t)},y=e=>n=>{n.preventDefault(),n.stopPropagation();let r=Math.max(i,Math.min(a,t+e));d.current?.(r),p.current?.(r)};return(0,f.jsxs)(`div`,{style:{marginBottom:4},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:2},children:[(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,textTransform:`uppercase`,letterSpacing:`.06em`,color:o},children:e}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(`button`,{style:{width:34,height:34,borderRadius:`50%`,border:`1px solid ${j.border}`,background:j.panel,color:j.textPrimary,fontSize:16,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:y(-5),onTouchStart:y(-5),children:`−`}),(0,f.jsx)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:16,fontWeight:700,color:o,minWidth:40,textAlign:`center`},children:h??t}),(0,f.jsx)(`button`,{style:{width:34,height:34,borderRadius:`50%`,border:`1px solid ${j.border}`,background:j.panel,color:j.textPrimary,fontSize:16,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:y(5),onTouchStart:y(5),children:`+`})]})]}),(0,f.jsxs)(`div`,{ref:s,onMouseDown:v,onTouchStart:v,style:{position:`relative`,height:44,display:`flex`,alignItems:`center`,cursor:`pointer`,touchAction:`none`},children:[(0,f.jsx)(`div`,{style:{width:`100%`,height:10,background:j.border,borderRadius:5,position:`relative`,overflow:`hidden`},children:(0,f.jsx)(`div`,{style:{height:`100%`,borderRadius:5,position:`absolute`,top:0,left:0,width:`${m}%`,background:o,boxShadow:`0 0 8px ${o}44`,transition:`width .03s`}})}),(0,f.jsx)(`div`,{style:{width:30,height:30,borderRadius:`50%`,position:`absolute`,top:`50%`,left:`${m}%`,transform:`translate(-50%,-50%)`,background:o,boxShadow:`0 2px 10px rgba(0,0,0,.6), 0 0 0 3px ${j.bg}`,pointerEvents:`none`,transition:`left .03s`}})]})]})}function Se({defs:e,params:t,viewMode:n,color:r,onParamChange:i,onParamChangeEnd:a,compact:o}){return(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:n===`knob`?8:0,width:`100%`,minWidth:0,flexShrink:0},children:n===`slider`?e.map(e=>(0,f.jsx)(xe,{label:e.label,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,color:r,onChange:t=>i(e.key,t),onChangeEnd:t=>a(e.key,t)},e.key)):(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(${o?4:Math.min(4,e.length)}, 1fr)`,gap:12,padding:`8px 0`,justifyItems:`center`,width:`100%`,maxWidth:480,margin:`0 auto`},children:e.map(e=>(0,f.jsx)(be,{label:e.label,size:o?60:72,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,color:r,onChange:t=>{i(e.key,t),a(e.key,t)},compact:o},e.key))})})}function Ce({block:e,params:t,viewMode:n,onClose:r,onParamChange:i,onParamChangeEnd:a,onToggleView:o,onToggleBypass:s,onOpenModelBrowser:c}){let u=_e(e.type),d=ve(e.type),p=ye(e),m=(0,l.useMemo)(()=>{let e=[];for(let t=0;t{let e=()=>b(window.innerWidth<500);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let x=(0,l.useCallback)(e=>{v.current=e.touches[0].clientX},[]),S=(0,l.useCallback)(e=>{if(v.current==null)return;let t=e.changedTouches[0].clientX-v.current;v.current=null,!(Math.abs(t)<50)&&(t<0&&hMath.min(e+1,m.length-1)):t>0&&h>0&&g(e=>Math.max(e-1,0)))},[h,m.length]);return(0,l.useMemo)(()=>{let e=e=>{e.key===`ArrowLeft`&&h>0&&g(e=>e-1),e.key===`ArrowRight`&&he+1),e.key===`Escape`&&r?.()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h,m.length,r]),(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,display:`flex`,flexDirection:`column`,background:j.bg,fontFamily:`'Inter', sans-serif`,color:j.textPrimary},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${j.border}`,background:j.panel,flexShrink:0},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,minWidth:0},children:[(0,f.jsx)(`button`,{onClick:r,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:j.surface,border:`1px solid ${j.border}`,color:j.textPrimary,fontSize:16,cursor:`pointer`,flexShrink:0},children:`✕`}),(0,f.jsxs)(`div`,{style:{minWidth:0},children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:p}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,marginTop:2},children:(0,f.jsx)(`span`,{style:{display:`inline-flex`,padding:`1px 6px`,borderRadius:3,fontSize:9,fontWeight:700,letterSpacing:`.06em`,textTransform:`uppercase`,background:`${d}22`,color:d},children:(e.type||`fx`).replace(/_/g,` `).toUpperCase()})})]})]}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,flexShrink:0},children:(0,f.jsx)(`button`,{onClick:o,style:{padding:`6px 10px`,borderRadius:6,fontSize:10,fontWeight:600,background:j.surface,border:`1px solid ${j.border}`,color:j.textPrimary,cursor:`pointer`,letterSpacing:`.04em`},children:n===`slider`?`◉ Knobs`:`▦ Sliders`})})]}),(0,f.jsx)(`div`,{style:{padding:`6px 14px`,borderBottom:`1px solid ${j.border}`,background:j.surface,flexShrink:0},children:(0,f.jsxs)(`button`,{onClick:s,style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8,padding:`10px 14px`,borderRadius:8,border:`2px solid ${e.bypassed?j.red+`66`:j.green+`66`}`,background:e.bypassed?`linear-gradient(180deg, ${j.red+`18`}, ${j.panel})`:`linear-gradient(180deg, ${j.green+`18`}, ${j.panel})`,cursor:`pointer`,transition:`all .12s`},children:[(0,f.jsx)(`div`,{style:{width:12,height:12,borderRadius:`50%`,background:e.bypassed?j.textDim:j.green,boxShadow:e.bypassed?`none`:`0 0 8px ${j.green}`}}),(0,f.jsx)(`span`,{style:{fontSize:12,fontWeight:700,letterSpacing:`.08em`,textTransform:`uppercase`,color:e.bypassed?j.red:j.green},children:e.bypassed?`Bypassed — Tap to Enable`:`Active — Tap to Bypass`})]})}),(0,f.jsx)(`div`,{ref:_,onTouchStart:x,onTouchEnd:S,style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`12px 16px`,display:`flex`,flexDirection:`column`,gap:6},children:m.length===0?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:j.textDim,fontSize:12},children:`No parameters for this block type`}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Se,{defs:m[h],params:t,viewMode:n,color:d,onParamChange:i,onParamChangeEnd:a,compact:y}),(0,f.jsx)(`div`,{style:{flex:1,minHeight:8}})]})}),(0,f.jsxs)(`div`,{style:{padding:`8px 14px 12px`,borderTop:`1px solid ${j.border}`,background:j.panel,flexShrink:0,display:`flex`,flexDirection:`column`,gap:6},children:[m.length>1&&(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:5},children:m.map((e,t)=>(0,f.jsx)(`button`,{onClick:()=>g(t),style:{width:8,height:8,borderRadius:`50%`,border:`none`,padding:0,cursor:`pointer`,background:t===h?d:j.border,opacity:t===h?1:.4,transition:`all .12s`}},t))}),m.length>1&&(0,f.jsxs)(`div`,{style:{textAlign:`center`,fontSize:9,color:j.textDim,fontFamily:`'JetBrains Mono', monospace`,letterSpacing:`.04em`},children:[`Page `,h+1,` / `,m.length,(0,f.jsx)(`span`,{style:{marginLeft:8,opacity:.6},children:`← swipe to navigate →`})]}),c&&(0,f.jsxs)(`button`,{onClick:c,style:{width:`100%`,padding:`8px 14px`,borderRadius:7,background:j.surface,border:`1px solid ${j.border}`,color:j.textPrimary,fontSize:11,fontWeight:600,cursor:`pointer`,letterSpacing:`.04em`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6},children:[(0,f.jsx)(`span`,{children:`🎛`}),` Swap Model / Block Type`]})]})]})}var M={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},we=`/ui/img/`,Te={Distortions:{icon:`fx_distortion`,color:M.red},Dynamics:{icon:`fx_compressor`,color:M.green},Modulations:{icon:`fx_modulator`,color:M.blue},Delays:{icon:`fx_delay`,color:`#60A0E0`},Reverbs:{icon:`fx_reverb`,color:`#60C0D0`},Filters:{icon:`fx_filter`,color:`#D0A060`},Amps:{icon:`fx_amplifier`,color:`#E0A040`},Preamps:{icon:`fx_simulator`,color:`#D08040`},Cabs:{icon:`fx_spatial`,color:`#D07090`},IRs:{icon:`fx_spatial`,color:`#70B090`},"Pitch/Synth":{icon:`fx_pitch`,color:`#A060E0`},"Volume/Pan":{icon:`fx_constant`,color:M.textSec},Looper:{icon:`fx_oscillator`,color:`#80D0A0`},"Send/Return":{icon:`fx_lr`,color:`#9090C0`},Special:{icon:`fx_utility`,color:`#B080C0`}},Ee=[`Distortions`,`Dynamics`,`Modulations`,`Delays`,`Reverbs`,`Filters`,`Amps`,`Preamps`,`Cabs`,`IRs`,`Pitch/Synth`,`Volume/Pan`,`Looper`,`Send/Return`,`Special`],De=[`Preamps`,`Pitch/Synth`],Oe={od:M.amber,overdrive:M.amber,drive:M.amber,dist:M.red,distortion:M.red,fuzz:`#D060E0`,mod:M.blue,chorus:M.blue,flange:M.blue,phaser:M.blue,tremolo:M.blue,vibrato:M.blue,rotary:M.blue,delay:`#60A0E0`,echo:`#60A0E0`,reverb:`#60C0D0`,pitch:`#A060E0`,comp:M.green,compressor:M.green,gate:M.green,filter:`#D0A060`,wah:`#D0A060`,eq:`#80A0B0`,ir:M.green,cab:M.green,nam:`#E0A040`,volume:M.textSec,boost:M.amber,split:`#B080C0`,merge:`#80B0C0`},ke={od:`fx_distortion`,overdrive:`fx_distortion`,drive:`fx_distortion`,dist:`fx_distortion`,distortion:`fx_distortion`,gain:`fx_distortion`,fuzz:`fx_distortion`,delay:`fx_delay`,echo:`fx_delay`,reverb:`fx_reverb`,chorus:`fx_chorus`,flange:`fx_flanger`,flanger:`fx_flanger`,phaser:`fx_phaser`,tremolo:`fx_modulator`,vibrato:`fx_modulator`,rotary:`fx_modulator`,modulator:`fx_modulator`,pitch:`fx_pitch`,harmonizer:`fx_pitch`,shifter:`fx_pitch`,comp:`fx_compressor`,compressor:`fx_compressor`,limiter:`fx_limiter`,gate:`fx_gate`,noise_gate:`fx_gate`,filter:`fx_filter`,wah:`fx_filter`,eq:`fx_eq`,graphic_eq:`fx_eq`,parametric_eq:`fx_parametric_eq`,multiband_eq:`fx_multiband_eq`,ir:`fx_spatial`,cab:`fx_spatial`,cabinet:`fx_spatial`,nam:`fx_simulator`,capture:`fx_simulator`,amp:`fx_amplifier`,amplifier:`fx_amplifier`,volume:`fx_constant`,level:`fx_constant`,boost:`fx_constant`,split:`fx_split_a`,merge:`fx_mixer`,tuner:`fx_analyzer`,mixer:`fx_mixer`,utility:`fx_utility`,plugin:`fx_plugin`,instrument:`fx_instrument`,looper:`fx_oscillator`,converter:`fx_converter`,reamp:`fx_converter`,lr:`fx_lr`},Ae=[{type:`overdrive`,name:`OD-808`,category:`Distortions`,desc:`Classic overdrive`},{type:`distortion`,name:`RAT`,category:`Distortions`,desc:`Aggressive distortion`},{type:`fuzz`,name:`Big Muff`,category:`Distortions`,desc:`Thick fuzz sustain`},{type:`boost`,name:`Clean Boost`,category:`Distortions`,desc:`Clean level boost`},{type:`compressor`,name:`Compressor`,category:`Dynamics`,desc:`Dynamic range control`},{type:`gate`,name:`Noise Gate`,category:`Dynamics`,desc:`Noise suppression`},{type:`chorus`,name:`Chorus`,category:`Modulations`,desc:`Rich chorus effect`},{type:`flanger`,name:`Flanger`,category:`Modulations`,desc:`Jet plane sweep`},{type:`phaser`,name:`Phase 90`,category:`Modulations`,desc:`Iconic phase shift`},{type:`tremolo`,name:`Tremolo`,category:`Modulations`,desc:`Volume modulation`},{type:`delay`,name:`Digital Delay`,category:`Delays`,desc:`Clean digital repeats`},{type:`echo`,name:`Tape Echo`,category:`Delays`,desc:`Warm tape repeats`},{type:`reverb`,name:`Hall Reverb`,category:`Reverbs`,desc:`Lush hall reverb`},{type:`eq`,name:`Equalizer`,category:`Filters`,desc:`3-band tone control`},{type:`wah`,name:`Wah`,category:`Filters`,desc:`Crybaby wah`},{type:`volume`,name:`Volume Pedal`,category:`Volume/Pan`,desc:`Volume control`},{type:`looper`,name:`Looper`,category:`Looper`,desc:`Simple loop recorder`},{type:`split`,name:`Split`,category:`Special`,desc:`Parallel routing`},{type:`merge`,name:`Merge`,category:`Special`,desc:`Sum parallel paths`},{type:`tuner`,name:`Tuner`,category:`Special`,desc:`Instrument tuner`},{type:`loop`,name:`FX Loop`,category:`Send/Return`,desc:`External FX send/return`},{type:`cabinet`,name:`Cabinet`,category:`Cabs`,desc:`Speaker cabinet sim`},{type:`ir`,name:`IR Loader`,category:`IRs`,desc:`Impulse response loader`},{type:`nam`,name:`NAM Model`,category:`Amps`,desc:`Neural amp model`}];function je(e){let t=(e||``).toLowerCase().trim();for(let[e,n]of Object.entries(ke))if(t===e||t.startsWith(e)||t.includes(e))return n;return`fx_plugin`}function Me(e){let t=(e||``).toLowerCase().trim();for(let[e,n]of Object.entries(Oe))if(t===e||t.startsWith(e)||t.includes(e))return n;return M.amber}function Ne({category:e,size:t=14}){let n=Te[e];return n?(0,f.jsx)(`img`,{src:`${we}${n.icon}.svg`,alt:e,style:{width:t,height:t,flexShrink:0,filter:`invert(0.95) brightness(2)`,objectFit:`contain`},onError:e=>{e.target.style.display=`none`}}):null}function Pe({currentBlockType:e,currentBlockName:t,currentModelPath:n,onSelectModel:r,onClose:i}){let[a,o]=(0,l.useState)(`All`),[s,c]=(0,l.useState)(``),[u,d]=(0,l.useState)([]),[p,m]=(0,l.useState)(()=>{try{let e=localStorage.getItem(`helix_model_favorites`);return e?JSON.parse(e):[]}catch{return[]}}),h=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/api/models`).then(e=>e.json());e||d(t.models||[])}catch{}})(),()=>{e=!0}},[]);let g=(0,l.useCallback)(e=>{m(t=>{let n=t.includes(e)?t.filter(t=>t!==e):[...t,e];return localStorage.setItem(`helix_model_favorites`,JSON.stringify(n)),n})},[]),_=n||(e?`builtin:${e}`:null),v=(0,l.useMemo)(()=>{let e=[];for(let t of Ae)e.push({id:`builtin:${t.type}`,type:t.type,name:t.name,category:t.category,desc:t.desc,isBuiltin:!0,iconType:t.type});for(let t of u){let n=t.name||t.filename||`Unnamed Model`;e.push({id:`nam:${n}`,type:`nam`,name:n,category:`Amps`,desc:t.architecture?`${t.architecture} · ${t.size_mb}MB`:`Installed NAM model`,isBuiltin:!1,loaded:t.loaded,modelPath:t.path||t.filename,iconType:`nam`})}return e},[u]),y=(0,l.useMemo)(()=>a===`All`?[...Ee].filter(e=>De.includes(e)?v.some(t=>t.category===e&&!t.isBuiltin):v.some(t=>t.category===e)):a===`★Favorites`?[]:[a],[a,v]),b=(0,l.useMemo)(()=>{let e=v;if(a===`★Favorites`?e=e.filter(e=>p.includes(e.id)):a!==`All`&&(e=e.filter(e=>e.category===a)),s.trim()){let t=s.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.type.toLowerCase().includes(t)||(e.desc||``).toLowerCase().includes(t)||(e.category||``).toLowerCase().includes(t))}return e},[v,a,s,p]),x=(0,l.useMemo)(()=>{if(a!==`All`&&a!==`★Favorites`)return null;let e={};for(let t of b)e[t.category]||(e[t.category]=[]),e[t.category].push(t);return e},[b,a]),S=(0,l.useCallback)(e=>{r?.({type:e.type,name:e.name,modelPath:e.isBuiltin?null:e.modelPath||e.id,isBuiltin:e.isBuiltin}),i?.()},[r,i]),C=[`All`,`★Favorites`,...Ee.filter(e=>De.includes(e)?v.some(t=>t.category===e&&!t.isBuiltin):v.some(t=>t.category===e))];return(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:1e3,display:`flex`,flexDirection:`column`,background:M.bg,color:M.textPrimary,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${M.border}`,background:M.panel,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,f.jsx)(`button`,{onClick:i,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:M.surface,border:`1px solid ${M.border}`,color:M.textPrimary,fontSize:16,cursor:`pointer`},children:`✕`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600},children:`Model Browser`}),t&&(0,f.jsxs)(`div`,{style:{fontSize:10,color:M.textSec,marginTop:1},children:[`Current: `,t]})]})]})}),(0,f.jsx)(`div`,{style:{padding:`8px 14px`,borderBottom:`1px solid ${M.border}`,background:M.surface,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,background:M.panel,borderRadius:7,border:`1px solid ${M.border}`,padding:`7px 10px`},children:[(0,f.jsx)(`span`,{style:{color:M.textDim,fontSize:13},children:`🔍`}),(0,f.jsx)(`input`,{ref:h,placeholder:`Search models...`,value:s,onChange:e=>c(e.target.value),style:{flex:1,background:`none`,border:`none`,color:M.textPrimary,fontSize:13,outline:`none`}}),s&&(0,f.jsx)(`button`,{onClick:()=>c(``),style:{background:`none`,border:`none`,color:M.textDim,fontSize:14,cursor:`pointer`,padding:2},children:`✕`})]})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:0,overflowX:`auto`,overflowY:`hidden`,borderBottom:`1px solid ${M.border}`,background:M.panel,flexShrink:0,WebkitOverflowScrolling:`touch`},children:C.map(e=>{let t=Te[e],n=a===e;return(0,f.jsxs)(`button`,{onClick:()=>o(e),style:{padding:`8px 12px`,fontSize:10,fontWeight:600,letterSpacing:`.04em`,whiteSpace:`nowrap`,background:`none`,border:`none`,borderBottom:`2px solid ${n?M.amber:`transparent`}`,color:n?M.textPrimary:M.textSec,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:5,flexShrink:0,transition:`all .12s`},children:[t&&(0,f.jsx)(Ne,{category:e,size:12}),e===`★Favorites`&&(0,f.jsx)(`span`,{children:`★`}),e===`★Favorites`?` Favorites`:e]},e)})}),(0,f.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`10px 14px`,WebkitOverflowScrolling:`touch`},children:[a===`★Favorites`&&b.length===0&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px 20px`,gap:8,color:M.textDim},children:[(0,f.jsx)(`span`,{style:{fontSize:28},children:`☆`}),(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:500},children:`No favorites yet`}),(0,f.jsx)(`div`,{style:{fontSize:11,textAlign:`center`},children:`Star a model to add it to your favorites`})]}),s&&b.length===0&&(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`40px 20px`,gap:8,color:M.textDim},children:(0,f.jsxs)(`div`,{style:{fontSize:13},children:[`No models matching "`,s,`"`]})}),x?y.map(e=>{let t=x[e]||[];if(t.length===0)return null;let n=Te[e];return(0,f.jsxs)(`div`,{style:{marginBottom:20},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:8},children:[n&&(0,f.jsx)(Ne,{category:e,size:16}),(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:700,letterSpacing:`.08em`,textTransform:`uppercase`,color:M.textSec},children:e}),(0,f.jsx)(`div`,{style:{flex:1,height:1,background:M.border,opacity:.4}})]}),(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(130px, 1fr))`,gap:6},children:t.map(e=>(0,f.jsx)(Fe,{model:e,isCurrent:e.id===_,isFavorite:p.includes(e.id),onSelect:()=>S(e),onToggleFav:()=>g(e.id)},e.id))})]},e)}):(0,f.jsx)(f.Fragment,{children:b.length>0&&(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(130px, 1fr))`,gap:6},children:b.map(e=>(0,f.jsx)(Fe,{model:e,isCurrent:e.id===_,isFavorite:p.includes(e.id),onSelect:()=>S(e),onToggleFav:()=>g(e.id)},e.id))})})]})]})}function Fe({model:e,isCurrent:t,isFavorite:n,onSelect:r,onToggleFav:i}){let a=Me(e.type),[o,s]=(0,l.useState)(!1);return(0,f.jsxs)(`div`,{onClick:r,style:{display:`flex`,flexDirection:`column`,gap:0,padding:`10px 8px 8px`,borderRadius:8,background:t?`linear-gradient(135deg, ${a}18, ${M.panel})`:M.surface,border:`1.5px solid ${t?a+`66`:M.border}`,cursor:`pointer`,position:`relative`,transition:`all .12s`,boxShadow:t?`0 0 12px ${a}33`:`none`,minHeight:72},children:[(0,f.jsx)(`div`,{onClick:e=>{e.stopPropagation(),i()},style:{position:`absolute`,top:4,right:4,fontSize:13,cursor:`pointer`,zIndex:2,color:n?M.amber:M.textDim,textShadow:n?`0 0 4px ${M.amber}`:`none`,transition:`all .15s`,lineHeight:1},children:n?`★`:`☆`}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:34,marginBottom:6},children:o?(0,f.jsx)(`span`,{style:{fontSize:18,color:a,opacity:.7,fontFamily:`'JetBrains Mono', monospace`,fontWeight:700},children:e.name.charAt(0)}):(0,f.jsx)(`img`,{src:`${we}${je(e.iconType||e.type)}.svg`,alt:e.type,style:{width:28,height:28,filter:`invert(0.95) brightness(2) drop-shadow(0 0 4px ${a}44)`,objectFit:`contain`},onError:()=>s(!0)})}),(0,f.jsx)(`div`,{style:{fontSize:11,fontWeight:600,color:t?a:M.textPrimary,textAlign:`center`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:1.3},children:e.name}),(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:3},children:(0,f.jsx)(`span`,{style:{display:`inline-flex`,padding:`1px 5px`,borderRadius:3,fontSize:8,fontWeight:700,letterSpacing:`.05em`,textTransform:`uppercase`,background:`${a}18`,color:a},children:e.type.replace(/_/g,` `)})}),e.desc&&(0,f.jsx)(`div`,{style:{fontSize:8,color:M.textDim,textAlign:`center`,marginTop:3,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.desc}),t&&(0,f.jsx)(`div`,{style:{position:`absolute`,top:4,left:4,width:6,height:6,borderRadius:`50%`,background:M.green,boxShadow:`0 0 6px ${M.green}`}})]})}var N={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},Ie=[{id:`save`,label:`Save Preset`,icon:`💾`,desc:`Save current preset to bank`},{id:`bypass`,label:`Bypass/Control`,icon:`🔌`,desc:`Footswitch & pedal assignment`},{id:`settings`,label:`Global Settings`,icon:`⚙`,desc:`Master volume, input, MIDI, display`},{id:`eq`,label:`Global EQ`,icon:`📊`,desc:`Low, Mid, High shelving EQ`},{id:`tuner`,label:`Tuner`,icon:`🎵`,desc:`Instrument tuner`},{id:`wifi`,label:`Wi-Fi / Bluetooth`,icon:`📶`,desc:`Wireless & network settings`}];function Le({onClose:e,onItemSelect:t}){let n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let e=n.current;e&&requestAnimationFrame(()=>{e.style.transform=`translateX(0)`})},[]),(0,f.jsx)(`div`,{ref:n,onClick:t=>{t.target===t.currentTarget&&e?.()},style:{position:`fixed`,inset:0,zIndex:999,display:`flex`,background:`rgba(0,0,0,0.55)`,transition:`background .2s ease`},children:(0,f.jsxs)(`div`,{style:{width:260,maxWidth:`75vw`,height:`100%`,background:N.panel,borderRight:`1px solid ${N.border}`,display:`flex`,flexDirection:`column`,boxShadow:`4px 0 24px rgba(0,0,0,0.5)`,transform:`translateX(-100%)`,transition:`transform .22s cubic-bezier(.22,.61,.36,1)`},children:[(0,f.jsxs)(`div`,{style:{padding:`14px 16px`,borderBottom:`1px solid ${N.border}`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexShrink:0},children:[(0,f.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:N.textPrimary},children:`☰ Menu`}),(0,f.jsx)(`button`,{onClick:e,style:{width:28,height:28,borderRadius:6,display:`flex`,alignItems:`center`,justifyContent:`center`,background:N.surface,border:`1px solid ${N.border}`,color:N.textSec,fontSize:13,cursor:`pointer`},children:`✕`})]}),(0,f.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 0`},children:Ie.map(e=>(0,f.jsxs)(`button`,{onClick:()=>t?.(e.id),style:{width:`100%`,display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,background:`none`,border:`none`,cursor:`pointer`,textAlign:`left`,color:N.textPrimary,transition:`background .1s`,borderBottom:`1px solid ${N.border}33`},onMouseEnter:e=>{e.currentTarget.style.background=N.surface},onMouseLeave:e=>{e.currentTarget.style.background=`none`},children:[(0,f.jsx)(`div`,{style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:N.surface,border:`1px solid ${N.border}`,fontSize:16,flexShrink:0},children:e.icon}),(0,f.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:600,color:N.textPrimary},children:e.label}),(0,f.jsx)(`div`,{style:{fontSize:10,color:N.textDim,marginTop:1,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.desc})]}),(0,f.jsx)(`span`,{style:{color:N.textDim,fontSize:11},children:`›`})]},e.id))}),(0,f.jsx)(`div`,{style:{padding:`12px 16px`,borderTop:`1px solid ${N.border}`,flexShrink:0},children:(0,f.jsx)(`div`,{style:{fontSize:9,color:N.textDim,textAlign:`center`,letterSpacing:`.06em`},children:`Helix Stadium v0.1`})})]})})}var P={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},Re={Audio:[{key:`master_volume`,label:`Master Volume`,type:`slider`,min:0,max:100,def:72,unit:`%`,icon:`🔊`},{key:`input_pad`,label:`Input Pad`,type:`select`,def:`off`,options:[{value:`off`,label:`Off (0 dB)`},{value:`-6`,label:`-6 dB`},{value:`-12`,label:`-12 dB`},{value:`-18`,label:`-18 dB`}],icon:`📥`},{key:`input_impedance`,label:`Input Impedance`,type:`select`,def:`1m`,options:[{value:`1m`,label:`1 MΩ`},{value:`500k`,label:`500 kΩ`},{value:`250k`,label:`250 kΩ`},{value:`150k`,label:`150 kΩ`},{value:`68k`,label:`68 kΩ`}],icon:`⚡`}],MIDI:[{key:`midi_channel`,label:`MIDI Channel`,type:`select`,def:`omni`,options:[{value:`omni`,label:`Omni`},...Array.from({length:16},(e,t)=>({value:String(t+1),label:`Channel ${t+1}`}))],icon:`🎹`},{key:`midi_clock`,label:`MIDI Clock`,type:`toggle`,def:!1,icon:`⏱`},{key:`midi_thru`,label:`MIDI Thru`,type:`toggle`,def:!0,icon:`↔`}],Display:[{key:`brightness`,label:`Display Brightness`,type:`slider`,min:1,max:10,def:8,unit:``,icon:`☀️`},{key:`auto_dim`,label:`Auto Dim`,type:`toggle`,def:!0,icon:`🌙`},{key:`screen_saver`,label:`Screen Saver`,type:`select`,def:`5m`,options:[{value:`off`,label:`Off`},{value:`1m`,label:`1 min`},{value:`5m`,label:`5 min`},{value:`15m`,label:`15 min`},{value:`30m`,label:`30 min`}],icon:`💤`}],Tempo:[{key:`tap_tempo`,label:`Tap Tempo`,type:`bpm`,def:120,icon:`🔄`},{key:`tempo_division`,label:`Tempo Division`,type:`select`,def:`quarter`,options:[{value:`half`,label:`½ Note`},{value:`quarter`,label:`¼ Note`},{value:`eighth`,label:`⅛ Note`},{value:`triplet`,label:`⅛ Triplet`},{value:`sixteenth`,label:`¹⁄₁₆ Note`},{value:`dotted_eighth`,label:`Dotted ⅛`}],icon:`🎶`},{key:`tap_tempo_mute`,label:`Mute on Tap`,type:`toggle`,def:!1,icon:`🔇`}]};function ze({label:e,value:t,min:n,max:r,unit:i,onChange:a}){let o=(0,l.useRef)(null),s=(0,l.useRef)(!1),c=(t-n)/(r-n)*100,u=(0,l.useCallback)(e=>{let i=o.current;if(!i)return t;let a=i.getBoundingClientRect(),s=(e.touches?e.touches[0].clientX:e.clientX)-a.left;return Math.round(n+Math.max(0,Math.min(1,s/a.width))*(r-n))},[n,r,t]);(0,l.useEffect)(()=>{let e=e=>{s.current&&(e.preventDefault(),a?.(u(e)))},t=()=>{s.current=!1};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[u,a]);let d=e=>{e.preventDefault(),s.current=!0,a?.(u(e))},p=e=>i=>{i.preventDefault(),i.stopPropagation(),a?.(Math.max(n,Math.min(r,t+e)))};return(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:4},children:[(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:P.textSec},children:e}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,f.jsx)(`button`,{style:{width:26,height:26,borderRadius:`50%`,border:`1px solid ${P.border}`,background:P.panel,color:P.textPrimary,fontSize:14,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:p(-1),onTouchStart:p(-1),children:`−`}),(0,f.jsxs)(`span`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:14,fontWeight:700,color:P.amber,minWidth:36,textAlign:`center`},children:[t,i]}),(0,f.jsx)(`button`,{style:{width:26,height:26,borderRadius:`50%`,border:`1px solid ${P.border}`,background:P.panel,color:P.textPrimary,fontSize:14,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,lineHeight:1},onMouseDown:p(1),onTouchStart:p(1),children:`+`})]})]}),(0,f.jsxs)(`div`,{ref:o,onMouseDown:d,onTouchStart:d,style:{position:`relative`,height:32,display:`flex`,alignItems:`center`,cursor:`pointer`,touchAction:`none`},children:[(0,f.jsx)(`div`,{style:{width:`100%`,height:6,background:P.border,borderRadius:3,position:`relative`,overflow:`hidden`},children:(0,f.jsx)(`div`,{style:{height:`100%`,borderRadius:3,position:`absolute`,top:0,left:0,width:`${c}%`,background:P.amber,boxShadow:`0 0 6px ${P.amber}44`,transition:`width .03s`}})}),(0,f.jsx)(`div`,{style:{width:24,height:24,borderRadius:`50%`,position:`absolute`,top:`50%`,left:`${c}%`,transform:`translate(-50%,-50%)`,background:P.amber,border:`3px solid ${P.bg}`,boxShadow:`0 1px 6px rgba(0,0,0,.5)`,pointerEvents:`none`,transition:`left .03s`}})]})]})}function Be({label:e,value:t,options:n,onChange:r,icon:i}){return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:P.textSec},children:e})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,flexWrap:`wrap`,background:P.panel,borderRadius:6,padding:4},children:n.map(e=>(0,f.jsx)(`button`,{onClick:()=>r?.(e.value),style:{flex:1,padding:`6px 8px`,borderRadius:4,border:`none`,fontSize:10,fontWeight:600,cursor:`pointer`,background:t===e.value?P.amber:`transparent`,color:t===e.value?`#000`:P.textSec,transition:`all .1s`,letterSpacing:`.03em`,whiteSpace:`nowrap`,minWidth:0},children:e.label},e.value))})]})}function Ve({label:e,value:t,onChange:n}){return(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 0`},children:[(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:P.textSec},children:e}),(0,f.jsx)(`button`,{onClick:()=>n?.(!t),style:{width:44,height:24,borderRadius:12,background:t?P.amber:P.border,border:`none`,cursor:`pointer`,position:`relative`,transition:`background .15s`},children:(0,f.jsx)(`div`,{style:{width:18,height:18,borderRadius:`50%`,background:`#fff`,position:`absolute`,top:3,left:t?23:3,transition:`left .15s`,boxShadow:`0 1px 3px rgba(0,0,0,.3)`}})})]})}function He({label:e,value:t,onChange:n}){let r=(0,l.useRef)([]),i=(0,l.useCallback)(()=>{let e=Date.now();if(r.current.push(e),r.current.length>4&&r.current.shift(),r.current.length<2)return;let t=[];for(let e=1;ee+t,0)/t.length,a=Math.max(20,Math.min(300,Math.round(6e4/i)));n?.(a)},[n]);return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:500,color:P.textSec},children:e})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(`button`,{onClick:i,style:{padding:`8px 20px`,borderRadius:8,border:`1px solid ${P.amber}66`,background:`${P.amber}15`,color:P.amber,fontSize:12,fontWeight:700,cursor:`pointer`,letterSpacing:`.05em`},children:`TAP`}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,gap:4,background:P.surface,borderRadius:6,border:`1px solid ${P.border}`,padding:`6px 10px`},children:[(0,f.jsx)(`button`,{onClick:()=>n?.(Math.max(20,t-1)),style:{background:`none`,border:`none`,color:P.textDim,fontSize:14,cursor:`pointer`,padding:`0 4px`},children:`−`}),(0,f.jsxs)(`span`,{style:{flex:1,textAlign:`center`,fontFamily:`'JetBrains Mono', monospace`,fontSize:16,fontWeight:700,color:P.amber},children:[t,` BPM`]}),(0,f.jsx)(`button`,{onClick:()=>n?.(Math.min(300,t+1)),style:{background:`none`,border:`none`,color:P.textDim,fontSize:14,cursor:`pointer`,padding:`0 4px`},children:`+`})]})]})]})}function Ue({onClose:e,onMasterVolume:t}){let[n,r]=(0,l.useState)(()=>{let e={};for(let t of Object.values(Re))for(let n of t)e[n.key]=n.def;return e}),i=Object.entries(Re),a=(0,l.useCallback)((e,n)=>{r(t=>({...t,[e]:n})),e===`master_volume`&&t?.(n)},[t]);return(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:998,display:`flex`,flexDirection:`column`,background:P.bg,color:P.textPrimary,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${P.border}`,background:P.panel,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,f.jsx)(`button`,{onClick:e,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:P.surface,border:`1px solid ${P.border}`,color:P.textPrimary,fontSize:16,cursor:`pointer`},children:`✕`}),(0,f.jsx)(`div`,{children:(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600},children:`Global Settings`})})]})}),(0,f.jsx)(`div`,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`6px 14px 20px`},children:i.map(([e,t])=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:10,fontWeight:700,letterSpacing:`.1em`,textTransform:`uppercase`,color:P.textDim,padding:`14px 0 8px`},children:e}),(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12,background:P.surface,borderRadius:8,border:`1px solid ${P.border}`,padding:`12px 14px`},children:t.map(e=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:10},children:[(0,f.jsx)(`div`,{style:{width:28,height:28,borderRadius:6,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:P.panel,fontSize:13},children:e.icon}),(0,f.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[e.type===`slider`&&(0,f.jsx)(ze,{label:e.label,value:n[e.key]??e.def,min:e.min,max:e.max,unit:e.unit,onChange:t=>a(e.key,t)}),e.type===`select`&&(0,f.jsx)(Be,{label:e.label,value:n[e.key]??e.def,options:e.options,onChange:t=>a(e.key,t)}),e.type===`toggle`&&(0,f.jsx)(Ve,{label:e.label,value:n[e.key]??e.def,onChange:t=>a(e.key,t)}),e.type===`bpm`&&(0,f.jsx)(He,{label:e.label,value:n[e.key]??e.def,onChange:t=>a(e.key,t)})]})]},e.key))})]},e))})]})}var F={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},We=[{key:`low`,label:`Low`,freq:`80 Hz`,color:`#60A0E0`,shadow:`#60A0E044`},{key:`mid`,label:`Mid`,freq:`800 Hz`,color:F.amber,shadow:`${F.amber}44`},{key:`high`,label:`High`,freq:`6.4 kHz`,color:`#60D080`,shadow:`#60D08044`}];function Ge({label:e,freq:t,value:n,min:r,max:i,color:a,onChange:o}){let s=(0,l.useRef)(null),c=(n-r)/(i-r),u=-140+c*280,d=80*.38,p=e=>{e.preventDefault(),s.current={y:e.touches?e.touches[0].clientY:e.clientY,val:n};let t=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,n=(s.current.y-t)/120,a=Math.max(r,Math.min(i,s.current.val+n*(i-r)));o?.(Math.round(a*10)/10)},a=()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`mouseup`,a),window.removeEventListener(`touchmove`,t),window.removeEventListener(`touchend`,a)};window.addEventListener(`mousemove`,t),window.addEventListener(`mouseup`,a),window.addEventListener(`touchmove`,t,{passive:!1}),window.addEventListener(`touchend`,a)},m=48+44*Math.cos(Math.PI/180*-230),h=48+44*Math.sin(Math.PI/180*-230),g=48+44*Math.cos((u-90)*(Math.PI/180)),_=48+44*Math.sin((u-90)*(Math.PI/180)),v=+(c*280>180);return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:4,cursor:`pointer`,minWidth:0},children:[(0,f.jsxs)(`div`,{style:{width:80,height:80,position:`relative`,touchAction:`none`},onMouseDown:p,onTouchStart:p,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-8,width:96,height:96,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:48,cy:48,r:44,fill:`none`,stroke:F.border,strokeWidth:`3`,strokeLinecap:`round`,opacity:`.5`}),c>0&&(0,f.jsx)(`path`,{d:`M ${m} ${h} A 44 44 0 ${v} 1 ${g} ${_}`,fill:`none`,stroke:a,strokeWidth:`3`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 4px ${a})`}})]}),(0,f.jsx)(`div`,{style:{borderRadius:`50%`,width:`100%`,height:`100%`,position:`relative`,background:`radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22)`,boxShadow:`0 3px 12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07)`},children:(0,f.jsx)(`div`,{style:{position:`absolute`,width:4,borderRadius:2,background:a,left:`50%`,transformOrigin:`bottom center`,height:d,top:9.600000000000001,transform:`translateX(-50%) rotate(${u}deg)`,transformOrigin:`50% ${d}px`,boxShadow:`0 0 6px ${a}`}})})]}),(0,f.jsxs)(`div`,{style:{fontFamily:`'JetBrains Mono', monospace`,fontSize:14,fontWeight:700,color:a},children:[n>0?`+${n}`:n,` dB`]}),(0,f.jsx)(`div`,{style:{fontSize:8,color:F.textDim,letterSpacing:`.08em`,textTransform:`uppercase`},children:e}),(0,f.jsx)(`div`,{style:{fontSize:8,color:F.textDim,fontFamily:`'JetBrains Mono', monospace`},children:t})]})}function Ke({bands:e,values:t}){let n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let r=n.current;if(!r)return;let i=r.getContext(`2d`),a=r.width,o=r.height,s={top:10,bottom:10,left:20,right:10},c=a-s.left-s.right,l=o-s.top-s.bottom;i.clearRect(0,0,a,o),i.strokeStyle=F.border,i.lineWidth=.5;for(let e=-12;e<=12;e+=4){let t=s.top+l*(1-(e+12)/24);i.beginPath(),i.moveTo(s.left,t),i.lineTo(a-s.right,t),i.stroke(),i.fillStyle=F.textDim,i.font=`7px 'JetBrains Mono', monospace`,i.textAlign=`right`,i.fillText(`${e>0?`+`:``}${e}`,s.left-2,t+2)}let u={low:s.left+c*.1,mid:s.left+c*.5,high:s.left+c*.9},d={};e.forEach((e,t)=>{d[e.key]=t});let f=e.map(e=>t[e.key]??0),p=[],m=[];for(let t=0;t<=100;t++){let n=t/100,r=s.left+c*n;e.map((e,t)=>({x:u[e.key],y:-(f[t]||0)}));let i=0;if(n<.1)i=f[0]*(n/.1);else if(n>.9)i=f[2]*((1-n)/.1);else{let e=(n-.1)/.8,t=f[0],r=f[1],a=f[2];i=(1-e)*(1-e)*t+2*(1-e)*e*r+e*e*a}let a=s.top+l*(.5-i/24);p.push(r),m.push(a)}i.beginPath(),i.moveTo(p[0],s.top+l);for(let e=0;e{let t=u[e.key],n=f[d[e.key]]||0,r=s.top+l*(.5-n/24);i.beginPath(),i.arc(t,r,5,0,Math.PI*2),i.fillStyle=e.color,i.fill(),i.strokeStyle=F.bg,i.lineWidth=2,i.stroke()}),i.fillStyle=F.textDim,i.font=`7px 'JetBrains Mono', monospace`,i.textAlign=`center`,i.fillText(`80Hz`,u.low,o-2),i.fillText(`800Hz`,u.mid,o-2),i.fillText(`6.4kHz`,u.high,o-2)},[e,t]),(0,f.jsx)(`canvas`,{ref:n,width:320,height:160,style:{width:`100%`,height:140,borderRadius:8,background:F.panel,border:`1px solid ${F.border}`}})}function qe({onClose:e}){let[t,n]=(0,l.useState)({low:0,mid:0,high:0}),r=(0,l.useCallback)((e,t)=>{n(n=>({...n,[e]:t}))},[]);return(0,f.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:998,display:`flex`,flexDirection:`column`,background:F.bg,color:F.textPrimary,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${F.border}`,background:F.panel,flexShrink:0},children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,f.jsx)(`button`,{onClick:e,style:{width:34,height:34,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,background:F.surface,border:`1px solid ${F.border}`,color:F.textPrimary,fontSize:16,cursor:`pointer`},children:`✕`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{style:{fontSize:15,fontWeight:600},children:`Global EQ`}),(0,f.jsx)(`div`,{style:{fontSize:10,color:F.textSec,marginTop:1},children:`3-band shelving equalizer`})]})]})}),(0,f.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`,padding:`8px 14px`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,f.jsx)(Ke,{bands:We,values:t}),(0,f.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-around`,gap:8,background:F.surface,borderRadius:8,border:`1px solid ${F.border}`,padding:`16px 8px`},children:We.map(e=>(0,f.jsx)(Ge,{label:e.label,freq:e.freq,value:t[e.key],min:-12,max:12,color:e.color,onChange:t=>r(e.key,t)},e.key))}),(0,f.jsx)(`button`,{onClick:()=>n({low:0,mid:0,high:0}),style:{width:`100%`,padding:`10px 14px`,borderRadius:8,background:F.surface,border:`1px solid ${F.border}`,color:F.textSec,fontSize:11,fontWeight:600,cursor:`pointer`,letterSpacing:`.06em`},children:`Reset EQ to Flat`})]})]})}var Je=``;async function I(e,t,n){let r={method:e,headers:{"Content-Type":`application/json`}};n&&(r.body=JSON.stringify(n));let i=await fetch(`${Je}${t}`,r);if(!i.ok)throw Error(`API ${e} ${t}: ${i.status}`);return i.json()}var Ye={getState:()=>I(`GET`,`/api/state`),getVu:()=>I(`GET`,`/api/vu`),updateBlock:(e,t)=>I(`PATCH`,`/api/block-params`,{id:e,...t}),toggleBlock:(e,t)=>I(`PATCH`,`/api/blocks`,{id:e,enabled:t}),bypassToggle:()=>I(`POST`,`/api/bypass/toggle`),masterVolume:e=>I(`POST`,`/api/volume`,{volume:e/100}),listModels:()=>I(`GET`,`/api/models`),loadModel:e=>I(`POST`,`/api/models/load`,{path:e}),listPresets:()=>I(`GET`,`/api/presets`),getPreset:(e,t)=>I(`GET`,`/api/presets/${e}/${t}`),activatePreset:(e,t)=>I(`POST`,`/api/presets/${e}/${t}/activate`),savePreset:(e,t,n,r)=>I(`PUT`,`/api/presets`,{bank:e,program:t,name:n,tags:r}),searchModels:e=>I(`GET`,`/api/tonehub/search?q=${encodeURIComponent(e)}`),searchIrs:e=>I(`GET`,`/api/tonehub/search/irs?q=${encodeURIComponent(e)}`),installModel:(e,t)=>I(`POST`,`/api/models/tonedownload/install`,{download_url:e,name:t}),installIr:(e,t)=>I(`POST`,`/api/irs/tonedownload/install`,{download_url:e,name:t}),tunerToggle:e=>I(`POST`,`/api/tuner`,{enabled:e})},L={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},Xe={overdrive:[{key:`drive`,label:`Drive`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50},{key:`level`,label:`Level`,min:0,max:100,def:70}],distortion:[{key:`drive`,label:`Drive`,min:0,max:100,def:50},{key:`tone`,label:`Tone`,min:0,max:100,def:40},{key:`level`,label:`Level`,min:0,max:100,def:60}],fuzz:[{key:`fuzz`,label:`Fuzz`,min:0,max:100,def:60},{key:`tone`,label:`Tone`,min:0,max:100,def:30},{key:`level`,label:`Level`,min:0,max:100,def:60}],delay:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],echo:[{key:`time`,label:`Time`,min:0,max:100,def:40},{key:`feedback`,label:`Feedback`,min:0,max:100,def:30},{key:`mix`,label:`Mix`,min:0,max:100,def:35}],reverb:[{key:`decay`,label:`Decay`,min:0,max:100,def:50},{key:`mix`,label:`Mix`,min:0,max:100,def:30},{key:`tone`,label:`Tone`,min:0,max:100,def:50}],chorus:[{key:`rate`,label:`Rate`,min:0,max:100,def:40},{key:`depth`,label:`Depth`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],flanger:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],phaser:[{key:`rate`,label:`Rate`,min:0,max:100,def:30},{key:`depth`,label:`Depth`,min:0,max:100,def:50},{key:`feedback`,label:`Feedback`,min:0,max:100,def:40},{key:`mix`,label:`Mix`,min:0,max:100,def:30}],compressor:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:50},{key:`ratio`,label:`Ratio`,min:1,max:20,def:4},{key:`gain`,label:`Gain`,min:0,max:100,def:50}],gate:[{key:`threshold`,label:`Thresh`,min:0,max:100,def:30},{key:`release`,label:`Release`,min:0,max:100,def:50}],eq:[{key:`low`,label:`Low`,min:-12,max:12,def:0},{key:`mid`,label:`Mid`,min:-12,max:12,def:0},{key:`high`,label:`High`,min:-12,max:12,def:0},{key:`level`,label:`Level`,min:0,max:100,def:70}],cabinet:[{key:`level`,label:`Level`,min:0,max:100,def:75}],ir:[{key:`level`,label:`Level`,min:0,max:100,def:75}],split:[{key:`splitType`,label:`Split Type`,type:`select`,options:[{value:`y`,label:`Y — Split evenly`,pan:!0},{value:`ab`,label:`A/B — Route to A or B`,pan:!1},{value:`cascade`,label:`Cascade — A feeds B`,pan:!0},{value:`a_to_b`,label:`A→B — Serial extension`,pan:!1}],def:`y`},{key:`panA`,label:`Pan A`,min:0,max:100,def:50,conditional:e=>e.splitType!==`ab`},{key:`panB`,label:`Pan B`,min:0,max:100,def:50,conditional:e=>e.splitType!==`ab`},{key:`activePath`,label:`Active Path`,type:`select`,options:[{value:`A`,label:`A`},{value:`B`,label:`B`}],def:`A`,conditional:e=>e.splitType===`ab`}],merge:[{key:`blend`,label:`Blend`,min:0,max:100,def:100},{key:`levelA`,label:`Level A`,min:0,max:100,def:100},{key:`panA`,label:`Pan A`,min:-100,max:100,def:0},{key:`levelB`,label:`Level B`,min:0,max:100,def:100},{key:`panB`,label:`Pan B`,min:-100,max:100,def:0}],looper:h},Ze={overdrive:L.amber,distortion:L.red,fuzz:`#C07030`,delay:L.blue,echo:L.blue,reverb:`#60B0D0`,chorus:L.green,flanger:`#50C080`,phaser:`#80C050`,tremolo:L.green,compressor:`#D09040`,gate:L.textSec,eq:`#7080D0`,cabinet:`#D07090`,ir:`#D07090`,nam:`#E0A040`,boost:L.amber,wah:`#D0A060`,volume:L.textSec,tuner:`#80D0A0`,split:`#B080C0`,merge:`#80B0C0`,looper:m},Qe={overdrive:`OD-808`,distortion:`RAT`,fuzz:`Big Muff`,delay:`Digital Delay`,echo:`Tape Echo`,reverb:`Hall Reverb`,chorus:`Chorus`,flanger:`Flanger`,phaser:`Phase 90`,tremolo:`Tremolo`,compressor:`Compressor`,gate:`Noise Gate`,eq:`EQ`,cabinet:`Cabinet`,ir:`IR Loader`,nam:`NAM Model`,boost:`Clean Boost`,wah:`Wah`,volume:`Volume`,tuner:`Tuner`,loop:`FX Loop`,looper:`Looper`,split:`Split`,merge:`Merge`};function $e(e){return Xe[(e||``).toLowerCase()]||[{key:`level`,label:`Level`,min:0,max:100,def:50}]}function et(e){return Ze[(e||``).toLowerCase()]||L.amber}function tt(e){let t=(e.type||``).toLowerCase();return e.nam_model_path?e.nam_model_path.split(`/`).pop()?.replace(/\.(nam|wav|aiff?)$/i,``)||`NAM Model`:e.ir_file_path?e.ir_file_path.split(`/`).pop()?.replace(/\.(wav|aiff?|ir)$/i,``)||`IR Loader`:Qe[t]||t.charAt(0).toUpperCase()+t.slice(1)}var nt=` + @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap'); + * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; } + html, body { height: 100%; overflow: hidden; background: ${L.bg}; } + body { color: ${L.textPrimary}; font-family: 'Inter', sans-serif; } + :root { --amber: ${L.amber}; --blue: ${L.blue}; --green: ${L.green}; } + .mono { font-family: 'JetBrains Mono', monospace; } + ::-webkit-scrollbar { width: 4px; height: 4px; } + ::-webkit-scrollbar-track { background: ${L.panel}; } + ::-webkit-scrollbar-thumb { background: ${L.border}; border-radius: 2px; } + + /* ── Knob ── */ + .knob-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; } + .knob { border-radius: 50%; position: relative; touch-action: none; } + .knob-inner { border-radius: 50%; width: 100%; height: 100%; position: relative; + background: radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22); + box-shadow: 0 2px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07); } + .knob-dot { position: absolute; width: 3px; border-radius: 2px; background: var(--amber); + left: 50%; transform-origin: bottom center; box-shadow: 0 0 6px var(--amber); } + .knob-label { font-size: 9px; color: ${L.textSec}; letter-spacing: .06em; text-transform: uppercase; text-align: center; } + .knob-value { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: ${L.amber}; } + + /* ── Buttons ── */ + .btn { padding: 8px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; + letter-spacing: .04em; border: none; cursor: pointer; transition: all .12s; } + .btn-primary { background: ${L.amber}; color: #000; } + .btn-primary:active { filter: brightness(.85); transform: scale(.97); } + .btn-ghost { background: ${L.surface}; color: ${L.textPrimary}; border: 1px solid ${L.border}; } + .btn-ghost:active { background: ${L.border}; } + .btn-icon { width: 32px; height: 32px; border-radius: 7px; display: flex; align-items: center; + justify-content: center; background: ${L.surface}; border: 1px solid ${L.border}; cursor: pointer; + font-size: 15px; transition: all .12s; flex-shrink: 0; } + .btn-icon:active { transform: scale(.93); } + .btn-icon.active { background: rgba(232,160,48,.15); border-color: ${L.amber}; color: ${L.amber}; } + + /* ── Badge ── */ + .badge { display: inline-flex; align-items: center; justify-content: center; + padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; + letter-spacing: .06em; text-transform: uppercase; } + .badge-amber { background: rgba(232,160,48,.2); color: ${L.amber}; } + .badge-green { background: rgba(58,184,122,.2); color: ${L.green}; } + .badge-blue { background: rgba(58,123,168,.2); color: ${L.blue}; } + + /* ── Param slider ── */ + .param-panel { background: ${L.surface}; padding: 8px 12px 6px; border-top: 1px solid ${L.border}; flex-shrink: 0; } + .param-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; } + .param-panel-title { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: ${L.textSec}; } + .param-row { display: flex; flex-direction: column; gap: 1px; padding: 1px 0; } + .param-header { display: flex; justify-content: space-between; align-items: center; } + .param-label { font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: ${L.textSec}; } + .param-val { font-family: 'JetBrains Mono',monospace; font-size: 11px; font-weight: 600; } + .param-track-wrap { position: relative; height: 30px; display: flex; align-items: center; cursor: pointer; touch-action: none; } + .param-track { width: 100%; height: 6px; background: ${L.border}; border-radius: 3px; position: relative; overflow: hidden; } + .param-fill { height: 100%; border-radius: 3px; position: absolute; top: 0; left: 0; transition: width .04s; } + .param-thumb { width: 22px; height: 22px; border-radius: 50%; position: absolute; top: 50%; + transform: translate(-50%,-50%); box-shadow: 0 1px 6px rgba(0,0,0,.6); pointer-events: none; + border: 3px solid ${L.bg}; } + .param-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid ${L.border}; + background: ${L.panel}; color: ${L.textPrimary}; font-size: 14px; font-weight: 700; + display: flex; align-items: center; justify-content: center; cursor: pointer; line-height: 1; } + .param-btn:active { background: ${L.border}; transform: scale(.92); } + .param-knobs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 4px 0; } + + /* ── Screen header (overlays) ── */ + .screen-header { padding: 10px 14px 8px; display: flex; align-items: center; + justify-content: space-between; border-bottom: 1px solid ${L.border}; } + .screen-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: ${L.textSec}; } + .screen-body { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; } + + /* ── Preset sidebar chip ── */ + .preset-chip-s { width: 100%; padding: 7px 6px; border-radius: 5px; background: ${L.surface}; border: 1px solid ${L.border}; + display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: all .12s; } + .preset-chip-s.active { border-color: ${L.amber}; background: rgba(232,160,48,.08); } + .preset-chip-s:active { transform: scale(.96); } + .preset-chip-s .pcs-num { font-family: 'JetBrains Mono',monospace; font-size: 14px; font-weight: 700; color: ${L.amber}; line-height: 1.1; } + .preset-chip-s .pcs-name { font-size: 9px; color: ${L.textSec}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; line-height: 1.2; } + .preset-chip-s .pcs-indicator { width: 4px; height: 4px; border-radius: 50%; margin-top: 3px; } + + /* ── Preset row (captures) ── */ + .preset-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; + border-radius: 6px; cursor: pointer; transition: background .12s; border: 1px solid transparent; } + .preset-row:active, .preset-row.active { background: rgba(232,160,48,.08); border-color: rgba(232,160,48,.25); } + .section-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; + color: ${L.textDim}; font-weight: 600; margin-bottom: 8px; } + .card { background: ${L.panel}; border: 1px solid ${L.border}; border-radius: 8px; padding: 14px; } + .card-sm { background: ${L.surface}; border: 1px solid ${L.border}; border-radius: 6px; padding: 10px; } +`+x;function rt({label:e,value:t=50,onChange:n,size:r=48,color:i=L.amber,min:a=0,max:o=100}){let s=(0,l.useRef)(null),c=(t-a)/(o-a),u=-140+c*280,d=r*.38,p=r*.5-d,m=e=>{e.preventDefault(),s.current={y:e.touches?e.touches[0].clientY:e.clientY,val:t};let r=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,r=(s.current.y-t)/120,i=Math.max(a,Math.min(o,s.current.val+r*(o-a)));n?.(Math.round(i))},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),window.removeEventListener(`touchmove`,r),window.removeEventListener(`touchend`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i),window.addEventListener(`touchmove`,r,{passive:!1}),window.addEventListener(`touchend`,i)},h=r+12,g=h/2,_=h/2,v=r/2+3,y=g+v*Math.cos(Math.PI/180*-230),b=_+v*Math.sin(Math.PI/180*-230),x=g+v*Math.cos((u-90)*(Math.PI/180)),S=_+v*Math.sin((u-90)*(Math.PI/180)),C=+(c*280>180);return(0,f.jsxs)(`div`,{className:`knob-wrap`,style:{width:r+12},children:[(0,f.jsxs)(`div`,{className:`knob`,style:{width:r,height:r},onMouseDown:m,onTouchStart:m,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-6,width:h,height:h,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:g,cy:_,r:v,fill:`none`,stroke:L.border,strokeWidth:`2`,strokeLinecap:`round`,opacity:`.5`}),c>0&&(0,f.jsx)(`path`,{d:`M ${y} ${b} A ${v} ${v} 0 ${C} 1 ${x} ${S}`,fill:`none`,stroke:i,strokeWidth:`2`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 3px ${i})`}})]}),(0,f.jsx)(`div`,{className:`knob-inner`,style:{"--amber":i},children:(0,f.jsx)(`div`,{className:`knob-dot`,style:{height:d,top:p,transform:`translateX(-50%) rotate(${u}deg)`,transformOrigin:`50% ${d}px`}})})]}),(0,f.jsx)(`div`,{className:`knob-value mono`,style:{color:i},children:t}),(0,f.jsx)(`div`,{className:`knob-label`,children:e})]})}function it({label:e,value:t=50,onChange:n,onChangeEnd:r,min:i=0,max:a=100,color:o=L.amber}){let s=(0,l.useRef)(null),c=(0,l.useRef)(!1),u=(0,l.useRef)(t),d=(0,l.useRef)(n),p=(0,l.useRef)(r),m=(t-i)/(a-i)*100;(0,l.useEffect)(()=>{d.current=n},[n]),(0,l.useEffect)(()=>{p.current=r},[r]);let h=(0,l.useCallback)(e=>{let n=s.current;if(!n)return t;let r=n.getBoundingClientRect(),o=(e.touches?e.touches[0].clientX:e.clientX)-r.left;return Math.round(i+Math.max(0,Math.min(1,o/r.width))*(a-i))},[i,a,t]);(0,l.useEffect)(()=>{let e=e=>{if(!c.current)return;e.preventDefault();let t=h(e);u.current=t,d.current?.(t)},t=()=>{c.current&&=(p.current?.(u.current),!1)};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[h]);let g=e=>{e.preventDefault();let t=h(e);u.current=t,c.current=!0,d.current?.(t)},_=e=>n=>{n.preventDefault(),n.stopPropagation();let r=Math.max(i,Math.min(a,t+e));d.current?.(r),p.current?.(r)};return(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsxs)(`div`,{className:`param-header`,children:[(0,f.jsx)(`span`,{className:`param-label`,style:{color:o},children:e}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4,alignItems:`center`},children:[(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:_(-5),onTouchStart:_(-5),children:`−`}),(0,f.jsx)(`span`,{className:`param-val`,style:{color:o},children:t}),(0,f.jsx)(`button`,{className:`param-btn`,onMouseDown:_(5),onTouchStart:_(5),children:`+`})]})]}),(0,f.jsx)(`div`,{className:`param-track-wrap`,ref:s,onMouseDown:g,onTouchStart:g,children:(0,f.jsxs)(`div`,{className:`param-track`,children:[(0,f.jsx)(`div`,{className:`param-fill`,style:{width:`${m}%`,background:o}}),(0,f.jsx)(`div`,{className:`param-thumb`,style:{left:`${m}%`,background:o}})]})})]})}function at({def:e,value:t,color:n,onChange:r}){return(0,f.jsxs)(`div`,{className:`param-row`,children:[(0,f.jsx)(`div`,{className:`param-header`,children:(0,f.jsx)(`span`,{className:`param-label`,style:{color:n},children:e.label})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,flexWrap:`wrap`,background:`#0A0A10`,borderRadius:6,padding:4},children:(e.options||[]).map(e=>(0,f.jsx)(`button`,{onClick:()=>r?.(e.value),style:{flex:1,padding:`5px 8px`,borderRadius:4,border:`none`,fontSize:10,fontWeight:600,cursor:`pointer`,background:t===e.value?n:`transparent`,color:t===e.value?`#000`:`#8888A0`,transition:`all .1s`,letterSpacing:`.03em`,whiteSpace:`nowrap`},children:e.label},e.value))})]})}function ot({block:e,params:t,onParamChange:n,onParamChangeEnd:r,viewMode:i,onToggleView:a,onFocus:o,onModelBrowser:s}){let c=$e(e.type),l=et(e.type),u=c.filter(e=>!e.conditional||e.conditional(t));return(0,f.jsxs)(`div`,{className:`param-panel`,children:[(0,f.jsxs)(`div`,{className:`param-panel-header`,children:[(0,f.jsxs)(`span`,{className:`param-panel-title`,style:{cursor:s?`pointer`:`default`},onClick:()=>s?.(e.id),children:[(0,f.jsx)(`span`,{style:{color:l},children:`●`}),` `,e.name||e.type||``,s&&(0,f.jsx)(`span`,{style:{marginLeft:4,fontSize:8,color:L.textDim},children:`▼`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4,alignItems:`center`},children:[o&&(0,f.jsx)(`button`,{className:`btn`,style:{padding:`4px 8px`,fontSize:9,fontWeight:600,background:`${L.amber}22`,border:`1px solid ${L.amber}44`,color:L.amber,borderRadius:5,letterSpacing:`.04em`,cursor:`pointer`},onClick:o,children:`🔍 Focus`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:26,height:26,fontSize:11,flexShrink:0},onClick:a,children:i===`slider`?`◉`:`▦`})]})]}),i===`slider`?u.map(e=>e.type===`select`?(0,f.jsx)(at,{def:e,value:t[e.key]==null?e.def:t[e.key],color:l,onChange:t=>{n?.(e.key,t),r?.(e.key,t)}},e.key):(0,f.jsx)(it,{label:e.label,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,color:l,onChange:t=>n?.(e.key,t),onChangeEnd:t=>r?.(e.key,t)},e.key)):u.filter(e=>e.type!==`select`).length>0&&(0,f.jsx)(`div`,{className:`param-knobs`,children:u.filter(e=>e.type!==`select`).map(e=>(0,f.jsx)(rt,{label:e.label,value:t[e.key]==null?e.def:t[e.key],min:e.min,max:e.max,size:48,color:l,onChange:t=>{n?.(e.key,t),r?.(e.key,t)}},e.key))})]})}function st({level:e=0,height:t=24,vertical:n=!1}){let r=Math.round(e/100*12),i=e=>e>=10?L.red:e>=8?`#E8C030`:L.green;return n?(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column-reverse`,gap:1,height:t,alignItems:`center`},children:Array.from({length:12}).map((e,n)=>(0,f.jsx)(`div`,{style:{width:4,height:(t-12)/12,borderRadius:1,background:n(0,f.jsx)(`div`,{style:{flex:1,height:`100%`,borderRadius:1,background:t{Ye.listModels().then(e=>c(e.models||[])).catch(()=>{})},[]);let p=async()=>{if(r.trim()){d(!0);try{o((t===`models`?await Ye.searchModels(r):await Ye.searchIrs(r)).results||[])}catch{o([])}d(!1)}},m=async e=>{try{t===`models`?await Ye.installModel(e.download_url,e.name):await Ye.installIr(e.download_url,e.name),Ye.listModels().then(e=>c(e.models||[])).catch(()=>{})}catch(e){alert(`Install failed: `+e.message)}};return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,background:L.bg},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Downloads`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:28,height:28,fontSize:13},onClick:e,children:`✕`})]}),(0,f.jsx)(`div`,{style:{padding:`6px 12px`,borderBottom:`1px solid ${L.border}`},children:(0,f.jsxs)(`div`,{className:`toggle`,children:[(0,f.jsx)(`button`,{className:`toggle-btn ${t===`models`?`active`:``}`,onClick:()=>n(`models`),children:`NAM Models`}),(0,f.jsx)(`button`,{className:`toggle-btn ${t===`irs`?`active`:``}`,onClick:()=>n(`irs`),children:`IR Cabs`})]})}),(0,f.jsxs)(`div`,{style:{padding:`6px 12px`,display:`flex`,gap:6,borderBottom:`1px solid ${L.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,background:L.surface,borderRadius:6,border:`1px solid ${L.border}`,padding:`6px 10px`,gap:6,alignItems:`center`},children:[(0,f.jsx)(`span`,{style:{color:L.textDim,fontSize:11},children:`🔍`}),(0,f.jsx)(`input`,{placeholder:`Search ${t===`models`?`NAM models`:`IR cabs`}...`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>e.key===`Enter`&&p(),style:{flex:1,background:`none`,border:`none`,color:L.textPrimary,fontSize:12,outline:`none`}})]}),(0,f.jsx)(`button`,{className:`btn btn-primary`,style:{padding:`6px 11px`,fontSize:11},onClick:p,children:u?`...`:`Search`})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[a===null&&s.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Installed Models`}),s.map((e,t)=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{cursor:`default`},children:[(0,f.jsx)(`div`,{style:{width:26,height:26,borderRadius:5,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:11,background:e.loaded?`${L.green}22`:L.surface,color:e.loaded?L.green:L.textDim},children:`🎛`}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:L.textDim},children:[e.architecture,`·`,e.size_mb,`MB`,e.loaded?`· CURRENT`:``]})]})]},t))]}),a!==null&&a.length===0&&(0,f.jsx)(`div`,{className:`card-sm`,style:{textAlign:`center`,color:L.textDim,padding:20},children:`No results found`}),a!==null&&a.map((e,t)=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{cursor:`default`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:L.textDim},children:[e.author,`·`,e.size_display]})]}),(0,f.jsx)(`button`,{className:`btn btn-ghost`,style:{padding:`4px 9px`,fontSize:11},onClick:()=>m(e),children:`Get`})]},t))]})]})}var lt=[{id:`gate`,type:`gate`,name:`Noise Gate`,bypassed:!1,params:{threshold:40,release:25,depth:70,mix:100}},{id:`split`,type:`split`,name:`Split`,bypassed:!1,params:{splitType:`y`,panA:50,panB:50,activePath:`A`}},{id:`drive_a`,type:`overdrive`,name:`OD-808`,path:`A`,bypassed:!1,params:{drive:65,tone:55,level:70}},{id:`delay_a`,type:`delay`,name:`Digital Delay`,path:`A`,bypassed:!1,params:{time:45,feedback:25,mix:40}},{id:`fuzz_b`,type:`fuzz`,name:`Big Muff`,path:`B`,bypassed:!1,params:{fuzz:75,tone:40,level:65}},{id:`merge`,type:`merge`,name:`Merge`,bypassed:!1,params:{blend:100,levelA:100,panA:0,levelB:100,panB:0}},{id:`reverb`,type:`reverb`,name:`Hall Reverb`,bypassed:!1,params:{decay:60,mix:35,tone:50}},{id:`looper1`,type:`looper`,name:`Looper`,bypassed:!1,params:{level:80,maxTime:8,fade:30,sync:`off`}}],ut=[{num:1,bank:1,name:`Plexi Crunch`},{num:2,bank:1,name:`Modern Hi-Gain`},{num:3,bank:1,name:`Clean Chime`},{num:4,bank:1,name:`Blues Drive`},{num:5,bank:2,name:`Metal Djent`},{num:6,bank:2,name:`Funky Wah`},{num:7,bank:2,name:`Ambient Pad`},{num:8,bank:2,name:`Shoegaze`}];function dt(){let[e,t]=(0,l.useState)(`main`),[n,r]=(0,l.useState)({connected:!1,master_volume:.72,routing_mode:`mono`,cpu_percent:0}),[i,a]=(0,l.useState)(lt),[o,s]=(0,l.useState)(`gate`),[c,u]=(0,l.useState)({}),[d,p]=(0,l.useState)(`slider`),[m,h]=(0,l.useState)(0),[_,v]=(0,l.useState)(1),[y,x]=(0,l.useState)(1),[S,C]=(0,l.useState)(ut),[w,ee]=(0,l.useState)(!1),[te,ne]=(0,l.useState)(!1),[T,re]=(0,l.useState)(null),[ie,ae]=(0,l.useState)(null),[oe,se]=(0,l.useState)(`stomp`),ce=g(),[E,D]=(0,l.useState)([]),[ue,O]=(0,l.useState)([]),fe=(0,l.useRef)({blocks:lt,blockParams:{},selectedBlockId:`gate`}),k=(0,l.useRef)(null);(0,l.useEffect)(()=>{fe.current={blocks:i,blockParams:c,selectedBlockId:o}},[i,c,o]);let A=(0,l.useCallback)(()=>{let e=fe.current,t={blocks:e.blocks.map(e=>({...e,params:{...e.params}})),blockParams:Object.fromEntries(Object.entries(e.blockParams).map(([e,t])=>[e,{...t}])),selectedBlockId:e.selectedBlockId};D(e=>[...e.slice(-49),t]),O([])},[]),j=(0,l.useCallback)(()=>{k.current||=(A(),setTimeout(()=>{k.current=null},400))},[A]),me=(0,l.useCallback)(()=>{D(e=>{if(e.length===0)return e;let t=fe.current,n={blocks:t.blocks.map(e=>({...e,params:{...e.params}})),blockParams:Object.fromEntries(Object.entries(t.blockParams).map(([e,t])=>[e,{...t}])),selectedBlockId:t.selectedBlockId};O(e=>[...e,n]);let r=e[e.length-1];return a(r.blocks),u(r.blockParams),s(r.selectedBlockId),e.slice(0,-1)})},[]),he=(0,l.useCallback)(()=>{O(e=>{if(e.length===0)return e;let t=fe.current,n={blocks:t.blocks.map(e=>({...e,params:{...e.params}})),blockParams:Object.fromEntries(Object.entries(t.blockParams).map(([e,t])=>[e,{...t}])),selectedBlockId:t.selectedBlockId};D(e=>[...e,n]);let r=e[e.length-1];return a(r.blocks),u(r.blockParams),s(r.selectedBlockId),e.slice(0,-1)})},[]),[ge,_e]=(0,l.useState)(!1),[ve,ye]=(0,l.useState)(null),be=(0,l.useCallback)(e=>{switch(_e(!1),e){case`settings`:ye(`settings`);break;case`eq`:ye(`eq`);break;case`tuner`:r(e=>({...e,tuner_enabled:!0})),Ye.tunerToggle(!0).catch(()=>{});break;default:break}},[]),xe=(0,l.useRef)(!1),Se=(0,l.useRef)(!1),M=(0,l.useCallback)(async()=>{try{let e=await Ye.getState();r(e),e.input_level!=null&&h(e.input_level),e.current_preset?.name&&!xe.current&&v(e.current_preset.program==null?_:e.current_preset.program+1),e.blocks&&e.blocks.length>0&&!Se.current&&a(e.blocks)}catch{}},[_]);(0,l.useEffect)(()=>{M();let e=setInterval(M,3e3);return()=>clearInterval(e)},[M]),(0,l.useEffect)(()=>{let e=setInterval(()=>{h(e=>Math.max(0,Math.min(100,e+(Math.random()-.45)*8)))},150);return()=>clearInterval(e)},[]),(0,l.useEffect)(()=>{Ye.listPresets().then(e=>{if(e?.banks){let t=[];e.banks.forEach(e=>{(e.presets||[]).forEach((n,r)=>{n&&t.push({num:r+1,bank:e.number,name:n.name,chain:n.chain})})}),t.length>0&&C(t)}}).catch(()=>{})},[]);let we=(0,l.useCallback)(async(e,t)=>{xe.current=!0,ne(!0);try{await Ye.activatePreset(e,t),await new Promise(e=>setTimeout(e,300));let n=await Ye.getState();r(n),n.current_preset?.name&&v(n.current_preset.program==null?t+1:n.current_preset.program+1);try{let n=await Ye.getPreset(e,t);n?.chain&&n.chain.length>0&&(a(n.chain.map((e,t)=>{let n={type:e.fx_type||`fx`,enabled:e.enabled!==!1,params:e.params||{},nam_model_path:e.nam_model_path,ir_file_path:e.ir_file_path};return{id:e.id||`block_${e.fx_type||`fx`}_${t}`,type:n.type,name:tt(n),bypassed:!e.enabled,enabled:n.enabled,params:n.params,nam_model_path:n.nam_model_path,ir_file_path:n.ir_file_path}})),Se.current=!0)}catch(e){console.warn(`Could not fetch chain:`,e)}s(null)}catch(e){console.warn(`Preset activate failed:`,e)}ne(!1),setTimeout(()=>{xe.current=!1},5e3),setTimeout(()=>{Se.current=!1},5e3)},[]),Te=(0,l.useCallback)(async e=>{let t=S.find(t=>t.num===e);t&&(v(e),await we(t.bank||1,e-1))},[S,we]),Ee=(0,l.useMemo)(()=>i.find(e=>e.id===o),[i,o]);(0,l.useEffect)(()=>{if(Ee&&c[o]==null){let e=$e(Ee.type),t={};e.forEach(e=>{t[e.key]=Ee.params?.[e.key]==null?e.def:Ee.params[e.key]}),u(e=>({...e,[o]:t}))}},[o,Ee,c]);let De=(0,l.useCallback)(e=>{s(t=>t===e?null:e)},[]),Oe=(0,l.useCallback)((e,t,n)=>{j(),u(r=>({...r,[e]:{...r[e]||{},[t]:n}}))},[j]),ke=(0,l.useCallback)(e=>{A(),Se.current=!0,a(t=>t.map(t=>t.id===e?{...t,bypassed:!t.bypassed}:t)),Ye.toggleBlock(e,!1).catch(()=>{}),setTimeout(()=>{Se.current=!1},3e3)},[A]),Ae=(0,l.useCallback)((e,t,n)=>{Ye.updateBlock(e,{[t]:n}).catch(()=>{})},[]),je=(0,l.useCallback)((e,t)=>{A(),a(n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r})},[A]),Me=(0,l.useCallback)(()=>{A(),Se.current=!0;let e=`block_`+Date.now();a(t=>[...t,{id:e,type:`overdrive`,name:`New Drive`,bypassed:!1,params:{drive:30,tone:50,level:70}}]),setTimeout(()=>{Se.current=!1},3e3)},[A]),Ne=(0,l.useCallback)(e=>{A(),Se.current=!0,a(t=>t.filter(t=>t.id!==e)),o===e&&s(null),setTimeout(()=>{Se.current=!1},3e3)},[A,o]),Fe=(0,l.useMemo)(()=>S.filter(e=>e.bank===y),[S,y]),N=String.fromCharCode(64+y),Ie=(0,l.useCallback)(()=>{let e=Math.min(y+1,8);x(e);let t=S.filter(t=>t.bank===e);t.length>0&&we(t[0].bank,t[0].num-1)},[y,S,we]),P=(0,l.useCallback)(()=>{let e=Math.max(y-1,1);x(e);let t=S.filter(t=>t.bank===e);t.length>0&&we(t[0].bank,t[0].num-1)},[y,S,we]),Re=(0,l.useCallback)(()=>{ee(e=>!e),Ye.bypassToggle().catch(()=>{})},[]),ze=(0,l.useCallback)(()=>{let e=!n.tuner_enabled;r(t=>({...t,tuner_enabled:e})),Ye.tunerToggle(e).catch(()=>{}),e&&t(`main`)},[n.tuner_enabled]),Be=(0,l.useCallback)(()=>{Se.current=!0;let e=T;e&&(a(t=>t.map(t=>t.id===e?{...t,bypassed:!t.bypassed}:t)),Ye.toggleBlock(e,!1).catch(()=>{}),setTimeout(()=>{Se.current=!1},3e3))},[T]),Ve=(0,l.useCallback)(e=>{ae(e),T&&re(null)},[T]),He=(0,l.useCallback)(({type:e,name:t,modelPath:n,isBuiltin:r})=>{let i=ie;i&&(A(),Se.current=!0,a(a=>a.map(a=>{if(a.id!==i)return a;let o=$e(e),s={};return o.forEach(e=>{s[e.key]=e.def}),{...a,type:e,name:t||tt({type:e}),params:s,nam_model_path:!r&&n&&e===`nam`?n:void 0,ir_file_path:!r&&n&&e===`ir`?n:void 0}})),ae(null),u(e=>{let t={...e};return delete t[i],t}),setTimeout(()=>{Se.current=!1},3e3))},[ie,A]),F=(0,l.useCallback)((e,t)=>{if(!i.find(e=>e.id===t))return;let n=c[t]?.maxTime??8;switch(e){case`record`:ce.record(t,n);break;case`play`:ce.play(t,n);break;case`overdub`:ce.overdub(t,n);break;case`stop`:ce.stop(t);break;case`clear`:ce.clearLoop(t);break;case`undo`:ce.undoLast(t);break}},[i,c,ce]),We=(0,l.useCallback)(e=>({onRecord:()=>F(`record`,e),onPlay:()=>F(`play`,e),onOverdub:()=>F(`overdub`,e),onStop:()=>F(`stop`,e),onClear:()=>F(`clear`,e),onUndo:()=>F(`undo`,e)}),[F]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`style`,{children:nt}),(0,f.jsxs)(`div`,{style:{width:`100%`,height:`100vh`,display:`flex`,flexDirection:`column`,background:L.bg,overflow:`hidden`,fontFamily:`'Inter',sans-serif`,margin:`0 auto`,maxWidth:980},children:[e===`main`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 12px`,background:L.panel,borderBottom:`1px solid ${L.border}`,flexShrink:0,minHeight:32},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(`div`,{style:{width:6,height:6,borderRadius:`50%`,background:n.connected?L.green:L.red,boxShadow:`0 0 6px ${n.connected?L.green:L.red}`}}),(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:9,color:L.textSec},children:n.connected?`CONNECTED`:`OFFLINE`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:20,height:20,fontSize:11,opacity:E.length>0?1:.3},onClick:me,disabled:E.length===0,title:`Undo (Ctrl+Z)`,children:`↶`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:20,height:20,fontSize:11,opacity:ue.length>0?1:.3},onClick:he,disabled:ue.length===0,title:`Redo (Ctrl+Shift+Z)`,children:`↷`}),(0,f.jsx)(`div`,{style:{width:1,height:12,background:L.border}}),(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:10,color:L.textPrimary,fontWeight:600},children:n.current_preset?.name||S.find(e=>e.num===_)?.name||`—`}),te&&(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:8,color:L.amber},children:`⟳`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsx)(st,{level:m,height:24}),(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:9,color:L.textDim},children:[`CPU `,n.cpu_percent==null?`—`:`${n.cpu_percent}%`]})]}),(0,f.jsx)(`div`,{style:{width:1,height:12,background:L.border}}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`},onClick:()=>t(`captures`),title:`Downloads`,children:(0,f.jsx)(`img`,{src:`/ui/img/ic_bank.svg`,alt:`captures`,style:{width:14,height:14,filter:`invert(1) brightness(2)`}})}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`},onClick:()=>t(`presets`),title:`Presets`,children:(0,f.jsx)(`img`,{src:`/ui/img/ic_presets.svg`,alt:`presets`,style:{width:14,height:14,filter:`invert(1) brightness(2)`}})}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:2,alignItems:`center`,background:L.surface,borderRadius:4,border:`1px solid ${L.border}`,padding:2,height:24},children:[`stomp`,`preset`].map(e=>(0,f.jsx)(`button`,{onClick:()=>se(e),style:{padding:`1px 5px`,borderRadius:3,border:`none`,height:20,fontSize:8,fontWeight:700,letterSpacing:`.04em`,textTransform:`uppercase`,background:oe===e?L.amber:`transparent`,color:oe===e?`#000`:L.textDim,cursor:`pointer`,lineHeight:1.5,minWidth:34,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e===`stomp`?`SM`:`PR`},e))}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`,background:n.tuner_enabled?`rgba(128,208,160,.15)`:L.surface,borderColor:n.tuner_enabled?L.green:L.border},onClick:ze,title:n.tuner_enabled?`Exit Tuner`:`Tuner`,children:(0,f.jsx)(`img`,{src:`/ui/img/fx_analyzer.svg`,alt:`tuner`,style:{width:14,height:14,filter:n.tuner_enabled?`invert(0.9) brightness(2) sepia(0.4) hue-rotate(80deg)`:`invert(1) brightness(2)`}})}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`,background:`rgba(232,160,48,.12)`,borderColor:L.amber},onClick:()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()},title:`Fullscreen`,children:(0,f.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`#E8A030`,children:(0,f.jsx)(`path`,{d:`M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z`})})}),(0,f.jsx)(`div`,{style:{width:1,height:16,background:L.border}}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:24,height:24,position:`relative`},onClick:()=>_e(!0),title:`Main Menu`,children:(0,f.jsx)(`span`,{style:{fontSize:14,color:L.textSec,lineHeight:1},children:`☰`})})]})]}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,overflow:`hidden`},children:[(0,f.jsxs)(`div`,{style:{width:90,flexShrink:0,background:L.surface,borderRight:`1px solid ${L.border}`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,f.jsxs)(`div`,{style:{padding:`6px 8px`,textAlign:`center`,borderBottom:`1px solid ${L.border}`,background:L.panel},children:[(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:14,fontWeight:700,color:L.amber},children:[`Bank `,N]}),(0,f.jsx)(`div`,{style:{fontSize:9,color:L.textDim,letterSpacing:`.06em`,textTransform:`uppercase`},children:`Programs`})]}),(0,f.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`4px 6px`,display:`flex`,flexDirection:`column`,gap:3},children:Fe.map(e=>(0,f.jsxs)(`div`,{className:`preset-chip-s ${e.num===_?`active`:``}`,onClick:()=>Te(e.num),children:[(0,f.jsxs)(`div`,{className:`pcs-num`,children:[`0`,e.num]}),(0,f.jsx)(`div`,{className:`pcs-name`,children:e.name}),(0,f.jsx)(`div`,{className:`pcs-indicator`,style:{background:e.num===_?L.amber:L.border}})]},e.num))})]}),(0,f.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,overflow:`hidden`,minWidth:0},children:[(0,f.jsx)(`div`,{style:{display:`flex`,gap:4,padding:`3px 8px`,background:L.surface,borderBottom:`1px solid ${L.border}`,flexShrink:0},children:[{label:`Preset`,value:S.find(e=>e.num===_)?.name||`—`},{label:`Routing`,value:(n.routing_mode||`MONO`).toUpperCase()},{label:`Volume`,value:n.master_volume==null?`—`:`${Math.round(n.master_volume*100)}%`},{label:`Bank`,value:N}].map(e=>(0,f.jsxs)(`div`,{style:{flex:1,textAlign:`center`,padding:`2px 6px`,borderRadius:3,background:L.panel,border:`1px solid ${L.border}`},children:[(0,f.jsx)(`div`,{style:{fontSize:7,color:L.textDim,letterSpacing:`.06em`,textTransform:`uppercase`},children:e.label}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:10,fontWeight:600,color:L.amber,marginTop:1},children:e.value})]},e.label))}),(0,f.jsx)(`div`,{style:{flex:Ee?`0 0 auto`:1,overflow:`hidden`},children:(0,f.jsx)(le,{blocks:i,selectedBlockId:o,onSelectBlock:De,onToggleBlock:ke,onReorder:je,onAddBlock:Me,onRemoveBlock:Ne,onModelBrowser:Ve,looperStores:ce.stores})}),Ee&&c[o]?(Ee.type||``).toLowerCase()===`looper`?(0,f.jsx)(b,{block:Ee,params:c[o]||{},looperStore:ce.getStore(o),onParamChange:(e,t)=>Oe(o,e,t),onParamChangeEnd:(e,t)=>Ae(o,e,t),looperActions:We(o)}):(0,f.jsx)(ot,{block:Ee,params:c[o]||{},viewMode:d,onToggleView:()=>p(e=>e===`slider`?`knob`:`slider`),onParamChange:(e,t)=>Oe(o,e,t),onParamChangeEnd:(e,t)=>Ae(o,e,t),onFocus:()=>re(o),onModelBrowser:Ve}):(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,background:L.bg,color:L.textDim,fontSize:11},children:`Tap a block to edit parameters`})]})]}),(()=>{let e=i.find(e=>e.id===o),t=e&&(e.type||``).toLowerCase()===`looper`;return(0,f.jsx)(de,{mode:oe,blocks:i,selectedBlockId:o,currentBank:N,currentPreset:_,presets:Fe,onSelectBlock:De,onToggleBlock:ke,onBankUp:Ie,onBankDown:P,onGlobalBypass:Re,globalBypass:w,onTunerToggle:ze,tunerEnabled:n.tuner_enabled,onPresetClick:e=>{let t=Fe[parseInt(e)];t&&we(t.bank,t.num-1)},looperActive:t,looperTransport:t?We(o):void 0})})()]}),T&&i.find(e=>e.id===T)&&c[T]&&(0,f.jsx)(Ce,{block:i.find(e=>e.id===T),params:c[T]||{},viewMode:d,onClose:()=>re(null),onParamChange:(e,t)=>Oe(T,e,t),onParamChangeEnd:(e,t)=>Ae(T,e,t),onToggleView:()=>p(e=>e===`slider`?`knob`:`slider`),onToggleBypass:Be,onOpenModelBrowser:()=>Ve(T)}),e===`captures`&&(0,f.jsx)(ct,{onClose:()=>t(`main`)}),e===`presets`&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,background:L.bg},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Presets`}),(0,f.jsx)(`button`,{className:`btn-icon`,style:{width:28,height:28,fontSize:13},onClick:()=>t(`main`),children:`✕`})]}),(0,f.jsx)(`div`,{className:`screen-body`,children:S.map((e,n)=>(0,f.jsxs)(`div`,{className:`preset-row ${e.num===_?`active`:``}`,onClick:()=>{Te(e.num),t(`main`)},children:[(0,f.jsx)(`div`,{className:`mono`,style:{width:26,height:26,borderRadius:5,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:11,fontWeight:700,background:e.num===_?`${L.amber}22`:L.surface,color:e.num===_?L.amber:L.textDim,border:`1px solid ${e.num===_?L.amber+`60`:L.border}`},children:e.num}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:12,fontWeight:600},children:e.name}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:9,color:L.textDim},children:[`Bank `,e.bank||1,`·Program `,e.num-1]})]}),e.num===_&&(0,f.jsx)(`span`,{style:{color:L.amber,fontSize:16},children:`●`})]},n))})]}),n.tuner_enabled&&(0,f.jsx)(pe,{tunerData:n,connected:n.connected,onExit:()=>{r(e=>({...e,tuner_enabled:!1})),Ye.tunerToggle(!1).catch(()=>{})}}),ie&&(()=>{let e=i.find(e=>e.id===ie);return e?(0,f.jsx)(Pe,{currentBlockType:e.type,currentBlockName:e.name,currentModelPath:e.nam_model_path||e.ir_file_path,onSelectModel:He,onClose:()=>ae(null)}):null})(),ge&&(0,f.jsx)(Le,{onClose:()=>_e(!1),onItemSelect:be}),ve===`settings`&&(0,f.jsx)(Ue,{onClose:()=>ye(null),onMasterVolume:e=>Ye.masterVolume(e).catch(()=>{})}),ve===`eq`&&(0,f.jsx)(qe,{onClose:()=>ye(null)})]})]})}(0,u.createRoot)(document.getElementById(`root`)).render((0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(dt,{})})); \ No newline at end of file diff --git a/src/web/ui-dist/assets/index-KiuVvch8.js b/src/web/ui-dist/assets/index-KiuVvch8.js new file mode 100644 index 0000000..6336e50 --- /dev/null +++ b/src/web/ui-dist/assets/index-KiuVvch8.js @@ -0,0 +1,184 @@ +var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function w(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function T(e,t){return w(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ae(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=T(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,E());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var ee=!1,S=-1,C=5,te=-1;function w(){return g?!0:!(e.unstable_now()-tet&&w());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?E():ee=!1}}}var E;if(typeof y==`function`)E=function(){y(T)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,ne=D.port2;D.port1.onmessage=T,E=function(){ne.postMessage(null)}}else E=function(){_(T,0)};function re(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,E()))),r},e.unstable_shouldYield=w,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1ue||(e.current=le[ue],le[ue]=null,ue--)}function j(e,t){ue++,le[ue]=e.current,e.current=t}var fe=de(null),pe=de(null),me=de(null),he=de(null);function ge(e,t){switch(j(me,t),j(pe,e),j(fe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}A(fe),j(fe,e)}function _e(){A(fe),A(pe),A(me)}function ve(e){e.memoizedState!==null&&j(he,e);var t=fe.current,n=Hd(t,e.type);t!==n&&(j(pe,e),j(fe,n))}function ye(e){pe.current===e&&(A(fe),A(pe)),he.current===e&&(A(he),Qf._currentValue=ce)}var be,xe;function Se(e){if(be===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||``,xe=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Se(n):``}function Te(e,t){switch(e.tag){case 26:case 27:case 5:return Se(e.type);case 16:return Se(`Lazy`);case 13:return e.child!==t&&t!==null?Se(`Suspense Fallback`):Se(`Suspense`);case 19:return Se(`SuspenseList`);case 0:case 15:return we(e.type,!1);case 11:return we(e.type.render,!1);case 1:return we(e.type,!0);case 31:return Se(`Activity`);default:return``}}function Ee(e){try{var t=``,n=null;do t+=Te(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var De=Object.prototype.hasOwnProperty,Oe=t.unstable_scheduleCallback,ke=t.unstable_cancelCallback,Ae=t.unstable_shouldYield,je=t.unstable_requestPaint,Me=t.unstable_now,Ne=t.unstable_getCurrentPriorityLevel,Pe=t.unstable_ImmediatePriority,Fe=t.unstable_UserBlockingPriority,Ie=t.unstable_NormalPriority,Le=t.unstable_LowPriority,Re=t.unstable_IdlePriority,ze=t.log,Be=t.unstable_setDisableYieldValue,Ve=null,He=null;function Ue(e){if(typeof ze==`function`&&Be(e),He&&typeof He.setStrictMode==`function`)try{He.setStrictMode(Ve,e)}catch{}}var We=Math.clz32?Math.clz32:qe,Ge=Math.log,Ke=Math.LN2;function qe(e){return e>>>=0,e===0?32:31-(Ge(e)/Ke|0)|0}var Je=256,Ye=262144,Xe=4194304;function Ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ze(n))):i=Ze(o):i=Ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ze(n))):i=Ze(o)):i=Ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function $e(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function et(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tt(){var e=Xe;return Xe<<=1,!(Xe&62914560)&&(Xe=4194304),e}function nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function it(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),_n=!1;if(gn)try{var vn={};Object.defineProperty(vn,"passive",{get:function(){_n=!0}}),window.addEventListener(`test`,vn,vn),window.removeEventListener(`test`,vn,vn)}catch{_n=!1}var yn=null,bn=null,xn=null;function Sn(){if(xn)return xn;var e,t=bn,n=t.length,r,i=`value`in yn?yn.value:yn.textContent,a=i.length;for(e=0;e=er),rr=` `,ir=!1;function ar(e,t){switch(e){case`keyup`:return Qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function or(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var sr=!1;function cr(e,t){switch(e){case`compositionend`:return or(t);case`keypress`:return t.which===32?(ir=!0,rr):null;case`textInput`:return e=t.data,e===rr&&ir?null:e;default:return null}}function lr(e,t){if(sr)return e===`compositionend`||!$n&&ar(e,t)?(e=Sn(),xn=bn=yn=null,sr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=jr(n)}}function Nr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ut(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ut(e.document)}return t}function Fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ir=gn&&`documentMode`in document&&11>=document.documentMode,Lr=null,Rr=null,zr=null,Br=!1;function Vr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||Lr==null||Lr!==Ut(r)||(r=Lr,`selectionStart`in r&&Fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zr&&Ar(zr,r)||(zr=r,r=Ed(Rr,`onSelect`),0>=o,i-=o,Ni=1<<32-We(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),N&&Fi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),N&&Fi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return N&&Fi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),N&&Fi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Na(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ba(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=bi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=yi(a.type,a.key,a.props,null,e.mode,c),Ba(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ci(a,e.mode,c),c.return=e,e=c}return o(e);case E:return a=Na(a),b(e,r,a,c)}if(se(a))return h(e,r,a,c);if(ie(a)){if(l=ie(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,za(a),c);if(a.$$typeof===S)return b(e,r,ca(e,a),c);Va(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=xi(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{Ra=0;var i=b(e,t,n,r);return La=null,i}catch(t){if(t===Da||t===ka)throw t;var a=hi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ua=Ha(!0),Wa=Ha(!1),Ga=!1;function Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=fi(e),di(e,null,n),t}return ci(e,r,t,n),fi(e)}function Xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}function Za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Qa=!1;function $a(){if(Qa){var e=va;if(e!==null)throw e}}function eo(e,t,n,r){Qa=!1;var i=e.updateQueue;Ga=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===_a&&(Qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ga=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function to(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function no(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=O.T,s={};O.T=s,Ls(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Is(e,t,xa(c,r),pu(e)):Is(e,t,r,pu(e))}catch(n){Is(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function Es(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Os(e).queue;Ts(e,i,t,ce,n===null?Es:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:ce},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),Is(e,t.next.queue,{},pu())}function As(){return sa(Qf)}function js(){return B().memoizedState}function Ms(){return B().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ja(n);var r=Ya(t,e,n);r!==null&&(hu(r,t,n),Xa(r,t,n)),t={cache:pa()},e.payload=t;return}t=t.return}}function Ps(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Rs(e)?zs(t,n):(n=li(e,t,n,r),n!==null&&(hu(n,e,r),Bs(n,t,r)))}function Fs(e,t,n){Is(e,t,n,pu())}function Is(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))zs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,kr(s,o))return ci(e,t,i,0),K===null&&si(),!1}catch{}if(n=li(e,t,i,r),n!==null)return hu(n,e,r),Bs(n,t,r),!0}return!1}function Ls(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Rs(e)){if(t)throw Error(s(479))}else t=li(e,n,r,2),t!==null&&hu(t,e,2)}function Rs(e){var t=e.alternate;return e===I||t!==null&&t===I}function zs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}var Vs={readContext:sa,use:Io,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z};Vs.useEffectEvent=z;var Hs={readContext:sa,use:Io,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:sa,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(bo){Ue(!0);try{e()}finally{Ue(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(bo){Ue(!0);try{n(t)}finally{Ue(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ps.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Fs.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bs,useDeferredValue:function(e,t){return Cs(No(),e,t)},useTransition:function(){var e=Jo(!1);return e=Ts.bind(null,I,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,i=No();if(N){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),K===null)throw Error(s(349));J&127||Uo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,fs(Go.bind(null,r,a,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,a,n,t),null),n},useId:function(){var e=No(),t=K.identifierPrefix;if(N){var n=Pi,r=Ni;n=(r&~(1<<32-We(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[pt]=t,a[mt]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return H(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=me.current,qi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Bi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[pt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Wi(t,!0)}else e=Bd(e).createTextNode(r),e[pt]=t,t.stateNode=e}return H(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=qi(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[pt]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),e=!1}else n=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ho(t),t):(ho(t),null);if(t.flags&128)throw Error(s(558))}return H(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=qi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[pt]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),i=!1}else i=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ho(t),t):(ho(t),null)}return ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),H(t),null);case 4:return _e(),e===null&&Sd(t.stateNode.containerInfo),H(t),null;case 10:return ta(t.type),H(t),null;case 19:if(A(F),r=t.memoizedState,r===null)return H(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)zc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=go(e),a!==null){for(t.flags|=128,zc(r,!1),e=a.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)vi(n,e),n=n.sibling;return j(F,F.current&1|2),N&&Fi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Me()>tu&&(t.flags|=128,i=!0,zc(r,!1),t.lanes=4194304)}else{if(!i)if(e=go(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!N)return H(t),null}else 2*Me()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,zc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(H(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Me(),e.sibling=null,n=F.current,j(F,i?n&1|2:n&1),N&&Fi(t,r.treeForkCount),e);case 22:case 23:return ho(t),so(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&A(Ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ta(P),H(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Vc(e,t){switch(Ri(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(P),_e(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(ho(t),t.alternate===null)throw Error(s(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return A(F),null;case 4:return _e(),null;case 10:return ta(t.type),null;case 22:case 23:return ho(t),so(),e!==null&&A(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ta(P),null;case 25:return null;default:return null}}function Hc(e,t){switch(Ri(t),t.tag){case 3:ta(P),_e();break;case 26:case 27:case 5:ye(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&ho(t);break;case 13:ho(t);break;case 19:A(F);break;case 10:ta(t.type);break;case 22:case 23:ho(t),so(),e!==null&&A(Ca);break;case 24:ta(P)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{no(t,n)}catch(t){Z(e,e.return,t)}}}function Kc(e,t,n){n.props=Ys(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Yc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[mt]=t}catch(t){Z(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[pt]=e,t[mt]=n}catch(t){Z(e,e.return,t)}}var nl=!1,U=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Pr(e),Fr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(a,r,n),a[pt]=e,Et(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;cg&&(o=g,g=h,h=o);var _=Mr(s,h),v=Mr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,O.T=null,n=lu,lu=null;var a=au,o=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(s(331));var c=G;if(G|=4,Fl(a.current),Dl(a,a.current,o,n),G=c,id(0,!1),He&&typeof He.onPostCommitFiberRoot==`function`)try{He.onPostCommitFiberRoot(Ve,a)}catch{}return!0}finally{k.p=i,O.T=r,Vu(e,t)}}function Wu(e,t,n){t=Ti(n,t),t=tc(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(rt(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=Ti(n,e),n=nc(2),r=Ya(t,n,2),r!==null&&(rc(n,r,t,e),rt(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>Me()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=tt()),e=ui(e,t),e!==null&&(rt(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Oe(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-We(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=Qe(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||$e(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Me(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Gt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Gt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Gt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Gt(n.imageSizes)+`"]`)):i+=`[href="`+Gt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Gt(r)+`"][href="`+Gt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Et(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Tt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Et(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Tt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Et(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Tt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Et(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=me.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Tt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=Tt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Tt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+Gt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Et(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Gt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Gt(n.href)+`"]`);if(r)return t.instance=r,Et(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Et(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,Et(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),Et(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,Et(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Et(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Et(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Et(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n(),u=c(),d=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=e(((e,t)=>{t.exports=d()}))(),p={bg:`#0A0A0C`,panel:`#141418`,surface:`#1C1C22`,border:`#2A2A32`,amber:`#E8A030`,amberDim:`#7A5218`,blue:`#3A7BA8`,blueDim:`#1E4060`,green:`#3AB87A`,red:`#C84040`,textPrimary:`#F0EDE6`,textSec:`#8888A0`,textDim:`#444458`},m=window.location.origin,h=m.replace(/^http/,`ws`)+`/ws`,g=`guitar`;try{let e=localStorage.getItem(`pedal_channel`);(e===`guitar`||e===`bass`)&&(g=e)}catch{}function _(e){g=e}function v(e){let t=g;return t?e+(e.includes(`?`)?`&`:`?`)+`channel=`+encodeURIComponent(t):e}async function y(e){let t=await fetch(`${m}${v(e)}`);if(!t.ok)throw Error(`${e} => ${t.status}`);return t.json()}async function b(e,t){let n=await fetch(`${m}${v(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:t==null?void 0:JSON.stringify(t)});if(!n.ok)throw Error(`${e} => ${n.status}`);return n.json()}async function x(e,t){let n=await fetch(`${m}${v(e)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`${e} => ${n.status}`);return n.json()}async function ee(e){let t=await fetch(`${m}${v(e)}`,{method:`DELETE`});if(!t.ok)throw Error(`${e} => ${t.status}`);return t.json()}async function S(e,t){let n=new FormData;n.append(`file`,t);let r=await fetch(`${m}${v(e)}`,{method:`POST`,body:n});if(!r.ok)throw Error(`${e} => ${r.status}`);return r.json()}function C(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(!1),i=(0,l.useRef)(null),a=(0,l.useRef)(null);return(0,l.useEffect)(()=>{y(`/api/state`).then(e=>{t(e),r(!0)}).catch(()=>{r(!1)});let e;function n(){try{let a=new WebSocket(h);a.onmessage=e=>{try{let n=JSON.parse(e.data);(n.type===`connected`||n.type===`state`)&&(t(n.state),r(!0)),n.type===`preset_changed`&&n.state&&t(n.state),n.type===`bypass_changed`&&t(e=>e&&{...e,bypass:n.bypass}),n.type===`tuner_changed`&&t(e=>e&&{...e,tuner_enabled:n.tuner_enabled}),n.type===`routing_changed`&&t(e=>e&&{...e,routing_mode:n.routing_mode,routing_breakpoint:n.routing_breakpoint}),n.type===`channel_mode_changed`&&t(e=>e&&{...e,channel_mode:n.channel_mode}),(n.type===`model_loaded`||n.type===`ir_loaded`)&&y(`/api/state`).then(e=>t(e)),n.type===`snapshot_recalled`&&n.state&&t(n.state),n.type===`snapshot_saved`&&y(`/api/state`).then(e=>t(e))}catch{}},a.onclose=()=>{r(!1),e=setTimeout(n,3e3)},a.onerror=()=>a.close(),i.current=a}catch{e=setTimeout(n,3e3)}}return n(),a.current=setInterval(()=>{y(`/api/state`).then(e=>{t(e),r(!0)}).catch(()=>{})},5e3),()=>{clearInterval(a.current),clearTimeout(e),i.current&&i.current.close()}},[]),{state:e,connected:n,refresh:(0,l.useCallback)(()=>{y(`/api/state`).then(e=>{t(e),r(!0)}).catch(()=>{})},[])}}var te=` + @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap'); + * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; } + body { background: ${p.bg}; color: ${p.textPrimary}; font-family: 'Inter', sans-serif; user-select: none; } + :root { --amber: ${p.amber}; --blue: ${p.blue}; --green: ${p.green}; } + + .mono { font-family: 'JetBrains Mono', monospace; } + + ::-webkit-scrollbar { width: 4px; height: 4px; } + ::-webkit-scrollbar-track { background: ${p.panel}; } + ::-webkit-scrollbar-thumb { background: ${p.border}; border-radius: 2px; } + + input, textarea, select { font-family: inherit; } + + .knob-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; } + .knob { border-radius: 50%; position: relative; touch-action: none; } + .knob-inner { border-radius: 50%; width: 100%; height: 100%; position: relative; + background: radial-gradient(circle at 35% 30%, #3A3A48, #1A1A22); + box-shadow: 0 2px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.07); } + .knob-dot { position: absolute; width: 3px; border-radius: 2px; background: var(--amber); + left: 50%; transform-origin: bottom center; box-shadow: 0 0 6px var(--amber); } + .knob-ring { position: absolute; inset: -5px; border-radius: 50%; } + .knob-label { font-size: 10px; color: ${p.textSec}; letter-spacing: .06em; text-transform: uppercase; text-align: center; } + .knob-value { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: ${p.amber}; } + + .toggle { display: flex; background: ${p.surface}; border-radius: 6px; border: 1px solid ${p.border}; overflow: hidden; } + .toggle-btn { flex: 1; padding: 7px 12px; font-size: 12px; font-weight: 500; letter-spacing: .04em; + background: none; border: none; color: ${p.textSec}; cursor: pointer; transition: all .15s; } + .toggle-btn.active { background: ${p.amber}; color: #000; } + + .vu-bar { display: flex; gap: 2px; align-items: flex-end; height: 100%; } + .vu-seg { width: 4px; border-radius: 1px; transition: opacity .05s; } + + .fader-track { width: 4px; border-radius: 2px; background: ${p.border}; position: relative; cursor: pointer; touch-action: none; } + .fader-fill { width: 100%; border-radius: 2px; position: absolute; bottom: 0; transition: height .05s; } + .fader-thumb { width: 28px; height: 10px; border-radius: 3px; position: absolute; left: 50%; transform: translateX(-50%); + background: linear-gradient(180deg, #3A3A4A, #252530); + border: 1px solid #4A4A5A; box-shadow: 0 2px 4px rgba(0,0,0,.5); + cursor: grab; touch-action: none; } + .fader-thumb::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); + width: 16px; height: 2px; border-radius: 1px; background: rgba(255,255,255,.15); + box-shadow: 0 3px 0 rgba(255,255,255,.15), 0 -3px 0 rgba(255,255,255,.15); } + + .tabbar { display: flex; background: ${p.panel}; border-bottom: 1px solid ${p.border}; flex-shrink: 0; } + .tab { flex: 1; padding: 10px 4px; font-size: 10px; font-weight: 500; letter-spacing: .04em; + text-align: center; text-transform: uppercase; color: ${p.textDim}; + cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s; } + .tab.active { color: ${p.amber}; border-bottom-color: ${p.amber}; } + + .card { background: ${p.panel}; border: 1px solid ${p.border}; border-radius: 10px; padding: 16px; } + .card-sm { background: ${p.surface}; border: 1px solid ${p.border}; border-radius: 8px; padding: 12px; } + + .btn { padding: 10px 18px; border-radius: 7px; font-size: 13px; font-weight: 600; + letter-spacing: .04em; border: none; cursor: pointer; transition: all .12s; } + .btn-primary { background: ${p.amber}; color: #000; } + .btn-primary:active { filter: brightness(.85); transform: scale(.97); } + .btn-ghost { background: ${p.surface}; color: ${p.textPrimary}; border: 1px solid ${p.border}; } + .btn-ghost:active { background: ${p.border}; } + .btn-danger { background: rgba(200,64,64,.2); color: ${p.red}; border: 1px solid rgba(200,64,64,.3); } + .btn-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; + justify-content: center; background: ${p.surface}; border: 1px solid ${p.border}; cursor: pointer; + font-size: 16px; transition: all .12s; } + .btn-icon:active { transform: scale(.93); } + .btn-icon.active { background: rgba(232,160,48,.15); border-color: ${p.amber}; color: ${p.amber}; } + .btn-sm { padding: 6px 12px; font-size: 12px; } + + .fx-block { background: ${p.panel}; border: 1px solid ${p.border}; border-radius: 10px; + overflow: hidden; transition: border-color .15s; } + .fx-block.active { border-color: ${p.amber}; } + .fx-block.bypassed { opacity: .45; } + .fx-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; + border-bottom: 1px solid ${p.border}; background: ${p.surface}; cursor: pointer; } + .fx-body { padding: 12px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; } + .bypass-led { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } + .led-on { background: ${p.green}; box-shadow: 0 0 8px ${p.green}; } + .led-off { background: ${p.textDim}; } + + .waveform-wrap { position: relative; overflow: hidden; border-radius: 6px; background: #0F0F14; } + .waveform-canvas { display: block; } + .playhead { position: absolute; top: 0; bottom: 0; width: 1.5px; background: ${p.amber}; + box-shadow: 0 0 8px ${p.amber}; pointer-events: none; transition: left .08s linear; } + + .nam-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; + background: rgba(58,123,168,.15); border: 1px solid rgba(58,123,168,.35); border-radius: 5px; + font-family: 'JetBrains Mono', monospace; font-size: 11px; color: ${p.blue}; } + + .section-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; + color: ${p.textDim}; font-weight: 600; margin-bottom: 10px; } + + .preset-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; + border-radius: 8px; cursor: pointer; transition: background .12s; border: 1px solid transparent; } + .preset-row:active, .preset-row.active { background: rgba(232,160,48,.08); border-color: rgba(232,160,48,.25); } + + .transport-btn { width: 44px; height: 44px; border-radius: 50%; display: flex; + align-items: center; justify-content: center; font-size: 16px; cursor: pointer; + border: 2px solid ${p.border}; background: ${p.surface}; transition: all .12s; } + .transport-btn:active { transform: scale(.92); } + .transport-btn.rec { border-color: ${p.red}; background: rgba(200,64,64,.15); } + .transport-btn.play { border-color: ${p.green}; background: rgba(58,184,122,.15); } + + .badge { display: inline-flex; align-items: center; justify-content: center; + padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; + letter-spacing: .06em; text-transform: uppercase; } + .badge-amber { background: rgba(232,160,48,.2); color: ${p.amber}; } + .badge-green { background: rgba(58,184,122,.2); color: ${p.green}; } + .badge-blue { background: rgba(58,123,168,.2); color: ${p.blue}; } + .badge-red { background: rgba(200,64,64,.2); color: ${p.red}; } + + .screen-header { padding: 12px 14px 8px; display: flex; align-items: center; + justify-content: space-between; border-bottom: 1px solid ${p.border}; flex-shrink: 0; } + .screen-title { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: ${p.textSec}; } + + .screen-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; + flex-direction: column; gap: 12px; } + + /* Settings lists */ + .setting-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid ${p.border}; } + .setting-label { font-size: 13px; color: ${p.textPrimary}; } + .setting-desc { font-size: 11px; color: ${p.textDim}; margin-top: 2px; } + .switch { width: 40px; height: 22px; border-radius: 11px; background: ${p.border}; cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; } + .switch.on { background: ${p.green}; } + .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform .15s; } + .switch.on::after { transform: translateX(18px); } + + .search-bar { display: flex; background: ${p.surface}; border-radius: 7px; border: 1px solid ${p.border}; + padding: 8px 12px; gap: 8px; align-items: center; } + .search-bar input { background: none; border: none; outline: none; color: ${p.textPrimary}; font-size: 13px; flex: 1; } + .search-bar input::placeholder { color: ${p.textDim}; } + + .file-drop { border: 2px dashed ${p.border}; border-radius: 8px; padding: 20px; text-align: center; + cursor: pointer; transition: all .15s; font-size: 13px; color: ${p.textDim}; } + .file-drop:hover, .file-drop.dragover { border-color: ${p.amber}; color: ${p.amber}; } + + .loader { width: 20px; height: 20px; border: 2px solid ${p.border}; border-top-color: ${p.amber}; + border-radius: 50%; animation: spin .6s linear infinite; } + @keyframes spin { to { transform: rotate(360deg); } } + + .slide-panel { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; + display: flex; align-items: flex-end; justify-content: center; } + .slide-panel-inner { background: ${p.bg}; max-width: 440px; width: 100%; max-height: 85vh; + border-radius: 16px 16px 0 0; overflow: hidden; display: flex; flex-direction: column; } + .slide-panel-handle { width: 36px; height: 4px; border-radius: 2px; background: ${p.border}; + margin: 8px auto; flex-shrink: 0; } + + /* Snapshot slots */ + .snap-grid { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; } + .snap-slot { min-width: 60px; flex-shrink: 0; border-radius: 8px; border: 1.5px solid ${p.border}; + background: ${p.surface}; cursor: pointer; text-align: center; padding: 8px 4px; + transition: all .12s; touch-action: manipulation; position: relative; } + .snap-slot:active { transform: scale(.95); } + .snap-slot.filled { border-color: ${p.amberDim}; } + .snap-slot.active { border-color: ${p.amber}; background: rgba(232,160,48,.08); } + .snap-slot .snap-num { font-family: 'JetBrains Mono', monospace; font-size: 16px; + font-weight: 700; color: ${p.textDim}; } + .snap-slot.filled .snap-num { color: ${p.amber}; } + .snap-slot.active .snap-num { color: ${p.amber}; text-shadow: 0 0 8px ${p.amber}; } + .snap-slot .snap-name { font-size: 9px; color: ${p.textDim}; margin-top: 3px; + overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .snap-slot.filled .snap-name { color: ${p.textSec}; } + .snap-slot.active .snap-name { color: ${p.amber}; } + .snap-slot .snap-empty { font-size: 9px; color: ${p.textDim}; margin-top: 3px; font-style: italic; } + .snap-slot .snap-save-indicator { position: absolute; top: -3px; right: -3px; + width: 10px; height: 10px; border-radius: 50%; background: ${p.green}; + box-shadow: 0 0 6px ${p.green}; animation: snap-pop .3s ease-out; } + @keyframes snap-pop { 0% { transform: scale(2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } } + .snap-name-input { background: ${p.surface}; border: 1px solid ${p.amber}; border-radius: 4px; + padding: 2px 6px; color: ${p.amber}; font-size: 10px; text-align: center; outline: none; + font-family: 'Inter', sans-serif; width: 100%; } + .snap-header-btn { cursor: pointer; border: none; background: none; color: ${p.textSec}; + font-size: 16px; padding: 4px 6px; border-radius: 6px; transition: all .12s; + display: flex; align-items: center; gap: 4px; } + .snap-header-btn:hover { color: ${p.amber}; background: rgba(232,160,48,.1); } + .snap-header-btn.active { color: ${p.amber}; background: rgba(232,160,48,.15); } + .snap-header-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; + font-weight: 700; color: ${p.amber}; min-width: 16px; text-align: center; } +`;function w({label:e,value:t=50,onChange:n,size:r=52,color:i=p.amber,min:a=0,max:o=100}){let s=(0,l.useRef)(null),c=(0,l.useRef)(null),u=(t-a)/(o-a),d=-140+u*280,m=e=>{e.preventDefault(),c.current={y:e.touches?e.touches[0].clientY:e.clientY,val:t};let r=e=>{let t=e.touches?e.touches[0].clientY:e.clientY,r=(c.current.y-t)/120,i=Math.max(a,Math.min(o,c.current.val+r*(o-a)));n?.(Math.round(i))},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),window.removeEventListener(`touchmove`,r),window.removeEventListener(`touchend`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i),window.addEventListener(`touchmove`,r,{passive:!1}),window.addEventListener(`touchend`,i)},h=r+12,g=h/2,_=h/2,v=r/2+3,y=(d-90)*(Math.PI/180),b=g+v*Math.cos(y),x=_+v*Math.sin(y);return(0,f.jsxs)(`div`,{className:`knob-wrap`,style:{width:r+12},children:[(0,f.jsxs)(`div`,{className:`knob`,style:{width:r,height:r},onMouseDown:m,onTouchStart:m,ref:s,children:[(0,f.jsxs)(`svg`,{style:{position:`absolute`,inset:-6,width:h,height:h,overflow:`visible`},children:[(0,f.jsx)(`circle`,{cx:g,cy:_,r:v,fill:`none`,stroke:p.border,strokeWidth:`2.5`,strokeLinecap:`round`,opacity:`.5`}),u>0&&(0,f.jsx)(`path`,{d:`M ${g} ${_-v} A ${v} ${v} 0 ${+(u>.5)} 1 ${b} ${x}`,fill:`none`,stroke:i,strokeWidth:`2.5`,strokeLinecap:`round`,style:{filter:`drop-shadow(0 0 3px ${i})`}})]}),(0,f.jsx)(`div`,{className:`knob-inner`,style:{"--amber":i},children:(0,f.jsx)(`div`,{className:`knob-dot`,style:{height:r*.38,bottom:r/2-2,transform:`translateX(-50%) rotate(${d}deg)`,transformOrigin:`50% ${r*.38}px`}})})]}),(0,f.jsx)(`div`,{className:`knob-value mono`,style:{color:i},children:t}),(0,f.jsx)(`div`,{className:`knob-label`,children:e})]})}function T({level:e=0,height:t=60,vertical:n=!0}){let r=Math.round(e/100*12),i=e=>e>=10?p.red:e>=8?`#E8C030`:p.green;return n?(0,f.jsx)(`div`,{style:{display:`flex`,flexDirection:`column-reverse`,gap:2,height:t,alignItems:`center`},children:Array.from({length:12}).map((e,n)=>(0,f.jsx)(`div`,{style:{width:6,height:(t-24)/12,borderRadius:1,background:n(0,f.jsx)(`div`,{style:{flex:1,height:`100%`,borderRadius:1,background:te.default??e.default??50));return(0,f.jsxs)(`div`,{className:`fx-block ${n?`active`:``} ${r?`bypassed`:``}`,children:[(0,f.jsxs)(`div`,{className:`fx-header`,onClick:()=>s(e=>!e),children:[(0,f.jsx)(`div`,{className:`bypass-led ${r?`led-off`:`led-on`}`,onClick:e=>{e.stopPropagation(),a?.()}}),(0,f.jsx)(`span`,{style:{flex:1,fontSize:13,fontWeight:600},children:e}),(0,f.jsx)(`span`,{className:`badge badge-blue`,style:{fontSize:10},children:t}),(0,f.jsx)(`span`,{style:{color:p.textDim,fontSize:18,marginLeft:6},children:o?`▾`:`▸`})]}),o&&(0,f.jsx)(`div`,{className:`fx-body`,children:i.map((e,t)=>(0,f.jsx)(w,{label:e.name,value:c[t],size:44,onChange:e=>u(n=>n.map((n,r)=>r===t?e:n)),min:e.min??0,max:e.max??100},e.key||e.name))})]})}function D({active:e=!0,variant:t=`right`,animated:n=!0}){let r=e?p.green:p.textDim;return t===`right`?(0,f.jsxs)(`svg`,{width:`22`,height:`14`,viewBox:`0 0 22 14`,style:{flexShrink:0,display:`block`},children:[(0,f.jsx)(`line`,{x1:`2`,y1:`7`,x2:`14`,y2:`7`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`polygon`,{points:`12,3 20,7 12,11`,fill:r}),e&&n&&(0,f.jsx)(`circle`,{r:`1.5`,fill:r,opacity:`0.6`,children:(0,f.jsx)(`animate`,{attributeName:`cx`,values:`4;18`,dur:`1.2s`,repeatCount:`indefinite`})})]}):t===`split`?(0,f.jsxs)(`svg`,{width:`26`,height:`24`,viewBox:`0 0 26 24`,style:{flexShrink:0,display:`block`},children:[(0,f.jsx)(`line`,{x1:`2`,y1:`10`,x2:`14`,y2:`10`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`line`,{x1:`8`,y1:`10`,x2:`18`,y2:`18`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`polygon`,{points:`12,6 18,10 12,14`,fill:r}),(0,f.jsx)(`polygon`,{points:`16,14 21,20 19,13`,fill:r})]}):t===`merge`?(0,f.jsxs)(`svg`,{width:`26`,height:`24`,viewBox:`0 0 26 24`,style:{flexShrink:0,display:`block`},children:[(0,f.jsx)(`line`,{x1:`2`,y1:`4`,x2:`12`,y2:`12`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`line`,{x1:`2`,y1:`20`,x2:`12`,y2:`12`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`line`,{x1:`12`,y1:`12`,x2:`14`,y2:`12`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`}),(0,f.jsx)(`polygon`,{points:`12,8 18,12 12,16`,fill:r})]}):null}function ne({children:e,onClose:t}){return(0,f.jsx)(`div`,{className:`slide-panel`,onClick:t,children:(0,f.jsxs)(`div`,{className:`slide-panel-inner`,onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(`div`,{className:`slide-panel-handle`}),e]})})}function re({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)(e?.master_volume==null?80:Math.round(e.master_volume*100)),[a,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(null),u=a??e?.bypass??!1,d=s??e?.tuner_enabled??!1;(0,l.useEffect)(()=>{e?.master_volume!=null&&i(Math.round(e.master_volume*100))},[e?.master_volume]),(0,l.useEffect)(()=>{e?.bypass!==void 0&&o(null),e?.tuner_enabled!==void 0&&c(null)},[e?.bypass,e?.tuner_enabled]);let m=async e=>{i(e);try{await x(`/api/volume`,{volume:e/100})}catch{}},h=async()=>{let e=!u;o(e);try{await b(`/api/bypass`,{bypass:e})}catch{o(null)}},g=async()=>{let e=!d;c(e);try{await b(`/api/tuner`,{enabled:e})}catch{c(null)}},_=e?.input_level??0,v=e?.output_level??0;return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Active Rig`}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,marginTop:4,flexWrap:`wrap`,alignItems:`center`},children:[e?.current_preset?(0,f.jsx)(`span`,{className:`nam-chip`,style:{color:p.amber,borderColor:`${p.amber}55`,background:`${p.amber}15`},children:e.current_preset.name}):(0,f.jsx)(`span`,{style:{fontSize:11,color:p.textDim},children:`No preset loaded`}),t?(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Connected`}):(0,f.jsx)(`span`,{className:`badge badge-red`,children:`Offline`})]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,f.jsx)(T,{level:_,height:44}),(0,f.jsx)(T,{level:v,height:44})]})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[(0,f.jsxs)(`div`,{className:`card-sm`,style:{display:`flex`,gap:10,justifyContent:`space-around`},children:[(0,f.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:4},children:`Bypass`}),(0,f.jsx)(`div`,{className:`switch ${u?`on`:``}`,onClick:h,style:{margin:`0 auto`}})]}),(0,f.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:4},children:`Tuner`}),(0,f.jsx)(`div`,{className:`switch ${d?`on`:``}`,onClick:g,style:{margin:`0 auto`}})]}),(0,f.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:4},children:`Routing`}),(0,f.jsx)(`span`,{className:`mono`,style:{fontSize:12,color:p.amber},children:e?.routing_mode||`mono`})]})]}),d&&(0,f.jsxs)(`div`,{className:`card-sm`,style:{background:`${p.amber}15`,borderColor:p.amber,textAlign:`center`,padding:`20px 16px`},children:[(0,f.jsx)(`div`,{style:{fontSize:32,marginBottom:8},children:`🎵`}),(0,f.jsx)(`div`,{className:`section-label`,style:{color:p.amber,marginBottom:4,fontSize:14},children:`TUNER ACTIVE`}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:24,color:p.amber,letterSpacing:4},children:`—————●—————`}),(0,f.jsx)(`div`,{style:{fontSize:11,color:p.textDim,marginTop:8},children:`Tap switch again to exit tuner mode`})]}),(0,f.jsxs)(`div`,{className:`card`,style:{display:`flex`,gap:20,alignItems:`center`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Master Volume`}),(0,f.jsx)(`input`,{type:`range`,min:0,max:100,value:r,onChange:e=>m(+e.target.value),style:{width:`100%`,accentColor:p.amber}}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:11,color:p.amber,marginTop:4},children:[r,`%`]})]}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:11,color:p.textSec,textAlign:`right`},children:[e?.nam_loaded?`NAM: Active`:`NAM: —`,(0,f.jsx)(`br`,{}),e?.ir_loaded?`IR: Active`:`IR: —`]})]}),(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Signal Chain`}),(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,overflowX:`auto`,padding:`4px 0`},children:(()=>{let t=[`IN`,e?.bypass?`BYP`:e?.nam_loaded?`NAM`:`AMP`,e?.ir_loaded?`IR`:`CAB`,`OUT`],n=e?.routing_mode===`4cm`;e?.routing_breakpoint;let r=!e?.bypass;return t.map((e,t,i)=>(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[n&&e===`AMP`&&(0,f.jsx)(D,{variant:`split`,active:r}),n&&e===`CAB`&&(0,f.jsx)(D,{variant:`merge`,active:r}),(0,f.jsxs)(`div`,{style:{padding:`3px 8px`,borderRadius:4,fontSize:10,fontWeight:700,background:t===0||t===i.length-1?p.blueDim:n&&e===`AMP`?`rgba(58,184,122,.15)`:p.amberDim,color:t===0||t===i.length-1?p.blue:n&&e===`AMP`?p.green:p.amber,border:`1px solid ${t===0||t===i.length-1?p.blue:n&&e===`AMP`?p.green:p.amber}60`},children:[e,n&&e===`AMP`&&(0,f.jsx)(`span`,{style:{fontSize:8,marginLeft:4,opacity:.7},children:`4CM`}),n&&e===`BYP`&&(0,f.jsx)(`span`,{style:{fontSize:8,marginLeft:4,opacity:.7},children:`4CM`})]}),n&&e===`AMP`&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,flexShrink:0,gap:1},children:[(0,f.jsx)(D,{variant:`split`,active:r}),(0,f.jsx)(`span`,{style:{fontSize:7,color:p.textDim,letterSpacing:`.05em`,lineHeight:`1`},children:`LOOP`}),(0,f.jsx)(D,{variant:`merge`,active:r})]}),t{let e=document.querySelector(`.tabbar`)?.children;e&&e[3]?.click()},children:`Browse IRs`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,style:{flex:1,fontSize:10},onClick:()=>{let e=document.querySelector(`.tabbar`)?.children;e&&e[2]?.click()},children:`Browse Models`})]})]})]})}var ie={noise_gate:`Noise Gate`,compressor:`Compressor`,boost:`Boost`,overdrive:`Overdrive`,distortion:`Distortion`,fuzz:`Fuzz`,eq:`EQ`,chorus:`Chorus`,flanger:`Flanger`,phaser:`Phaser`,tremolo:`Tremolo`,vibrato:`Vibrato`,delay:`Delay`,reverb:`Reverb`,volume:`Volume`,nam_amp:`NAM Amp`,ir_cab:`IR Cab`,octaver:`Octaver`,pitch_shifter:`Pitch Shifter`,harmonizer:`Harmonizer`,whammy:`Whammy`,detune:`Detune`,ring_modulator:`Ring Mod`,auto_wah:`Auto Wah`,envelope_filter:`Env Filter`,rotary_speaker:`Rotary`,uni_vibe:`Uni-Vibe`,auto_pan:`Auto Pan`,stereo_widener:`Stereo Widener`,bitcrusher:`Bitcrusher`,wavefolder:`Wavefolder`,rectifier:`Rectifier`,expander:`Expander`,de_esser:`De-esser`,transient_shaper:`Transient Shaper`,parametric_eq:`Parametric EQ`,high_pass_filter:`High Pass`,low_pass_filter:`Low Pass`,band_pass_filter:`Band Pass`,notch_filter:`Notch Filter`,formant_filter:`Formant Filter`,ping_pong_delay:`Ping Pong Delay`,multi_tap_delay:`Multi Tap`,reverse_delay:`Reverse Delay`,tape_echo:`Tape Echo`,shimmer_reverb:`Shimmer Reverb`,looper:`Looper`,early_reflections:`Early Reflections`,sidechain_compressor:`Sidechain Comp`};function ae({state:e,connected:t}){let[n,r]=(0,l.useState)(null),[i,a]=(0,l.useState)(!0),[o,s]=(0,l.useState)(!1),[c,u]=(0,l.useState)({}),d=(0,l.useCallback)(async e=>{if(c[e])return c[e];try{let t=await y(`/api/block-params/${e}`);return u(n=>({...n,[e]:t.params||[]})),t.params||[]}catch{return[]}},[c]);(0,l.useEffect)(()=>{if(!t||!e?.current_preset){r([]),a(!1);return}y(`/api/presets`).then(async t=>{let n=t.banks||[],i=e.current_preset,o=n[i.bank]?.presets?.[i.program];o?.chain&&r(await Promise.all(o.chain.map(async(e,t)=>{let n=await d(e.fx_type);return{id:t+1,title:ie[e.fx_type]||e.fx_type.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),type:e.fx_type,bypassed:e.bypass||!e.enabled,params:n}}))),a(!1)}).catch(()=>{r([]),a(!1)})},[t,e,d]);let m=e=>r(t=>t&&t.map(t=>t.id===e?{...t,bypassed:!t.bypassed}:t)),h=async e=>{s(!1);let t=await d(e);r(n=>[...n||[],{id:Date.now(),title:ie[e]||e,type:e,bypassed:!1,params:t}])};return i?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})}):(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{className:`screen-title`,children:[`FX Chain `,(n?.length||0)>0?`(${n.length})`:``]}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>s(!0),children:`+ Add Block`})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[n&&n.length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 2px`,overflowX:`auto`},children:(()=>{let t=e?.routing_mode===`4cm`,r=t?e?.routing_breakpoint||7:-1,i=[];return i.push({label:`IN`,type:`io`,idx:-1}),n.forEach((e,n)=>{t&&n===r&&i.push({label:null,type:`merge-bp`,idx:n}),i.push({label:e.type.toUpperCase(),type:`fx`,idx:n,bypassed:e.bypassed}),t&&n===r-1&&i.push({label:null,type:`split-bp`,idx:n})}),i.push({label:`OUT`,type:`io`,idx:-1}),i.map((e,t)=>e.type===`split-bp`?(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,flexShrink:0,gap:1},children:[(0,f.jsx)(D,{variant:`split`,active:!0}),(0,f.jsx)(`span`,{style:{fontSize:7,color:p.textDim,letterSpacing:`.05em`,lineHeight:`1`},children:`4CM`}),(0,f.jsx)(D,{variant:`merge`,active:!0})]},`bp-${t}`):e.type===`merge-bp`?null:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,flexShrink:0},children:[e.type===`io`&&(0,f.jsx)(`div`,{style:{padding:`3px 8px`,borderRadius:4,fontSize:10,fontWeight:700,background:p.blueDim,color:p.blue,border:`1px solid ${p.blue}60`},children:e.label}),e.type===`fx`&&(0,f.jsx)(`div`,{style:{padding:`3px 8px`,borderRadius:4,fontSize:10,fontWeight:700,background:p.amberDim,color:e.bypassed?p.textDim:p.amber,border:`1px solid ${e.bypassed?p.textDim:p.amber}60`,opacity:e.bypassed?.5:1},children:e.label}),ts(!0),children:`+ Add your first block`})]}):n.map(e=>(0,f.jsx)(E,{...e,active:!e.bypassed,onToggle:()=>m(e.id)},e.id))]}),o&&(0,f.jsxs)(ne,{onClose:()=>s(!1),children:[(0,f.jsx)(`div`,{className:`screen-header`,children:(0,f.jsx)(`div`,{className:`screen-title`,children:`Add FX Block`})}),(0,f.jsx)(`div`,{className:`screen-body`,style:{gap:4},children:Object.entries(ie).map(([e,t])=>(0,f.jsxs)(`div`,{className:`preset-row`,onClick:()=>h(e),style:{borderRadius:6},children:[(0,f.jsx)(`span`,{className:`badge badge-blue`,style:{width:60,flexShrink:0},children:e.split(`_`)[0]}),(0,f.jsx)(`span`,{style:{flex:1,fontSize:13},children:t}),(0,f.jsx)(`span`,{style:{color:p.textDim},children:`+`})]},e))})]})]})}function oe({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(!0),[u,d]=(0,l.useState)(!1),[m,h]=(0,l.useState)(``),[g,_]=(0,l.useState)([]),[v,x]=(0,l.useState)(!1),[ee,C]=(0,l.useState)(!1),te=(0,l.useRef)(null),w=(0,l.useCallback)(async()=>{if(!t){c(!1);return}try{let e=await y(`/api/models`);i(e.models||[]),o(e.current)}catch{}c(!1)},[t]);(0,l.useEffect)(()=>{w()},[w]);let T=async e=>{try{await b(`/api/models/load`,{path:e}),await w(),n()}catch{alert(`Failed to load model`)}},E=async()=>{try{await b(`/api/models/unload`),o(null),await w(),n()}catch{alert(`Failed to unload`)}},D=async e=>{let t=e.target.files?.[0];if(t){C(!0);try{await S(`/api/models/upload`,t),await w()}catch{alert(`Upload failed`)}C(!1)}},ne=(0,l.useCallback)(async()=>{if(m.trim()){d(!0);try{_((await y(`/api/models/tonedownload/search?q=${encodeURIComponent(m)}`)).results||[])}catch{alert(`Search failed`)}d(!1)}},[m]),re=async e=>{try{await b(`/api/models/tonedownload/install`,{download_url:e.download_url,name:e.name||e.filename,id:e.id,size:e.size,pack_name:e.pack_name,display_name:e.name}),await w(),n()}catch{alert(`Install failed`)}};return s?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})}):(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{className:`screen-title`,children:[`NAM Models (`,r.length,`)`]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>x(!v),children:v?`Local`:`Search`}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>te.current?.click(),children:ee?`...`:`+ Upload`}),(0,f.jsx)(`input`,{ref:te,type:`file`,accept:`.nam`,style:{display:`none`},onChange:D})]})]}),v&&(0,f.jsxs)(`div`,{style:{padding:`8px 12px`,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{className:`search-bar`,children:[(0,f.jsx)(`span`,{style:{color:p.textDim},children:`🔍`}),(0,f.jsx)(`input`,{type:`text`,placeholder:`Search Tone3000…`,value:m,onChange:e=>h(e.target.value),onKeyDown:e=>e.key===`Enter`&&ne()}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:ne,disabled:u,children:u?`...`:`Go`})]}),g.length>0&&(0,f.jsx)(`div`,{style:{marginTop:8,maxHeight:240,overflow:`auto`},children:g.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,onClick:()=>re(e),style:{borderBottom:`1px solid ${p.border}`,borderRadius:0},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.author,` · `,e.size_display,` · `,e.architecture]})]}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,children:`Get`})]},e.id))})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[a&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:6},children:`Loaded Model`}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(`div`,{className:`nam-chip`,children:a}),(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:E,children:`Unload`})]})]}),r.length===0?(0,f.jsxs)(`div`,{style:{textAlign:`center`,padding:30,color:p.textDim,fontSize:14},children:[`No NAM models found.`,(0,f.jsx)(`br`,{}),`Upload a .nam file or search Tone3000.`]}):r.map(e=>(0,f.jsxs)(`div`,{className:`preset-row ${e.loaded?`active`:``}`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.architecture,` · `,e.size_mb,` MB`]})]}),e.loaded?(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Loaded`}):(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>T(e.path),children:`Load`})]},e.name))]})]})}function se({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(!0),[u,d]=(0,l.useState)(!1),[m,h]=(0,l.useState)(``),[g,_]=(0,l.useState)([]),[v,x]=(0,l.useState)(!1),[ee,C]=(0,l.useState)(!1),te=(0,l.useRef)(null),w=(0,l.useCallback)(async()=>{if(!t){c(!1);return}try{let e=await y(`/api/irs`);i(e.irs||[]),o(e.current)}catch{}c(!1)},[t]);(0,l.useEffect)(()=>{w()},[w]);let T=async e=>{try{await b(`/api/irs/load`,{path:e}),await w(),n()}catch{alert(`Failed to load IR`)}},E=async()=>{try{await b(`/api/irs/unload`),o(null),await w(),n()}catch{alert(`Failed to unload`)}},D=async e=>{let t=e.target.files?.[0];if(t){C(!0);try{await S(`/api/irs/upload`,t),await w()}catch{alert(`Upload failed`)}C(!1)}},ne=(0,l.useCallback)(async()=>{if(m.trim()){d(!0);try{_((await y(`/api/irs/tonedownload/search?q=${encodeURIComponent(m)}`)).results||[])}catch{alert(`Search failed`)}d(!1)}},[m]),re=async e=>{try{await b(`/api/irs/tonedownload/install`,{download_url:e.download_url,name:e.name||e.filename,id:e.id,size:e.size,display_name:e.name}),await w(),n()}catch{alert(`Install failed`)}};return s?(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})}):(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{className:`screen-title`,children:[`IR Files (`,r.length,`)`]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>x(!v),children:v?`Local`:`Search`}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>te.current?.click(),children:ee?`...`:`+ Upload`}),(0,f.jsx)(`input`,{ref:te,type:`file`,accept:`.wav`,style:{display:`none`},onChange:D})]})]}),v&&(0,f.jsxs)(`div`,{style:{padding:`8px 12px`,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{className:`search-bar`,children:[(0,f.jsx)(`span`,{style:{color:p.textDim},children:`🔍`}),(0,f.jsx)(`input`,{type:`text`,placeholder:`Search Tone3000 IRs…`,value:m,onChange:e=>h(e.target.value),onKeyDown:e=>e.key===`Enter`&&ne()}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:ne,disabled:u,children:u?`...`:`Go`})]}),g.length>0&&(0,f.jsx)(`div`,{style:{marginTop:8,maxHeight:240,overflow:`auto`},children:g.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,onClick:()=>re(e),style:{borderBottom:`1px solid ${p.border}`,borderRadius:0},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.author,` · `,e.size_display]})]}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,children:`Get`})]},e.id))})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[a&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:6},children:`Loaded IR`}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(`div`,{className:`nam-chip`,style:{color:p.green,borderColor:`${p.green}55`,background:`${p.green}15`},children:a}),(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:E,children:`Unload`})]})]}),r.length===0?(0,f.jsxs)(`div`,{style:{textAlign:`center`,padding:30,color:p.textDim,fontSize:14},children:[`No IR files found.`,(0,f.jsx)(`br`,{}),`Upload a .wav file or search Tone3000.`]}):r.map(e=>(0,f.jsxs)(`div`,{className:`preset-row ${e.loaded?`active`:``}`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:500},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[e.sample_rate,` Hz · `,e.length_ms,` ms · `,e.num_taps,` taps`]})]}),e.loaded?(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Loaded`}):(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>T(e.path),children:`Load`})]},e.name))]})]})}function O({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(0),[s,c]=(0,l.useState)(!0),[u,d]=(0,l.useState)(``),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(null),v=(0,l.useCallback)(async()=>{if(!t){i([{name:`Default`,number:0,presets:[{name:`Edge of Breakup`,bank:0,program:0},{name:`Modern High Gain`,bank:0,program:1},null,null]}]),c(!1);return}try{i((await y(`/api/presets`)).banks||[])}catch{}c(!1)},[t]);(0,l.useEffect)(()=>{v()},[v]);let S=async(e,t)=>{try{await b(`/api/presets/${e}/${t}/activate`),await v(),n()}catch{alert(`Failed to load preset`)}},C=async()=>{if(!u.trim())return;let t=e?.current_preset?.bank??0,n=e?.current_preset?.program??0;try{await x(`/api/presets/${t}/${n}`,{name:u}),h(!1),await v()}catch{alert(`Failed to save`)}},te=async()=>{let e=a,t=r[e]?.presets||[],i=t.findIndex(e=>e==null);i===-1&&(i=t.length);let o=`New Preset ${i+1}`;try{await x(`/api/presets/${e}/${i}`,{name:o}),await v(),await b(`/api/presets/${e}/${i}/activate`),n()}catch{alert(`Failed to create preset`)}},w=async(e,t)=>{try{await ee(`/api/presets/${e}/${t}`),_(null),await v()}catch{alert(`Failed to delete`)}};if(s)return(0,f.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,f.jsx)(`div`,{className:`loader`})});let T=e?.current_preset,E=r[a]?.presets||[];return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Presets`}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>h(!0),children:`Save`}),(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:te,children:`+ New`})]})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[r.length>1&&(0,f.jsx)(`div`,{className:`toggle`,children:r.map((e,t)=>(0,f.jsx)(`button`,{className:`toggle-btn ${a===t?`active`:``}`,onClick:()=>o(t),children:e.name},e.number))}),T&&(0,f.jsx)(`div`,{className:`card-sm`,style:{display:`flex`,alignItems:`center`,gap:8},children:(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:11,color:p.textDim},children:`Current`}),(0,f.jsxs)(`div`,{style:{fontSize:14,fontWeight:600,color:p.amber},children:[T.name,(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:10,color:p.textDim,marginLeft:8},children:[`Bank `,T.bank,` · Prog `,T.program]})]})]})}),E.length===0?(0,f.jsx)(`div`,{style:{textAlign:`center`,padding:30,color:p.textDim,fontSize:14},children:`No presets in this bank.`}):E.map((e,t)=>{if(!e)return null;let n=T?.bank===e.bank&&T?.program===e.program,r=g===`${e.bank}-${e.program}`;return(0,f.jsxs)(`div`,{className:`preset-row ${n?`active`:``}`,onClick:()=>!r&&S(e.bank,e.program),children:[(0,f.jsx)(`div`,{className:`mono`,style:{width:28,height:28,borderRadius:6,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:12,fontWeight:700,background:n?`${p.amber}22`:p.surface,color:n?p.amber:p.textDim,border:`1px solid ${n?p.amber+`60`:p.border}`},children:e.program+1}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13,fontWeight:600},children:e.name}),(0,f.jsxs)(`div`,{style:{fontSize:10,color:p.textDim},children:[`Bank `,e.bank,` · Program `,e.program]})]}),n&&(0,f.jsx)(`span`,{style:{color:p.amber,fontSize:16},children:`●`}),r?(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:t=>{t.stopPropagation(),w(e.bank,e.program)},children:`Confirm`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:e=>{e.stopPropagation(),_(null)},children:`Cancel`})]}):(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,style:{color:p.red},onClick:t=>{t.stopPropagation(),_(`${e.bank}-${e.program}`)},children:`Delete`})]},t)})]}),m&&(0,f.jsxs)(ne,{onClose:()=>h(!1),children:[(0,f.jsx)(`div`,{className:`screen-header`,children:(0,f.jsx)(`div`,{className:`screen-title`,children:`Save Preset`})}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[(0,f.jsx)(`div`,{className:`search-bar`,children:(0,f.jsx)(`input`,{type:`text`,placeholder:`Preset name…`,value:u,onChange:e=>d(e.target.value),autoFocus:!0,onKeyDown:e=>e.key===`Enter`&&C()})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,f.jsx)(`button`,{className:`btn btn-primary`,style:{flex:1},onClick:C,children:`Save`}),(0,f.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>h(!1),children:`Cancel`})]})]})]})]})}function k({state:e,connected:t,refresh:n}){let[r,i]=(0,l.useState)(`wifi`),[a,o]=(0,l.useState)([]),[s,c]=(0,l.useState)([]),[u,d]=(0,l.useState)([]),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(!1),[v,x]=(0,l.useState)(``),[ee,S]=(0,l.useState)(``),[C,te]=(0,l.useState)(null),[w,T]=(0,l.useState)(e?.routing_mode||`mono`),[E,D]=(0,l.useState)(e?.routing_breakpoint||7),[ne,re]=(0,l.useState)(e?.channel_mode||`dual-mono`);(0,l.useEffect)(()=>{e?.routing_mode&&T(e.routing_mode),e?.routing_breakpoint!=null&&D(e.routing_breakpoint),e?.channel_mode&&re(e.channel_mode)},[e?.routing_mode,e?.routing_breakpoint,e?.channel_mode]);let ie=async()=>{h(!0);try{o((await y(`/api/wifi/scan`)).networks||[])}catch{}h(!1)},ae=async(e,t)=>{try{await b(`/api/wifi/connect`,{ssid:e,password:t}),te(null),x(``),S(``),setTimeout(n,2e3)}catch{alert(`Failed to connect`)}},oe=async()=>{try{await b(`/api/wifi/disconnect`),setTimeout(n,2e3)}catch{}},se=async()=>{let t=e?.wifi?.hotspot_active;try{t?await b(`/api/wifi/hotspot/disable`):await b(`/api/wifi/hotspot/enable`,{ssid:`Pi-Pedal`,password:`pedal1234`}),setTimeout(n,2e3)}catch{}},O=async e=>{try{await b(`/api/bluetooth/power`,{on:e}),setTimeout(n,1e3)}catch{}},k=async()=>{_(!0);try{c((await b(`/api/bluetooth/scan`)).devices||[])}catch{}_(!1)},ce=async()=>{try{d((await y(`/api/bluetooth/paired`)).devices||[])}catch{}},le=async e=>{try{await b(`/api/bluetooth/pair`,{address:e}),await ce()}catch{alert(`Pairing failed`)}},ue=async(e,t)=>{try{await b(`/api/routing`,{routing_mode:e,routing_breakpoint:t})}catch{}},de=async e=>{try{await b(`/api/channel-mode`,{channel_mode:e}),re(e)}catch{}};(0,l.useEffect)(()=>{t&&(ie(),ce())},[t]);let A=e?.wifi,j=e?.bluetooth;return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsx)(`div`,{className:`screen-header`,children:(0,f.jsx)(`div`,{className:`screen-title`,children:`Settings`})}),(0,f.jsx)(`div`,{className:`toggle`,style:{margin:`6px 10px`},children:[{id:`wifi`,label:`WiFi`},{id:`bt`,label:`Bluetooth`},{id:`routing`,label:`Routing`}].map(e=>(0,f.jsx)(`button`,{className:`toggle-btn ${r===e.id?`active`:``}`,onClick:()=>i(e.id),children:e.label},e.id))}),(0,f.jsxs)(`div`,{className:`screen-body`,style:{gap:4},children:[r===`wifi`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`setting-row`,style:{border:`none`,paddingTop:0},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`WiFi`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:A?.connected?`Connected to ${A.ssid}`:`Disconnected`})]}),(0,f.jsx)(`div`,{className:`switch ${A?.connected?`on`:``}`,onClick:oe})]}),A?.connected&&(0,f.jsxs)(`div`,{style:{fontSize:11,color:p.textDim},children:[`IP: `,A.ip,` · Signal: `,A.signal,`%`]}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Hotspot`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:A?.hotspot_active?`Active: ${A.hotspot_ssid}`:`Off`})]}),(0,f.jsx)(`div`,{className:`switch ${A?.hotspot_active?`on`:``}`,onClick:se})]})]}),(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:0},children:`Networks`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:ie,disabled:m,children:m?`...`:`Scan`})]}),a.length===0?(0,f.jsx)(`div`,{style:{fontSize:12,color:p.textDim,padding:`8px 0`},children:`Scan to see available networks.`}):a.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},onClick:()=>wpaState?.ssid!==e.ssid&&te(e.ssid),children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.ssid}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:[`Signal: `,e.signal,`% · `,e.encryption||`Open`]})]}),A?.ssid===e.ssid&&(0,f.jsx)(`span`,{className:`badge badge-green`,children:`Connected`})]},e.ssid))]}),C&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`section-label`,children:[`Connect to `,C]}),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,f.jsx)(`input`,{type:`password`,placeholder:`Password (leave blank for open network)`,value:ee,onChange:e=>S(e.target.value),style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`8px 12px`,color:p.textPrimary,fontSize:13,outline:`none`},onKeyDown:e=>e.key===`Enter`&&ae(C,ee)}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,style:{flex:1},onClick:()=>ae(C,ee),children:`Connect`}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>te(null),children:`Cancel`})]})]})]})]}),r===`bt`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`setting-row`,style:{border:`none`,paddingTop:0},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Bluetooth`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:j?.powered?`Powered on`:`Off`})]}),(0,f.jsx)(`div`,{className:`switch ${j?.powered?`on`:``}`,onClick:()=>O(!j?.powered)})]}),j?.powered&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Discoverable`}),(0,f.jsxs)(`div`,{className:`setting-desc`,children:[j?.name,` (`,j?.address,`)`]})]}),(0,f.jsx)(`div`,{className:`switch ${j?.discoverable?`on`:``}`,onClick:async()=>{try{await b(`/api/bluetooth/discoverable`,{on:!j?.discoverable}),setTimeout(n,500)}catch{}}})]}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Bluetooth MIDI`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:j?.midi_enabled?`Enabled`:`Disabled`})]}),(0,f.jsx)(`div`,{className:`switch ${j?.midi_enabled?`on`:``}`,onClick:async()=>{try{await(j?.midi_enabled?b(`/api/bluetooth/midi-disable`):b(`/api/bluetooth/midi-enable`)),setTimeout(n,500)}catch{}}})]})]})]}),j?.powered&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,f.jsxs)(`div`,{className:`section-label`,style:{marginBottom:0},children:[`Paired Devices (`,u.length,`)`]}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:k,disabled:g,children:g?`...`:`Scan`})]}),u.length===0?(0,f.jsx)(`div`,{style:{fontSize:12,color:p.textDim,padding:`8px 0`},children:`No paired devices.`}):u.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name||e.address}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:[e.address,` · `,e.connected?`Connected`:`Paired`]})]}),!e.connected&&(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:async()=>{try{await b(`/api/bluetooth/connect`,{address:e.address})}catch{alert(`Failed`)}},children:`Connect`})]},e.address))]}),g&&s.length>0&&(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,style:{marginBottom:6},children:`Discovered`}),s.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name||e.address}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:e.address})]}),(0,f.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>le(e.address),children:`Pair`})]},e.address))]})]}),r===`routing`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,children:`4CM Routing`}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Mode`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:`Mono (normal) or 4CM (4-cable method)`})]}),(0,f.jsxs)(`select`,{value:w,onChange:e=>{T(e.target.value),ue(e.target.value,E)},style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`6px 10px`,color:p.textPrimary,fontSize:13,outline:`none`},children:[(0,f.jsx)(`option`,{value:`mono`,children:`Mono`}),(0,f.jsx)(`option`,{value:`4cm`,children:`4CM`})]})]}),w===`4cm`&&(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Breakpoint`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:`Chain position for amp send/return`})]}),(0,f.jsx)(`input`,{type:`number`,min:1,max:15,value:E,onChange:e=>{let t=+e.target.value;D(t),ue(w,t)},style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`6px 10px`,color:p.textPrimary,fontSize:13,width:60,outline:`none`,textAlign:`center`}})]})]}),(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Channel Mode`}),(0,f.jsxs)(`div`,{className:`setting-row`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`setting-label`,children:`Routing`}),(0,f.jsx)(`div`,{className:`setting-desc`,children:`Dual-mono: two independent channels · Stereo: linked as L/R pair`})]}),(0,f.jsxs)(`select`,{value:ne,onChange:e=>de(e.target.value),style:{background:p.surface,border:`1px solid ${p.border}`,borderRadius:6,padding:`6px 10px`,color:p.textPrimary,fontSize:13,outline:`none`},children:[(0,f.jsx)(`option`,{value:`dual-mono`,children:`Dual-Mono`}),(0,f.jsx)(`option`,{value:`stereo`,children:`Stereo`})]})]}),(0,f.jsx)(`div`,{style:{fontSize:10,color:p.textDim,marginTop:4,padding:`4px 0`},children:ne===`dual-mono`?`Each channel controlled independently from its own phone.`:`Channels A (Left) and B (Right) are controlled together.`})]})]})]})]})}function ce({state:e}){let[t,n]=(0,l.useState)(!1),[r,i]=(0,l.useState)([]),[a,o]=(0,l.useState)(!0),s=e?.input_level??0,c=e?.output_level??0,u=(0,l.useCallback)(async()=>{try{i((await y(`/api/captures`)).captures||[])}catch{}o(!1)},[]);return(0,l.useEffect)(()=>{u()},[u]),(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,f.jsxs)(`div`,{className:`screen-header`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Looper / Recorder`}),(0,f.jsxs)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:[e?.sample_rate?`${e.sample_rate/1e3}kHz`:`—`,t&&(0,f.jsx)(`span`,{style:{color:p.red,marginLeft:8},children:`● RECORDING`})]})]}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:t?(0,f.jsx)(`button`,{className:`btn btn-danger btn-sm`,onClick:async()=>{try{await b(`/api/capture/stop`),n(!1),u()}catch{alert(`Failed to stop recording`)}},style:{padding:`8px 16px`},children:`⏹ Stop`}):(0,f.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:async()=>{try{await b(`/api/capture/start`),n(!0)}catch{alert(`Failed to start recording`)}},style:{padding:`8px 16px`,background:p.red,color:`#fff`},children:`● Record`})})]}),(0,f.jsxs)(`div`,{className:`screen-body`,children:[(0,f.jsxs)(`div`,{className:`card`,style:{padding:`16px`,display:`flex`,gap:16,alignItems:`center`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Input Level`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:2,height:20,marginTop:4},children:Array.from({length:12}).map((e,t)=>{let n=Math.round(s/100*12)>t,r=t>=10?p.red:t>=8?`#E8C030`:p.green;return(0,f.jsx)(`div`,{style:{flex:1,borderRadius:2,background:n?r:p.border,transition:`all .05s`}},t)})})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{className:`section-label`,children:`Output Level`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:2,height:20,marginTop:4},children:Array.from({length:12}).map((e,t)=>{let n=Math.round(c/100*12)>t,r=t>=10?p.red:t>=8?`#E8C030`:p.green;return(0,f.jsx)(`div`,{style:{flex:1,borderRadius:2,background:n?r:p.border,transition:`all .05s`}},t)})})]})]}),t&&(0,f.jsxs)(`div`,{className:`card-sm`,style:{background:`${p.red}15`,borderColor:p.red,textAlign:`center`,padding:20},children:[(0,f.jsx)(`div`,{style:{fontSize:40,marginBottom:8,animation:`pulse 1s ease-in-out infinite`},children:`🔴`}),(0,f.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:p.red},children:`Recording...`}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:11,color:p.textDim,marginTop:4},children:`Saving to captures folder — tap Stop to finish`})]}),!t&&(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(`div`,{className:`card-sm`,children:[(0,f.jsxs)(`div`,{className:`section-label`,style:{marginBottom:6},children:[`Recordings (`,r.length,`)`]}),a?(0,f.jsx)(`div`,{className:`loader`,style:{margin:`10px auto`}}):r.length===0?(0,f.jsx)(`div`,{style:{fontSize:12,color:p.textDim,padding:`10px 0`},children:`No recordings yet. Tap ● Record to capture audio.`}):r.map(e=>(0,f.jsxs)(`div`,{className:`preset-row`,style:{padding:`8px 0`,borderRadius:0,borderBottom:`1px solid ${p.border}`},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(`div`,{style:{fontSize:13},children:e.name}),(0,f.jsx)(`div`,{className:`mono`,style:{fontSize:10,color:p.textDim},children:e.size_display})]}),(0,f.jsx)(`a`,{href:`/api/captures/${e.name}`,target:`_blank`,rel:`noopener`,className:`btn btn-ghost btn-sm`,style:{textDecoration:`none`},children:`▶ Play`})]},e.name))]})})]}),(0,f.jsx)(`style`,{children:`@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }`})]})}function le({onClose:e,state:t,connected:n}){let[r,i]=(0,l.useState)({}),[a,o]=(0,l.useState)(!0),[s,c]=(0,l.useState)(null),[u,d]=(0,l.useState)(``),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)(!1),v=(0,l.useRef)(null),S=t?.current_snapshot??0,C=(0,l.useCallback)(async()=>{if(!n){o(!1);return}try{i((await y(`/api/snapshots`)).snapshots||{})}catch{}o(!1)},[n]);(0,l.useEffect)(()=>{C()},[C]);let te=e=>{v.current=setTimeout(()=>{v.current=null,E(e)},600)},w=e=>{v.current&&(clearTimeout(v.current),v.current=null,r[String(e)]?D(e):E(e))},T=()=>{v.current&&=(clearTimeout(v.current),null)},E=async e=>{try{await b(`/api/snapshots/${e}/save`),h(e),setTimeout(()=>h(null),800),await C()}catch{}},D=async e=>{try{await b(`/api/snapshots/${e}/recall`),await C()}catch{}},re=async e=>{if(u.trim())try{await x(`/api/snapshots/${e}`,{name:u.trim()}),c(null),await C()}catch{}},ie=async e=>{try{await ee(`/api/snapshots/${e}`),await C()}catch{}};return(0,f.jsxs)(ne,{onClose:e,children:[(0,f.jsxs)(`div`,{className:`screen-header`,style:{justifyContent:`space-between`},children:[(0,f.jsx)(`div`,{className:`screen-title`,children:`Snapshots`}),(0,f.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:(0,f.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:4,fontSize:10,color:p.textDim,cursor:`pointer`},children:[(0,f.jsx)(`div`,{className:`switch ${g?`on`:``}`,style:{width:28,height:16},onClick:()=>_(e=>!e),children:(0,f.jsx)(`div`,{style:{position:`absolute`,top:1,left:g?11:1,width:13,height:13,borderRadius:`50%`,background:`#fff`,transition:`left .15s`}})}),`Discard Edits`]})})]}),(0,f.jsxs)(`div`,{className:`screen-body`,style:{gap:8},children:[(0,f.jsxs)(`div`,{style:{fontSize:11,color:p.textDim,marginBottom:4},children:[`Tap to recall · Hold to save`,g&&(0,f.jsx)(`span`,{style:{color:p.amber,marginLeft:8},children:`Edits will be discarded on recall`})]}),(0,f.jsx)(`div`,{className:`snap-grid`,children:[1,2,3,4,5,6,7,8].map(e=>{let t=r[String(e)],n=S===e,i=!!t,a=s===e,o=m===e;return(0,f.jsxs)(`div`,{className:`snap-slot ${i?`filled`:``} ${n?`active`:``}`,onMouseDown:()=>te(e),onTouchStart:()=>te(e),onMouseUp:()=>w(e),onTouchEnd:()=>w(e),onMouseLeave:T,onTouchCancel:T,style:o?{background:`rgba(58,184,122,.15)`}:{},children:[(0,f.jsx)(`div`,{className:`snap-num`,children:e}),a?(0,f.jsx)(`input`,{className:`snap-name-input`,value:u,onChange:e=>d(e.target.value),onBlur:()=>re(e),onKeyDown:t=>{t.key===`Enter`&&re(e),t.key===`Escape`&&c(null)},autoFocus:!0,onClick:e=>e.stopPropagation()}):t?(0,f.jsx)(`div`,{className:`snap-name`,onClick:n=>{n.stopPropagation(),c(e),d(t.name)},children:t.name}):(0,f.jsx)(`div`,{className:`snap-empty`,children:`Empty`}),o&&(0,f.jsx)(`div`,{className:`snap-save-indicator`}),n&&(0,f.jsx)(`div`,{style:{position:`absolute`,bottom:-2,left:`50%`,transform:`translateX(-50%)`,width:20,height:2,borderRadius:1,background:p.amber}})]},e)})}),S>0&&r[String(S)]&&(0,f.jsx)(`div`,{style:{marginTop:8,display:`flex`,gap:8},children:(0,f.jsxs)(`button`,{className:`btn btn-danger btn-sm`,style:{flex:1},onClick:()=>ie(S),children:[`Delete Snapshot `,S]})})]})]})}var ue=[{id:`rig`,label:`Rig`,icon:`🎛`},{id:`fx`,label:`FX Chain`,icon:`⛓`},{id:`models`,label:`Models`,icon:`📁`},{id:`irs`,label:`IRs`,icon:`🎚`},{id:`presets`,label:`Presets`,icon:`⭐`},{id:`settings`,label:`Settings`,icon:`⚙`},{id:`record`,label:`Looper`,icon:`🎙`}];function de(){let[e,t]=(0,l.useState)(`rig`),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(()=>{try{return localStorage.getItem(`pedal_channel`)||`guitar`}catch{return`guitar`}}),{state:o,connected:s,refresh:c}=C();(0,l.useEffect)(()=>{document.title=`Pi Multi-FX Pedal`},[]),(0,l.useEffect)(()=>{try{localStorage.setItem(`pedal_channel`,i)}catch{}_(i)},[i]);let u=e=>{a(e)};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`style`,{children:te}),(0,f.jsxs)(`div`,{style:{width:`100%`,maxWidth:440,margin:`0 auto`,height:`100dvh`,display:`flex`,flexDirection:`column`,background:p.bg,overflow:`hidden`,fontFamily:`'Inter', sans-serif`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`4px 10px`,background:p.panel,borderBottom:`1px solid ${p.border}`,flexShrink:0},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,f.jsx)(`div`,{style:{width:6,height:6,borderRadius:`50%`,background:s?p.green:p.red,boxShadow:s?`0 0 6px ${p.green}`:`none`}}),o?.channel_mode===`stereo`?(0,f.jsx)(`span`,{className:`badge badge-amber`,style:{fontSize:9,padding:`2px 7px`,letterSpacing:`.08em`},children:`STEREO`}):(0,f.jsxs)(`div`,{className:`toggle`,style:{margin:0,height:22},children:[(0,f.jsx)(`button`,{className:`toggle-btn ${i===`guitar`?`active`:``}`,onClick:()=>u(`guitar`),style:{padding:`2px 8px`,fontSize:10,fontWeight:700,letterSpacing:`.1em`},children:`GUITAR`}),(0,f.jsx)(`button`,{className:`toggle-btn ${i===`bass`?`active`:``}`,onClick:()=>u(`bass`),style:{padding:`2px 8px`,fontSize:10,fontWeight:700,letterSpacing:`.1em`},children:`BASS`})]}),o?.tuner_enabled&&(0,f.jsx)(`span`,{className:`badge badge-amber`,style:{fontSize:8,padding:`1px 5px`},children:`TUNER`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,f.jsxs)(`button`,{className:`snap-header-btn ${n?`active`:``}`,onClick:()=>r(!0),title:`Snapshots`,children:[`📷`,o?.current_snapshot>0&&(0,f.jsx)(`span`,{className:`snap-header-num`,children:o.current_snapshot})]}),o?.cpu_percent!=null&&(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:9,color:p.textDim},children:[`CPU `,o.cpu_percent,`%`]}),o?.sample_rate&&(0,f.jsxs)(`span`,{className:`mono`,style:{fontSize:9,color:p.textDim},children:[o.sample_rate/1e3,`kHz`]}),o?.bypass&&(0,f.jsx)(`span`,{className:`badge badge-red`,style:{fontSize:8,padding:`1px 5px`},children:`BYP`}),o?.nam_loaded&&(0,f.jsx)(`span`,{className:`badge badge-blue`,style:{fontSize:8,padding:`1px 5px`},children:`NAM`}),o?.ir_loaded&&(0,f.jsx)(`span`,{className:`badge badge-green`,style:{fontSize:8,padding:`1px 5px`},children:`IR`})]})]}),(0,f.jsxs)(`div`,{style:{flex:1,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[e===`rig`&&(0,f.jsx)(re,{state:o,connected:s,refresh:c}),e===`fx`&&(0,f.jsx)(ae,{state:o,connected:s}),e===`models`&&(0,f.jsx)(oe,{state:o,connected:s,refresh:c}),e===`irs`&&(0,f.jsx)(se,{state:o,connected:s,refresh:c}),e===`presets`&&(0,f.jsx)(O,{state:o,connected:s,refresh:c}),e===`settings`&&(0,f.jsx)(k,{state:o,connected:s,refresh:c}),e===`record`&&(0,f.jsx)(ce,{state:o})]}),(0,f.jsx)(`div`,{className:`tabbar`,children:ue.map(n=>(0,f.jsxs)(`div`,{className:`tab ${e===n.id?`active`:``}`,onClick:()=>t(n.id),children:[(0,f.jsx)(`span`,{style:{fontSize:14,display:`block`},children:n.icon}),n.label]},n.id))}),n&&(0,f.jsx)(le,{onClose:()=>r(!1),state:o,connected:s})]})]})}(0,u.createRoot)(document.getElementById(`root`)).render((0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(de,{})})); \ No newline at end of file diff --git a/src/web/ui-dist/img/footswitch_strip.png b/src/web/ui-dist/img/footswitch_strip.png new file mode 100644 index 0000000..9ae4ed5 Binary files /dev/null and b/src/web/ui-dist/img/footswitch_strip.png differ diff --git a/src/web/ui-dist/img/fx_amplifier.svg b/src/web/ui-dist/img/fx_amplifier.svg new file mode 100644 index 0000000..14fea41 --- /dev/null +++ b/src/web/ui-dist/img/fx_amplifier.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_analyzer.svg b/src/web/ui-dist/img/fx_analyzer.svg new file mode 100644 index 0000000..54be993 --- /dev/null +++ b/src/web/ui-dist/img/fx_analyzer.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_chorus.svg b/src/web/ui-dist/img/fx_chorus.svg new file mode 100644 index 0000000..301a39f --- /dev/null +++ b/src/web/ui-dist/img/fx_chorus.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_compressor.svg b/src/web/ui-dist/img/fx_compressor.svg new file mode 100644 index 0000000..f6d7029 --- /dev/null +++ b/src/web/ui-dist/img/fx_compressor.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_constant.svg b/src/web/ui-dist/img/fx_constant.svg new file mode 100644 index 0000000..321a890 --- /dev/null +++ b/src/web/ui-dist/img/fx_constant.svg @@ -0,0 +1,28 @@ + + + + + + + fx + + k + + + + + diff --git a/src/web/ui-dist/img/fx_converter.svg b/src/web/ui-dist/img/fx_converter.svg new file mode 100644 index 0000000..ade942c --- /dev/null +++ b/src/web/ui-dist/img/fx_converter.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_delay.svg b/src/web/ui-dist/img/fx_delay.svg new file mode 100644 index 0000000..b5e29ca --- /dev/null +++ b/src/web/ui-dist/img/fx_delay.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_dial.svg b/src/web/ui-dist/img/fx_dial.svg new file mode 100644 index 0000000..4152f63 --- /dev/null +++ b/src/web/ui-dist/img/fx_dial.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_distortion.svg b/src/web/ui-dist/img/fx_distortion.svg new file mode 100644 index 0000000..1ad8b16 --- /dev/null +++ b/src/web/ui-dist/img/fx_distortion.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_empty.svg b/src/web/ui-dist/img/fx_empty.svg new file mode 100644 index 0000000..e6f1eb5 --- /dev/null +++ b/src/web/ui-dist/img/fx_empty.svg @@ -0,0 +1,6 @@ + + + + + diff --git a/src/web/ui-dist/img/fx_eq.svg b/src/web/ui-dist/img/fx_eq.svg new file mode 100644 index 0000000..61d6873 --- /dev/null +++ b/src/web/ui-dist/img/fx_eq.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_error.svg b/src/web/ui-dist/img/fx_error.svg new file mode 100644 index 0000000..37f8f1f --- /dev/null +++ b/src/web/ui-dist/img/fx_error.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/src/web/ui-dist/img/fx_filter.svg b/src/web/ui-dist/img/fx_filter.svg new file mode 100644 index 0000000..e294879 --- /dev/null +++ b/src/web/ui-dist/img/fx_filter.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_filter_hp.svg b/src/web/ui-dist/img/fx_filter_hp.svg new file mode 100755 index 0000000..d695af5 --- /dev/null +++ b/src/web/ui-dist/img/fx_filter_hp.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_flanger.svg b/src/web/ui-dist/img/fx_flanger.svg new file mode 100644 index 0000000..4c55387 --- /dev/null +++ b/src/web/ui-dist/img/fx_flanger.svg @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_flanger2.svg b/src/web/ui-dist/img/fx_flanger2.svg new file mode 100644 index 0000000..ffed761 --- /dev/null +++ b/src/web/ui-dist/img/fx_flanger2.svg @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_function.svg b/src/web/ui-dist/img/fx_function.svg new file mode 100644 index 0000000..fb59658 --- /dev/null +++ b/src/web/ui-dist/img/fx_function.svg @@ -0,0 +1,41 @@ + + + + + + + + fx + + + + + diff --git a/src/web/ui-dist/img/fx_gate.svg b/src/web/ui-dist/img/fx_gate.svg new file mode 100644 index 0000000..8f2462a --- /dev/null +++ b/src/web/ui-dist/img/fx_gate.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_generator.svg b/src/web/ui-dist/img/fx_generator.svg new file mode 100644 index 0000000..b77ef00 --- /dev/null +++ b/src/web/ui-dist/img/fx_generator.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_instrument.svg b/src/web/ui-dist/img/fx_instrument.svg new file mode 100644 index 0000000..7627d61 --- /dev/null +++ b/src/web/ui-dist/img/fx_instrument.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_limiter.svg b/src/web/ui-dist/img/fx_limiter.svg new file mode 100644 index 0000000..2c465c7 --- /dev/null +++ b/src/web/ui-dist/img/fx_limiter.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_lr.svg b/src/web/ui-dist/img/fx_lr.svg new file mode 100644 index 0000000..6f178d2 --- /dev/null +++ b/src/web/ui-dist/img/fx_lr.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_mixer.svg b/src/web/ui-dist/img/fx_mixer.svg new file mode 100644 index 0000000..891fd3b --- /dev/null +++ b/src/web/ui-dist/img/fx_mixer.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_modulator.svg b/src/web/ui-dist/img/fx_modulator.svg new file mode 100644 index 0000000..f1bba64 --- /dev/null +++ b/src/web/ui-dist/img/fx_modulator.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_multiband_eq.svg b/src/web/ui-dist/img/fx_multiband_eq.svg new file mode 100755 index 0000000..c1a0305 --- /dev/null +++ b/src/web/ui-dist/img/fx_multiband_eq.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/src/web/ui-dist/img/fx_oscillator.svg b/src/web/ui-dist/img/fx_oscillator.svg new file mode 100644 index 0000000..b034041 --- /dev/null +++ b/src/web/ui-dist/img/fx_oscillator.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_parametric_eq.svg b/src/web/ui-dist/img/fx_parametric_eq.svg new file mode 100644 index 0000000..edf2ca7 --- /dev/null +++ b/src/web/ui-dist/img/fx_parametric_eq.svg @@ -0,0 +1,44 @@ + + + + + + + diff --git a/src/web/ui-dist/img/fx_phaser.svg b/src/web/ui-dist/img/fx_phaser.svg new file mode 100644 index 0000000..414b1e2 --- /dev/null +++ b/src/web/ui-dist/img/fx_phaser.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_pitch.svg b/src/web/ui-dist/img/fx_pitch.svg new file mode 100644 index 0000000..88b9517 --- /dev/null +++ b/src/web/ui-dist/img/fx_pitch.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_plugin.svg b/src/web/ui-dist/img/fx_plugin.svg new file mode 100644 index 0000000..4f868b4 --- /dev/null +++ b/src/web/ui-dist/img/fx_plugin.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/src/web/ui-dist/img/fx_reverb.svg b/src/web/ui-dist/img/fx_reverb.svg new file mode 100644 index 0000000..55f836f --- /dev/null +++ b/src/web/ui-dist/img/fx_reverb.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_simulator.svg b/src/web/ui-dist/img/fx_simulator.svg new file mode 100644 index 0000000..5cfd98c --- /dev/null +++ b/src/web/ui-dist/img/fx_simulator.svg @@ -0,0 +1,27 @@ + + + + + + + 0 + + 1 + 0 + 1 + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_spatial.svg b/src/web/ui-dist/img/fx_spatial.svg new file mode 100644 index 0000000..ae27920 --- /dev/null +++ b/src/web/ui-dist/img/fx_spatial.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_spectral.svg b/src/web/ui-dist/img/fx_spectral.svg new file mode 100644 index 0000000..dadd1a1 --- /dev/null +++ b/src/web/ui-dist/img/fx_spectral.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_split_a.svg b/src/web/ui-dist/img/fx_split_a.svg new file mode 100644 index 0000000..8dc208c --- /dev/null +++ b/src/web/ui-dist/img/fx_split_a.svg @@ -0,0 +1,18 @@ + + + + + + + A + + + + + + + + diff --git a/src/web/ui-dist/img/fx_split_b.svg b/src/web/ui-dist/img/fx_split_b.svg new file mode 100644 index 0000000..ddebee8 --- /dev/null +++ b/src/web/ui-dist/img/fx_split_b.svg @@ -0,0 +1,23 @@ + + + + + + + B + + + + + + + + + diff --git a/src/web/ui-dist/img/fx_terminal.svg b/src/web/ui-dist/img/fx_terminal.svg new file mode 100644 index 0000000..b2f746a --- /dev/null +++ b/src/web/ui-dist/img/fx_terminal.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/src/web/ui-dist/img/fx_utility.svg b/src/web/ui-dist/img/fx_utility.svg new file mode 100644 index 0000000..f7b40b8 --- /dev/null +++ b/src/web/ui-dist/img/fx_utility.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_bank.svg b/src/web/ui-dist/img/ic_bank.svg new file mode 100644 index 0000000..64a6601 --- /dev/null +++ b/src/web/ui-dist/img/ic_bank.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_drawer.svg b/src/web/ui-dist/img/ic_drawer.svg new file mode 100644 index 0000000..d2b51d3 --- /dev/null +++ b/src/web/ui-dist/img/ic_drawer.svg @@ -0,0 +1,11577 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + πpedal + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_drawer_2.svg b/src/web/ui-dist/img/ic_drawer_2.svg new file mode 100755 index 0000000..cd8e222 --- /dev/null +++ b/src/web/ui-dist/img/ic_drawer_2.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_logo.svg b/src/web/ui-dist/img/ic_logo.svg new file mode 100644 index 0000000..1f7e03c --- /dev/null +++ b/src/web/ui-dist/img/ic_logo.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_navigate_before.svg b/src/web/ui-dist/img/ic_navigate_before.svg new file mode 100644 index 0000000..f4a753b --- /dev/null +++ b/src/web/ui-dist/img/ic_navigate_before.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/web/ui-dist/img/ic_navigate_next.svg b/src/web/ui-dist/img/ic_navigate_next.svg new file mode 100644 index 0000000..6f4bc0a --- /dev/null +++ b/src/web/ui-dist/img/ic_navigate_next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/web/ui-dist/img/ic_presets.svg b/src/web/ui-dist/img/ic_presets.svg new file mode 100644 index 0000000..5f3d7d5 --- /dev/null +++ b/src/web/ui-dist/img/ic_presets.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/src/web/ui-dist/img/ic_presets_white.svg b/src/web/ui-dist/img/ic_presets_white.svg new file mode 100644 index 0000000..931ebb2 --- /dev/null +++ b/src/web/ui-dist/img/ic_presets_white.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/src/web/ui-dist/index.html b/src/web/ui-dist/index.html index 2c11002..543e560 100644 --- a/src/web/ui-dist/index.html +++ b/src/web/ui-dist/index.html @@ -2,11 +2,12 @@ + + + NAM Pedal - - Pi Multi-FX Pedal - - + +
diff --git a/tests/test_fx_blocks.py b/tests/test_fx_blocks.py index c880c3b..b30836a 100644 --- a/tests/test_fx_blocks.py +++ b/tests/test_fx_blocks.py @@ -1106,147 +1106,3 @@ class TestDelaySubtypePingPong: pipeline.load_preset(preset) out = pipeline.process(HALF_SCALE) assert np.allclose(out, HALF_SCALE) - - -# ═══════════════════════════════════════════════════════════════════ -# Drive Subtype: Klon Centaur -# ═══════════════════════════════════════════════════════════════════ - -class TestKlon: - """Klon Centaur-style transparent overdrive with clean blend.""" - - def test_output_clamped(self, pipeline): - """Klon output should stay within [-1, 1].""" - _load_fx(pipeline, FXType.OVERDRIVE, - {"subtype": "klon", "drive": 0.8, "gain": 1.0}) - out = pipeline.process(FULL_SCALE) - assert np.max(out) <= 1.0 and np.min(out) >= -1.0 - - def test_shapes_waveform(self, pipeline): - """Klon should change waveform shape at high drive.""" - _load_fx(pipeline, FXType.OVERDRIVE, - {"subtype": "klon", "drive": 1.0, "gain": 1.0}) - out = pipeline.process(SINE_TONE * 0.5) - assert not np.allclose(out, SINE_TONE * 0.5, atol=0.05) - - def test_clean_blend_dry(self, pipeline): - """Blend=0 should pass clean signal (mostly dry).""" - _load_fx(pipeline, FXType.OVERDRIVE, - {"subtype": "klon", "drive": 1.0, "blend": 0.0, "gain": 1.0}) - out = pipeline.process(SINE_TONE * 0.3) - assert np.allclose(out, SINE_TONE * 0.3, atol=0.02) - - def test_clean_blend_wet(self, pipeline): - """Blend=1 should pass only overdriven signal.""" - _load_fx(pipeline, FXType.OVERDRIVE, - {"subtype": "klon", "drive": 1.0, "blend": 1.0, "gain": 1.0}) - out = pipeline.process(SINE_TONE * 0.3) - assert np.max(out) > 0.0 - assert np.max(np.abs(out - SINE_TONE * 0.3)) > 0.02 - - def test_low_drive_passthrough(self, pipeline): - """Low drive should produce output.""" - _load_fx(pipeline, FXType.OVERDRIVE, - {"subtype": "klon", "drive": 0.0, "gain": 1.0}) - out = pipeline.process(SINE_TONE * 0.05) - assert np.max(np.abs(out)) > 0.0 - - def test_default_subtype_ts808(self, pipeline): - """No subtype=ts808 should use original overdrive.""" - _load_fx(pipeline, FXType.OVERDRIVE, {"drive": 0.5, "gain": 1.0}) - out = pipeline.process(SINE_TONE * 0.5) - assert np.max(out) <= 1.0 and np.min(out) >= -1.0 - - -# ═══════════════════════════════════════════════════════════════════ -# Drive Subtype: Blues Driver (BD-2) -# ═══════════════════════════════════════════════════════════════════ - -class TestBluesDriver: - """Blues Driver-style soft clipping with responsive tone stack.""" - - def test_output_clamped(self, pipeline): - """BD-2 output should stay within [-1, 1].""" - _load_fx(pipeline, FXType.OVERDRIVE, - {"subtype": "bd2", "drive": 0.8, "gain": 1.0}) - out = pipeline.process(FULL_SCALE) - assert np.max(out) <= 1.0 and np.min(out) >= -1.0 - - def test_shapes_waveform(self, pipeline): - """BD-2 should change waveform shape at high drive.""" - _load_fx(pipeline, FXType.OVERDRIVE, - {"subtype": "bd2", "drive": 1.0, "gain": 1.0}) - out = pipeline.process(SINE_TONE * 0.5) - assert not np.allclose(out, SINE_TONE * 0.5, atol=0.05) - - def test_tone_affects_output(self, pipeline): - """Different tone values should produce different output.""" - _load_fx(pipeline, FXType.OVERDRIVE, - {"subtype": "bd2", "drive": 0.5, "tone": 0.0, "gain": 1.0}) - out_a = pipeline.process(SINE_TONE * 0.5) - - pipeline.load_preset(Preset( - name="test", chain=[FXBlock(FXType.OVERDRIVE, enabled=True, - params={"subtype": "bd2", "drive": 0.5, "tone": 1.0, "gain": 1.0})], - master_volume=1.0, - )) - out_b = pipeline.process(SINE_TONE * 0.5) - assert not np.allclose(out_a, out_b, atol=0.01) - - def test_low_drive_passthrough(self, pipeline): - """Low drive should pass signal.""" - _load_fx(pipeline, FXType.OVERDRIVE, - {"subtype": "bd2", "drive": 0.0, "gain": 1.0}) - out = pipeline.process(SINE_TONE * 0.05) - assert np.max(np.abs(out)) > 0.0 - - -# ═══════════════════════════════════════════════════════════════════ -# Drive Subtype: Big Muff Pi -# ═══════════════════════════════════════════════════════════════════ - -class TestBigMuff: - """Big Muff Pi-style fuzz with tone stack.""" - - def test_output_clamped(self, pipeline): - """Muff output should stay within [-1, 1].""" - _load_fx(pipeline, FXType.FUZZ, - {"subtype": "muff", "sustain": 0.8, "volume": 0.5}) - out = pipeline.process(FULL_SCALE) - assert np.max(out) <= 1.0 and np.min(out) >= -1.0 - - def test_fuzz_shapes_waveform(self, pipeline): - """Muff should significantly reshape waveform (fuzz).""" - _load_fx(pipeline, FXType.FUZZ, - {"subtype": "muff", "sustain": 1.0, "volume": 0.5}) - out = pipeline.process(SINE_TONE * 0.8) - assert not np.allclose(out, SINE_TONE * 0.8, atol=0.05) - rms_out = np.sqrt(np.mean(out ** 2)) - assert rms_out > 0.2, "Muff should produce significant output" - - def test_tone_sweep(self, pipeline): - """Different tone positions should produce different EQ.""" - _load_fx(pipeline, FXType.FUZZ, - {"subtype": "muff", "sustain": 0.5, "tone": 0.0, "volume": 0.5}) - out_a = pipeline.process(SINE_TONE) - - pipeline.load_preset(Preset( - name="test", chain=[FXBlock(FXType.FUZZ, enabled=True, - params={"subtype": "muff", "sustain": 0.5, "tone": 1.0, "volume": 0.5})], - master_volume=1.0, - )) - out_b = pipeline.process(SINE_TONE) - assert not np.allclose(out_a, out_b, atol=0.01) - - def test_silence_muted(self, pipeline): - """Silence in should give silence out.""" - _load_fx(pipeline, FXType.FUZZ, - {"subtype": "muff", "sustain": 0.5, "volume": 0.5}) - out = pipeline.process(SILENCE) - assert np.max(np.abs(out)) == 0.0 - - def test_default_subtype_fuzz(self, pipeline): - """No subtype on FUZZ should use original fuzz algorithm.""" - _load_fx(pipeline, FXType.FUZZ, {"drive": 0.5, "gain": 0.5}) - out = pipeline.process(SINE_TONE * 0.8) - assert np.max(out) <= 1.0 and np.min(out) >= -1.0 \ No newline at end of file