diff --git a/scripts/dots/dots.ts b/scripts/dots/dots.ts index d125018..8bd04d1 100644 --- a/scripts/dots/dots.ts +++ b/scripts/dots/dots.ts @@ -29,7 +29,6 @@ const initDots = (targetElement: HTMLElement) => { const cubeSize = 3; const pointSpacing = 0.08; const pointsPerAxis = Math.floor(cubeSize / pointSpacing); - const pointCount = pointsPerAxis ** 3; const pointsArray = []; for (let x = 0; x < pointsPerAxis; x++) { @@ -88,7 +87,6 @@ const initDots = (targetElement: HTMLElement) => { points.rotation.z = minimalRotationSpeed; }; - console.log(pointCount); animate(); } diff --git a/scripts/nav/bun.lockb b/scripts/nav/bun.lockb index a0941af..ab86c4a 100644 Binary files a/scripts/nav/bun.lockb and b/scripts/nav/bun.lockb differ diff --git a/scripts/nav/nav.ts b/scripts/nav/nav.ts index 5f33d3a..2761bde 100644 --- a/scripts/nav/nav.ts +++ b/scripts/nav/nav.ts @@ -1,6 +1,7 @@ /// /// import { animate } from "motion"; +import * as Cookies from "es-cookie"; var prevScrollPos = window.scrollY; var navAnimationInProgress = false; @@ -91,3 +92,36 @@ if(mobileNavDialog && mobileNavTrigger && mobileNavDismissal) { mobileNavTrigger.addEventListener("click", handleOpenNav); mobileNavDismissal.addEventListener("click", closeMobileNav); } + +// cookies + +const cookieName = "teonite-accept-cookies"; + +type TeoniteCookie = { + accepted: boolean; +} + +const accepted = (): boolean => { + const content = Cookies.get(cookieName); + if(content) { + const parsed = JSON.parse(content) as TeoniteCookie; + return parsed.accepted; + } + return false; +} + +if(!accepted()) { + const cookieElement = document.getElementById("cookies"); + const acceptCookieElement = document.getElementById("accept-cookies"); + if(cookieElement && acceptCookieElement) { + cookieElement.classList.add("show"); + + acceptCookieElement.addEventListener("click", () => { + const cookie: TeoniteCookie = { + accepted: true + }; + Cookies.set(cookieName, JSON.stringify(cookie)); + cookieElement.classList.remove("show"); + }); + } +} diff --git a/scripts/nav/package.json b/scripts/nav/package.json index da0c3d4..402c2d9 100644 --- a/scripts/nav/package.json +++ b/scripts/nav/package.json @@ -9,6 +9,7 @@ "typescript": "^5.0.0" }, "dependencies": { + "es-cookie": "^1.4.0", "motion": "^10.16.4" } } \ No newline at end of file diff --git a/scss/components/_cookies.scss b/scss/components/_cookies.scss new file mode 100644 index 0000000..5053882 --- /dev/null +++ b/scss/components/_cookies.scss @@ -0,0 +1,51 @@ +@use "../helpers/" as *; + +#cookies { + box-sizing: border-box; + padding: 20px 10px; + background-color: #000; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + display: none; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + column-gap: var(--spacing-m); + z-index: 9; + + &.show { + display: flex; + } + + p, + a, + button { + @include typography(label); + color: #fff; + } + + a { + text-decoration: underline; + text-decoration-color: #fff; + text-underline-offset: 5px; + } + + button { + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 5px var(--spacing-s); + border: 1px solid #fff; + outline-color: #fff; + background-color: transparent; + cursor: pointer; + + &:hover { + outline-width: 3px; + } + } +} diff --git a/scss/components/_essentials.scss b/scss/components/_essentials.scss index e3cd8b7..e8b2e6b 100644 --- a/scss/components/_essentials.scss +++ b/scss/components/_essentials.scss @@ -3,3 +3,4 @@ @forward "./footer"; @forward "./page_link"; @forward "./book"; +@forward "./cookies"; diff --git a/src/assets/css/pages/article.css b/src/assets/css/pages/article.css index 84b3039..c3495cf 100644 --- a/src/assets/css/pages/article.css +++ b/src/assets/css/pages/article.css @@ -509,6 +509,61 @@ a.book:hover { outline: solid 2px var(--main-text); } +#cookies { + box-sizing: border-box; + padding: 20px 10px; + background-color: #000; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + display: none; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + column-gap: var(--spacing-m); + z-index: 9; +} +#cookies.show { + display: flex; +} +#cookies p, +#cookies a, +#cookies button { + font-family: "PP Neue Machina"; + font-weight: 400; + font-size: calc(12px * var(--fonts-scale)); + line-height: 1.5; + color: #fff; +} +@media (min-width: 992px) { + #cookies p, + #cookies a, + #cookies button { + font-size: calc(20px * var(--fonts-scale)); + } +} +#cookies a { + text-decoration: underline; + text-decoration-color: #fff; + text-underline-offset: 5px; +} +#cookies button { + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 5px var(--spacing-s); + border: 1px solid #fff; + outline-color: #fff; + background-color: transparent; + cursor: pointer; +} +#cookies button:hover { + outline-width: 3px; +} + html[data-theme=dark] { --main-text: #fff; --main-background: #000; diff --git a/src/assets/css/pages/article.css.map b/src/assets/css/pages/article.css.map index 6576356..d8cc452 100644 --- a/src/assets/css/pages/article.css.map +++ b/src/assets/css/pages/article.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../../../scss/components/_divider.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/_variables.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/pages/article.scss"],"names":[],"mappings":";AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AC0BA;ED9BF;IAMI;;;;AEfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ADyBE;ECvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ADCF;ECRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ADVJ;ECKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AD7CA;ECkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ADlJF;EC4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AH+BE;EGvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AHiBA;EGzBF;IAWI;IACA;IACA;;;AHoCF;EGjDF;IAiBI;IACA;;;AHOF;EGzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;AHfF;EGKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;AHrDN;EG6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;AHnDR;EGyDA;IAEI;IACA;;;AHvEJ;EGoEA;IAMI;IACA;;;AHhEJ;EGoEA;IAEI;IACA;;;AHlFJ;EG+EA;IAMI;IACA;;;AHtFJ;EG+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AH7HF;EG2GA;IAKI;IACA;IACA;;;AHlHJ;EG2GA;IAWI;IACA;IACA;;;AHxHJ;EG2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;AJkBA;EItCF;IAgBI;;;AJsBF;EItCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;AFSA;EKtCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;ACTN;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;ANQE;EMjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;ACzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;ATqBE;ESzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AChEJ;EACE;;AAEA;EACE;EACA;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AVeF;EUlBA;IAMI;IACA;IACA;;;AAKN;EACE;EACA;EACA;EACA;EACA;EAEA;;AVFA;EULF;IAUI;;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AACA;ER9DJ;EACA;EAWE;EACA;EQmDI;;AV1BJ;EUwBE;IR/CA;;;AQoDF;EACE;EACA;EACA;EACA;;AAEF;ERzEF;EACA;EAGE;EACA;EQsEE;;AVrCF;EUmCA;IRlEE;;;AQsEF;ER7EF;EACA;EAmBE;EACA;EQ0DE;EACA;;AV1CF;EUuCA;IRtDE;;;AQ2DF;ERlFF;EACA;EAWE;EACA;EQuEE;;AV9CF;EU4CA;IRnEE;;;AQuEF;ERtFF;EACA;EA2BE;EACA;EQ2DE;;AVlDF;EUgDA;IRvDE;;;AQ4DF;EACE;EACA;;AAGF;AAAA;EAEE;EACA;EACA;;AACA;AAAA;EACE;ERtGN;EACA;EA2BE;EACA;EQ2EI;;AVlEJ;EU+DE;AAAA;IRtEA;;;AQ6EF;EACE;;AV5DF;EU2DA;IAII;IACA;;;AAIA;EACE;EACA;EACA;EACA;EACA;EACA;;AV1EN;EUoEI;IASI;;;AAMR;EACE;EACA;EACA;;AAGF;EACE;;AACA;EACE","file":"article.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../../../scss/components/_divider.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/components/_cookies.scss","../../../../scss/_variables.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/pages/article.scss"],"names":[],"mappings":";AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AC0BA;ED9BF;IAMI;;;;AEfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ADyBE;ECvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ADCF;ECRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ADVJ;ECKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AD7CA;ECkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ADlJF;EC4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AH+BE;EGvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AHiBA;EGzBF;IAWI;IACA;IACA;;;AHoCF;EGjDF;IAiBI;IACA;;;AHOF;EGzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;AHfF;EGKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;AHrDN;EG6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;AHnDR;EGyDA;IAEI;IACA;;;AHvEJ;EGoEA;IAMI;IACA;;;AHhEJ;EGoEA;IAEI;IACA;;;AHlFJ;EG+EA;IAMI;IACA;;;AHtFJ;EG+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AH7HF;EG2GA;IAKI;IACA;IACA;;;AHlHJ;EG2GA;IAWI;IACA;IACA;;;AHxHJ;EG2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;AJkBA;EItCF;IAgBI;;;AJsBF;EItCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;AFSA;EKtCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;AClBN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;AAAA;AAAA;EJlBA;EACA;EAmCE;EACA;EIfA;;ANgBA;EMpBF;AAAA;AAAA;IJqBI;;;AIdJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;ACpCN;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;APQE;EOjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;ACzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AVqBE;EUzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AChEJ;EACE;;AAEA;EACE;EACA;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AXeF;EWlBA;IAMI;IACA;IACA;;;AAKN;EACE;EACA;EACA;EACA;EACA;EAEA;;AXFA;EWLF;IAUI;;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AACA;ET9DJ;EACA;EAWE;EACA;ESmDI;;AX1BJ;EWwBE;IT/CA;;;ASoDF;EACE;EACA;EACA;EACA;;AAEF;ETzEF;EACA;EAGE;EACA;ESsEE;;AXrCF;EWmCA;ITlEE;;;ASsEF;ET7EF;EACA;EAmBE;EACA;ES0DE;EACA;;AX1CF;EWuCA;ITtDE;;;AS2DF;ETlFF;EACA;EAWE;EACA;ESuEE;;AX9CF;EW4CA;ITnEE;;;ASuEF;ETtFF;EACA;EA2BE;EACA;ES2DE;;AXlDF;EWgDA;ITvDE;;;AS4DF;EACE;EACA;;AAGF;AAAA;EAEE;EACA;EACA;;AACA;AAAA;EACE;ETtGN;EACA;EA2BE;EACA;ES2EI;;AXlEJ;EW+DE;AAAA;ITtEA;;;AS6EF;EACE;;AX5DF;EW2DA;IAII;IACA;;;AAIA;EACE;EACA;EACA;EACA;EACA;EACA;;AX1EN;EWoEI;IASI;;;AAMR;EACE;EACA;EACA;;AAGF;EACE;;AACA;EACE","file":"article.css"} \ No newline at end of file diff --git a/src/assets/css/pages/contact.css b/src/assets/css/pages/contact.css index 6171eeb..695ec30 100644 --- a/src/assets/css/pages/contact.css +++ b/src/assets/css/pages/contact.css @@ -648,6 +648,61 @@ a.book:hover { outline: solid 2px var(--main-text); } +#cookies { + box-sizing: border-box; + padding: 20px 10px; + background-color: #000; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + display: none; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + column-gap: var(--spacing-m); + z-index: 9; +} +#cookies.show { + display: flex; +} +#cookies p, +#cookies a, +#cookies button { + font-family: "PP Neue Machina"; + font-weight: 400; + font-size: calc(12px * var(--fonts-scale)); + line-height: 1.5; + color: #fff; +} +@media (min-width: 992px) { + #cookies p, + #cookies a, + #cookies button { + font-size: calc(20px * var(--fonts-scale)); + } +} +#cookies a { + text-decoration: underline; + text-decoration-color: #fff; + text-underline-offset: 5px; +} +#cookies button { + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 5px var(--spacing-s); + border: 1px solid #fff; + outline-color: #fff; + background-color: transparent; + cursor: pointer; +} +#cookies button:hover { + outline-width: 3px; +} + main { display: flex; flex-flow: column; diff --git a/src/assets/css/pages/contact.css.map b/src/assets/css/pages/contact.css.map index 49795a0..8192369 100644 --- a/src/assets/css/pages/contact.css.map +++ b/src/assets/css/pages/contact.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../../../scss/_variables.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/components/_divider.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/pages/contact.scss"],"names":[],"mappings":";AAWA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;ACQE;EDjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;AEzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AHqBE;EGzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AClEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AJ0BA;EI9BF;IAMI;;;;ACfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ALyBE;EKvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ALCF;EKRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ALVJ;EKKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AL7CA;EKkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ALlJF;EK4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AP+BE;EOvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;APiBA;EOzBF;IAWI;IACA;IACA;;;APoCF;EOjDF;IAiBI;IACA;;;APOF;EOzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;APfF;EOKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;APrDN;EO6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;APnDR;EOyDA;IAEI;IACA;;;APvEJ;EOoEA;IAMI;IACA;;;APhEJ;EOoEA;IAEI;IACA;;;APlFJ;EO+EA;IAMI;IACA;;;APtFJ;EO+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AP7HF;EO2GA;IAKI;IACA;IACA;;;APlHJ;EO2GA;IAWI;IACA;IACA;;;APxHJ;EO2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;ARkBA;EQtCF;IAgBI;;;ARsBF;EQtCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;ANSA;EStCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;AChBN;EACE;EACA;EACA;EACA;EACA;EACA;EAEA;;AV6BE;EUrCJ;IAWI;;;AAGF;EJfA;EACA;EAGE;EACA;EIYA;EACA;;AVoBA;EUvBF;IJRI;;;AIcJ;EACE;EACA;EACA;EACA;EACA;;AVYA;EUjBF;IAQI;;;AAGF;EACE;;AVKF;EUNA;IAGI;;;AAKN;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;;AVbA;EUMF;IAUI;IACA;;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;EJjEJ;EACA;EAmBE;EACA;EIgDE;EACA;;AVhCF;EUyBA;IJxCE;;;ANeF;EUyBA;IAUI;IACA;;;AAIJ;EACE;EACA;EJhFJ;EACA;EAWE;EACA;EIuEE;;AV9CF;EUwCA;IJ/DE;;;ANuBF;EUwCA;IASI;IACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AV7DF;EUsDA;IAUI;IACA;;;AAGF;EACE;;AAGF;AAAA;EAEE;EJhHN;EACA;EA2BE;EACA;EIuFI;;AV9EJ;EUwEE;AAAA;IJ/EA","file":"contact.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../../../scss/_variables.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/components/_divider.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/components/_cookies.scss","../../../../scss/pages/contact.scss"],"names":[],"mappings":";AAWA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;ACQE;EDjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;AEzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AHqBE;EGzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AClEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AJ0BA;EI9BF;IAMI;;;;ACfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ALyBE;EKvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ALCF;EKRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ALVJ;EKKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AL7CA;EKkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ALlJF;EK4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AP+BE;EOvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;APiBA;EOzBF;IAWI;IACA;IACA;;;APoCF;EOjDF;IAiBI;IACA;;;APOF;EOzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;APfF;EOKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;APrDN;EO6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;APnDR;EOyDA;IAEI;IACA;;;APvEJ;EOoEA;IAMI;IACA;;;APhEJ;EOoEA;IAEI;IACA;;;APlFJ;EO+EA;IAMI;IACA;;;APtFJ;EO+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AP7HF;EO2GA;IAKI;IACA;IACA;;;APlHJ;EO2GA;IAWI;IACA;IACA;;;APxHJ;EO2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;ARkBA;EQtCF;IAgBI;;;ARsBF;EQtCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;ANSA;EStCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;AClBN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;AAAA;AAAA;EJlBA;EACA;EAmCE;EACA;EIfA;;AVgBA;EUpBF;AAAA;AAAA;IJqBI;;;AIdJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AC3CN;EACE;EACA;EACA;EACA;EACA;EACA;EAEA;;AX6BE;EWrCJ;IAWI;;;AAGF;ELfA;EACA;EAGE;EACA;EKYA;EACA;;AXoBA;EWvBF;ILRI;;;AKcJ;EACE;EACA;EACA;EACA;EACA;;AXYA;EWjBF;IAQI;;;AAGF;EACE;;AXKF;EWNA;IAGI;;;AAKN;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;;AXbA;EWMF;IAUI;IACA;;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;ELjEJ;EACA;EAmBE;EACA;EKgDE;EACA;;AXhCF;EWyBA;ILxCE;;;ANeF;EWyBA;IAUI;IACA;;;AAIJ;EACE;EACA;ELhFJ;EACA;EAWE;EACA;EKuEE;;AX9CF;EWwCA;IL/DE;;;ANuBF;EWwCA;IASI;IACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AX7DF;EWsDA;IAUI;IACA;;;AAGF;EACE;;AAGF;AAAA;EAEE;ELhHN;EACA;EA2BE;EACA;EKuFI;;AX9EJ;EWwEE;AAAA;IL/EA","file":"contact.css"} \ No newline at end of file diff --git a/src/assets/css/pages/main.css b/src/assets/css/pages/main.css index 2702c65..ab51a87 100644 --- a/src/assets/css/pages/main.css +++ b/src/assets/css/pages/main.css @@ -648,6 +648,61 @@ a.book:hover { outline: solid 2px var(--main-text); } +#cookies { + box-sizing: border-box; + padding: 20px 10px; + background-color: #000; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + display: none; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + column-gap: var(--spacing-m); + z-index: 9; +} +#cookies.show { + display: flex; +} +#cookies p, +#cookies a, +#cookies button { + font-family: "PP Neue Machina"; + font-weight: 400; + font-size: calc(12px * var(--fonts-scale)); + line-height: 1.5; + color: #fff; +} +@media (min-width: 992px) { + #cookies p, + #cookies a, + #cookies button { + font-size: calc(20px * var(--fonts-scale)); + } +} +#cookies a { + text-decoration: underline; + text-decoration-color: #fff; + text-underline-offset: 5px; +} +#cookies button { + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 5px var(--spacing-s); + border: 1px solid #fff; + outline-color: #fff; + background-color: transparent; + cursor: pointer; +} +#cookies button:hover { + outline-width: 3px; +} + #trusted-by { display: flex; flex-flow: row wrap; diff --git a/src/assets/css/pages/main.css.map b/src/assets/css/pages/main.css.map index 7aa392e..a94890e 100644 --- a/src/assets/css/pages/main.css.map +++ b/src/assets/css/pages/main.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../../../scss/_variables.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/components/_divider.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/components/_trustedby.scss","../../../../scss/pages/main.scss"],"names":[],"mappings":";AAWA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;ACQE;EDjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;AEzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AHqBE;EGzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AClEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AJ0BA;EI9BF;IAMI;;;;ACfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ALyBE;EKvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ALCF;EKRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ALVJ;EKKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AL7CA;EKkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ALlJF;EK4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AP+BE;EOvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;APiBA;EOzBF;IAWI;IACA;IACA;;;APoCF;EOjDF;IAiBI;IACA;;;APOF;EOzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;APfF;EOKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;APrDN;EO6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;APnDR;EOyDA;IAEI;IACA;;;APvEJ;EOoEA;IAMI;IACA;;;APhEJ;EOoEA;IAEI;IACA;;;APlFJ;EO+EA;IAMI;IACA;;;APtFJ;EO+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AP7HF;EO2GA;IAKI;IACA;IACA;;;APlHJ;EO2GA;IAWI;IACA;IACA;;;APxHJ;EO2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;ARkBA;EQtCF;IAgBI;;;ARsBF;EQtCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;ANSA;EStCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;AClBN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EJVA;EACA;EAmCE;EACA;EIzBA;EACA;;AVyBA;EU5BF;IJ6BI;;;AIvBJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;AVWA;EUtBF;IAcI;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;;AChDV;EACE;EACA;;AACA;ELLA;EACA;EAGE;EACA;EKEA;EACA;;AX8BA;EWjCF;ILEI;;;AN+BF;EWpCJ;IAUI;;;;AAIJ;EACE;EACA;EACA;EACA;;AAEA;ELtBA;EACA;EAmBE;EACA;EKGA;EACA;EACA;;AXYA;EWhBF;ILCI;;;AKMJ;EL7BA;EACA;EAWE;EACA;EKkBA;;AXOA;EWTF;ILdI;;;AKmBJ;ELlCA;EACA;EA2BE;EACA;EKOA;;AXEA;EWJF;ILHI;;;AKQJ;EACE;EACA;EACA;EACA;EACA;;AXNA;EWCF;IAQI;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;;AAON;EACE;EACA;EACA;EACA;EACA;;AXjCA;EW4BF;IAQI;IACA;IACA;;;AAGF;EACE;EACA;ELjFJ;EACA;EAmBE;EACA;EK8DE;EACA;EACA;;AX/CF;EWyCA;ILxDE;;;AKiEF;EACE;EACA;;AXpDF;EWkDA;IAKI;IACA;;;;AAMR;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AX7EA;EWqEF;IAWI;IACA;IACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;;AX9FJ;EW2FE;IAKI;;EACA;IACE;IACA;IACA;IACA;IACA;;;AAIJ;EACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;AXtHF;EWgHA;IASI;IACA;;;AAGF;EACE;ELpKN;EACA;EAWE;EACA;EKyJI;EACA;;AXjIJ;EW6HE;ILpJA;;;AK0JA;EACE;EL1KN;EACA;EA2BE;EACA;EK+II;EACA;;AXvIJ;EWmIE;IL1IA;;;AKgJA;EACE;EACA;EACA;EACA;EACA;EACA;;AX/IJ;EWqJI;IACE;;EAEF;IACE;;EAEE;IACE;IACA;IACA","file":"main.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../../../scss/_variables.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/components/_divider.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/components/_cookies.scss","../../../../scss/components/_trustedby.scss","../../../../scss/pages/main.scss"],"names":[],"mappings":";AAWA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;ACQE;EDjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;AEzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AHqBE;EGzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AClEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AJ0BA;EI9BF;IAMI;;;;ACfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ALyBE;EKvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ALCF;EKRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ALVJ;EKKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AL7CA;EKkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ALlJF;EK4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AP+BE;EOvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;APiBA;EOzBF;IAWI;IACA;IACA;;;APoCF;EOjDF;IAiBI;IACA;;;APOF;EOzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;APfF;EOKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;APrDN;EO6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;APnDR;EOyDA;IAEI;IACA;;;APvEJ;EOoEA;IAMI;IACA;;;APhEJ;EOoEA;IAEI;IACA;;;APlFJ;EO+EA;IAMI;IACA;;;APtFJ;EO+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AP7HF;EO2GA;IAKI;IACA;IACA;;;APlHJ;EO2GA;IAWI;IACA;IACA;;;APxHJ;EO2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;ARkBA;EQtCF;IAgBI;;;ARsBF;EQtCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;ANSA;EStCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;AClBN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;AAAA;AAAA;EJlBA;EACA;EAmCE;EACA;EIfA;;AVgBA;EUpBF;AAAA;AAAA;IJqBI;;;AIdJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AC7CN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;ELVA;EACA;EAmCE;EACA;EKzBA;EACA;;AXyBA;EW5BF;IL6BI;;;AKvBJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;AXWA;EWtBF;IAcI;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;;AChDV;EACE;EACA;;AACA;ENLA;EACA;EAGE;EACA;EMEA;EACA;;AZ8BA;EYjCF;INEI;;;AN+BF;EYpCJ;IAUI;;;;AAIJ;EACE;EACA;EACA;EACA;;AAEA;ENtBA;EACA;EAmBE;EACA;EMGA;EACA;EACA;;AZYA;EYhBF;INCI;;;AMMJ;EN7BA;EACA;EAWE;EACA;EMkBA;;AZOA;EYTF;INdI;;;AMmBJ;ENlCA;EACA;EA2BE;EACA;EMOA;;AZEA;EYJF;INHI;;;AMQJ;EACE;EACA;EACA;EACA;EACA;;AZNA;EYCF;IAQI;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;;AAON;EACE;EACA;EACA;EACA;EACA;;AZjCA;EY4BF;IAQI;IACA;IACA;;;AAGF;EACE;EACA;ENjFJ;EACA;EAmBE;EACA;EM8DE;EACA;EACA;;AZ/CF;EYyCA;INxDE;;;AMiEF;EACE;EACA;;AZpDF;EYkDA;IAKI;IACA;;;;AAMR;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AZ7EA;EYqEF;IAWI;IACA;IACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;;AZ9FJ;EY2FE;IAKI;;EACA;IACE;IACA;IACA;IACA;IACA;;;AAIJ;EACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;AZtHF;EYgHA;IASI;IACA;;;AAGF;EACE;ENpKN;EACA;EAWE;EACA;EMyJI;EACA;;AZjIJ;EY6HE;INpJA;;;AM0JA;EACE;EN1KN;EACA;EA2BE;EACA;EM+II;EACA;;AZvIJ;EYmIE;IN1IA;;;AMgJA;EACE;EACA;EACA;EACA;EACA;EACA;;AZ/IJ;EYqJI;IACE;;EAEF;IACE;;EAEE;IACE;IACA;IACA","file":"main.css"} \ No newline at end of file diff --git a/src/assets/css/pages/products.css b/src/assets/css/pages/products.css index 45f9609..a28191c 100644 --- a/src/assets/css/pages/products.css +++ b/src/assets/css/pages/products.css @@ -509,6 +509,61 @@ a.book:hover { outline: solid 2px var(--main-text); } +#cookies { + box-sizing: border-box; + padding: 20px 10px; + background-color: #000; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + display: none; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + column-gap: var(--spacing-m); + z-index: 9; +} +#cookies.show { + display: flex; +} +#cookies p, +#cookies a, +#cookies button { + font-family: "PP Neue Machina"; + font-weight: 400; + font-size: calc(12px * var(--fonts-scale)); + line-height: 1.5; + color: #fff; +} +@media (min-width: 992px) { + #cookies p, + #cookies a, + #cookies button { + font-size: calc(20px * var(--fonts-scale)); + } +} +#cookies a { + text-decoration: underline; + text-decoration-color: #fff; + text-underline-offset: 5px; +} +#cookies button { + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 5px var(--spacing-s); + border: 1px solid #fff; + outline-color: #fff; + background-color: transparent; + cursor: pointer; +} +#cookies button:hover { + outline-width: 3px; +} + #trusted-by { display: flex; flex-flow: row wrap; diff --git a/src/assets/css/pages/products.css.map b/src/assets/css/pages/products.css.map index 0fdbdf4..b3be4f2 100644 --- a/src/assets/css/pages/products.css.map +++ b/src/assets/css/pages/products.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../../../scss/components/_divider.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/components/_trustedby.scss","../../../../scss/_variables.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/pages/products.scss"],"names":[],"mappings":";AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AC0BA;ED9BF;IAMI;;;;AEfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ADyBE;ECvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ADCF;ECRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ADVJ;ECKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AD7CA;ECkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ADlJF;EC4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AH+BE;EGvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AHiBA;EGzBF;IAWI;IACA;IACA;;;AHoCF;EGjDF;IAiBI;IACA;;;AHOF;EGzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;AHfF;EGKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;AHrDN;EG6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;AHnDR;EGyDA;IAEI;IACA;;;AHvEJ;EGoEA;IAMI;IACA;;;AHhEJ;EGoEA;IAEI;IACA;;;AHlFJ;EG+EA;IAMI;IACA;;;AHtFJ;EG+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AH7HF;EG2GA;IAKI;IACA;IACA;;;AHlHJ;EG2GA;IAWI;IACA;IACA;;;AHxHJ;EG2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;AJkBA;EItCF;IAgBI;;;AJsBF;EItCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;AFSA;EKtCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;AClBN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EJVA;EACA;EAmCE;EACA;EIzBA;EACA;;ANyBA;EM5BF;IJ6BI;;;AIvBJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;ANWA;EMtBF;IAcI;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;;AC1CV;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;APQE;EOjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;ACzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AVqBE;EUzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AC/DJ;EACE;EACA;;AXkCE;EWpCJ;IAKI;;;AAGF;ETVA;EACA;EAGE;EACA;ESOA;EACA;;AXyBA;EW5BF;ITHI;;;ASSJ;EACE;EACA;EACA;EACA;;AXkBA;EWtBF;IAOI;;;AAEF;EACE;;AXYF;EWbA;IAGI;;;;AAMR;EACE;;AACA;ETpCA;EACA;EAmBE;EACA;ESiBA;EACA;EACA;EACA;;AXHA;EWFF;ITbI;;;ASoBJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AXZA;EWKF;IAUI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AAEA;ETvFN;EACA;EAmCE;EACA;ESoDM;;AXnDN;EWiDI;IThDF;;;ASqDE;EACE;;AAGF;EACE;EACA","file":"products.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../../../scss/components/_divider.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/components/_cookies.scss","../../../../scss/components/_trustedby.scss","../../../../scss/_variables.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/pages/products.scss"],"names":[],"mappings":";AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AC0BA;ED9BF;IAMI;;;;AEfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ADyBE;ECvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ADCF;ECRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ADVJ;ECKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AD7CA;ECkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ADlJF;EC4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AH+BE;EGvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AHiBA;EGzBF;IAWI;IACA;IACA;;;AHoCF;EGjDF;IAiBI;IACA;;;AHOF;EGzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;AHfF;EGKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;AHrDN;EG6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;AHnDR;EGyDA;IAEI;IACA;;;AHvEJ;EGoEA;IAMI;IACA;;;AHhEJ;EGoEA;IAEI;IACA;;;AHlFJ;EG+EA;IAMI;IACA;;;AHtFJ;EG+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AH7HF;EG2GA;IAKI;IACA;IACA;;;AHlHJ;EG2GA;IAWI;IACA;IACA;;;AHxHJ;EG2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;AJkBA;EItCF;IAgBI;;;AJsBF;EItCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;AFSA;EKtCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;AClBN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;AAAA;AAAA;EJlBA;EACA;EAmCE;EACA;EIfA;;ANgBA;EMpBF;AAAA;AAAA;IJqBI;;;AIdJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AC7CN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;ELVA;EACA;EAmCE;EACA;EKzBA;EACA;;APyBA;EO5BF;IL6BI;;;AKvBJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;APWA;EOtBF;IAcI;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;;AC1CV;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;ARQE;EQjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;ACzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AXqBE;EWzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AC/DJ;EACE;EACA;;AZkCE;EYpCJ;IAKI;;;AAGF;EVVA;EACA;EAGE;EACA;EUOA;EACA;;AZyBA;EY5BF;IVHI;;;AUSJ;EACE;EACA;EACA;EACA;;AZkBA;EYtBF;IAOI;;;AAEF;EACE;;AZYF;EYbA;IAGI;;;;AAMR;EACE;;AACA;EVpCA;EACA;EAmBE;EACA;EUiBA;EACA;EACA;EACA;;AZHA;EYFF;IVbI;;;AUoBJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AZZA;EYKF;IAUI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AAEA;EVvFN;EACA;EAmCE;EACA;EUoDM;;AZnDN;EYiDI;IVhDF;;;AUqDE;EACE;;AAGF;EACE;EACA","file":"products.css"} \ No newline at end of file diff --git a/src/assets/css/pages/services.css b/src/assets/css/pages/services.css index 5c9d382..3c9a0b4 100644 --- a/src/assets/css/pages/services.css +++ b/src/assets/css/pages/services.css @@ -648,6 +648,61 @@ a.book:hover { outline: solid 2px var(--main-text); } +#cookies { + box-sizing: border-box; + padding: 20px 10px; + background-color: #000; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + display: none; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + column-gap: var(--spacing-m); + z-index: 9; +} +#cookies.show { + display: flex; +} +#cookies p, +#cookies a, +#cookies button { + font-family: "PP Neue Machina"; + font-weight: 400; + font-size: calc(12px * var(--fonts-scale)); + line-height: 1.5; + color: #fff; +} +@media (min-width: 992px) { + #cookies p, + #cookies a, + #cookies button { + font-size: calc(20px * var(--fonts-scale)); + } +} +#cookies a { + text-decoration: underline; + text-decoration-color: #fff; + text-underline-offset: 5px; +} +#cookies button { + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 5px var(--spacing-s); + border: 1px solid #fff; + outline-color: #fff; + background-color: transparent; + cursor: pointer; +} +#cookies button:hover { + outline-width: 3px; +} + main { padding: 25vh var(--spacing-xl) var(--spacing-xxl) var(--spacing-xl); } diff --git a/src/assets/css/pages/services.css.map b/src/assets/css/pages/services.css.map index d700678..bfd870f 100644 --- a/src/assets/css/pages/services.css.map +++ b/src/assets/css/pages/services.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../../../scss/_variables.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/components/_divider.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/pages/services.scss"],"names":[],"mappings":";AAWA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;ACQE;EDjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;AEzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AHqBE;EGzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AClEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AJ0BA;EI9BF;IAMI;;;;ACfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ALyBE;EKvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ALCF;EKRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ALVJ;EKKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AL7CA;EKkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ALlJF;EK4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AP+BE;EOvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;APiBA;EOzBF;IAWI;IACA;IACA;;;APoCF;EOjDF;IAiBI;IACA;;;APOF;EOzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;APfF;EOKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;APrDN;EO6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;APnDR;EOyDA;IAEI;IACA;;;APvEJ;EOoEA;IAMI;IACA;;;APhEJ;EOoEA;IAEI;IACA;;;APlFJ;EO+EA;IAMI;IACA;;;APtFJ;EO+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AP7HF;EO2GA;IAKI;IACA;IACA;;;APlHJ;EO2GA;IAWI;IACA;IACA;;;APxHJ;EO2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;ARkBA;EQtCF;IAgBI;;;ARsBF;EQtCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;ANSA;EStCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;AChBN;EACE;;AVoCE;EUrCJ;IAII;;;AAGF;EJRA;EACA;EAGE;EACA;EIKA;EACA;;AV2BA;EU9BF;IJDI;;;AIOJ;EACE;EACA;EACA;EACA;;AVoBA;EUxBF;IAOI;;;AAGF;EACE;;AVaF;EUdA;IAGI;;;;AAMR;EACE;EACA;EACA;EACA;;AAEA;EJvCA;EACA;EAmBE;EACA;EIoBA;EACA;EACA;;AVLA;EUCF;IJhBI;;;AIuBJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EJtDJ;EACA;EAWE;EACA;EI2CE;;AVlBF;EUcA;IJrCE;;;AI4CF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AVjBF;EUUA;IAUI;;;AV/BJ;EUqBA;IAcI;IACA;;;AAGF;EACE;EACA;;AVzCJ;EUuCE;IAII;IACA;;;AAGF;EJrFN;EACA;EA2BE;EACA;EI0DM;;AVjDN;EU+CI;IJtDF;;;AI2DE;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;EAEA;EACA;;AVjEJ;EU2DE;IASI;IACA;;;AAGF;AAAA;EJ9GN;EACA;EAmCE;EACA;EI4EM;;AV3EN;EUwEI;AAAA;IJvEF;;;AI6EE;EACE;EACA;EACA;EACA;;AAEA;EACE;;AACA;EACE;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA","file":"services.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../../../scss/_variables.scss","../../../../scss/helpers/bootstrap/_breakpoints.scss","../../../../scss/_fonts.scss","../../../../scss/components/_dots.scss","../../../../scss/_base.scss","../../../../scss/components/_divider.scss","../../../../scss/components/_nav.scss","../../../../scss/helpers/_typography.scss","../../../../scss/components/_footer.scss","../../../../scss/components/_page_link.scss","../../../../scss/components/_book.scss","../../../../scss/components/_cookies.scss","../../../../scss/pages/services.scss"],"names":[],"mappings":";AAWA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIF;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;ACQE;EDjBJ;IAYI;IACA;IACA;IACA;IACA;IACA;;;;AEzCJ;EACE;EACA;EACA;EACA;;ACFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AC3BF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AHqBE;EGzBJ;IAOI;;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;;AAEF;EACE;;;AClEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AJ0BA;EI9BF;IAMI;;;;ACfN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;ALyBE;EKvCJ;IAiBI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;ALCF;EKRA;IAUI;;;AAGF;AAAA;EC3CJ;EACA;EA2BE;EACA;EDiBI;EACA;EACA;;ALVJ;EKKE;AAAA;ICZA;;;ADoBE;EACE;;AAEF;EACE;EACA;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AL7CA;EKkCF;IAcI;;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;ECpLJ;EACA;EA2BE;EACA;EDyJE;EACA;EACA;;ALlJF;EK4IA;AAAA;ICnJE;;;AD2JF;EACE;;AAIA;EACE;;AAEF;EACE;EACA;;;AErMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AP+BE;EOvCJ;IAWI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;APiBA;EOzBF;IAWI;IACA;IACA;;;APoCF;EOjDF;IAiBI;IACA;;;APOF;EOzBF;IAsBI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;APfF;EOKA;IAaI;IACA;IACA;IACA;IACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EDrFR;EACA;EA2BE;EACA;EC0DM;EACA;EACA;EAEA;;APrDN;EO6CI;IDpDF;;;AC8DI;EACE;;AAGF;EACE;EACA;EACA;;APnDR;EOyDA;IAEI;IACA;;;APvEJ;EOoEA;IAMI;IACA;;;APhEJ;EOoEA;IAEI;IACA;;;APlFJ;EO+EA;IAMI;IACA;;;APtFJ;EO+EA;IAUI;IACA;;;AAEF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EAcA;EDjKJ;EACA;EAmCE;EACA;EC8HE;;AP7HF;EO2GA;IAKI;IACA;IACA;;;APlHJ;EO2GA;IAWI;IACA;IACA;;;APxHJ;EO2GA;ID1GE;;;AC8HA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;;AC/KR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EFbF;EACA;EAmCE;EACA;EEjBA;;ARkBA;EQtCF;IAgBI;;;ARsBF;EQtCF;IFuCI;;;AEjBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAEF;EACE;EACA;;;ACxDN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHVF;EACA;EA2BE;EACA;;ANSA;EStCF;IH+BI;;;AGjBF;EACE;EACA;EACA;;;AClBN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;AAAA;AAAA;EJlBA;EACA;EAmCE;EACA;EIfA;;AVgBA;EUpBF;AAAA;AAAA;IJqBI;;;AIdJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AC3CN;EACE;;AXoCE;EWrCJ;IAII;;;AAGF;ELRA;EACA;EAGE;EACA;EKKA;EACA;;AX2BA;EW9BF;ILDI;;;AKOJ;EACE;EACA;EACA;EACA;;AXoBA;EWxBF;IAOI;;;AAGF;EACE;;AXaF;EWdA;IAGI;;;;AAMR;EACE;EACA;EACA;EACA;;AAEA;ELvCA;EACA;EAmBE;EACA;EKoBA;EACA;EACA;;AXLA;EWCF;ILhBI;;;AKuBJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;ELtDJ;EACA;EAWE;EACA;EK2CE;;AXlBF;EWcA;ILrCE;;;AK4CF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AXjBF;EWUA;IAUI;;;AX/BJ;EWqBA;IAcI;IACA;;;AAGF;EACE;EACA;;AXzCJ;EWuCE;IAII;IACA;;;AAGF;ELrFN;EACA;EA2BE;EACA;EK0DM;;AXjDN;EW+CI;ILtDF;;;AK2DE;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;EAEA;EACA;;AXjEJ;EW2DE;IASI;IACA;;;AAGF;AAAA;EL9GN;EACA;EAmCE;EACA;EK4EM;;AX3EN;EWwEI;AAAA;ILvEF;;;AK6EE;EACE;EACA;EACA;EACA;;AAEA;EACE;;AACA;EACE;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA","file":"services.css"} \ No newline at end of file diff --git a/src/assets/scripts/dots.js b/src/assets/scripts/dots.js index 580a6b2..9a090ad 100644 --- a/src/assets/scripts/dots.js +++ b/src/assets/scripts/dots.js @@ -1,4 +1,4 @@ -var h6=function(){const J=Math.random()*4294967295|0,$=Math.random()*4294967295|0,Z=Math.random()*4294967295|0,Q=Math.random()*4294967295|0;return(XJ[J&255]+XJ[J>>8&255]+XJ[J>>16&255]+XJ[J>>24&255]+"-"+XJ[$&255]+XJ[$>>8&255]+"-"+XJ[$>>16&15|64]+XJ[$>>24&255]+"-"+XJ[Z&63|128]+XJ[Z>>8&255]+"-"+XJ[Z>>16&255]+XJ[Z>>24&255]+XJ[Q&255]+XJ[Q>>8&255]+XJ[Q>>16&255]+XJ[Q>>24&255]).toLowerCase()},RJ=function(J,$,Z){return Math.max($,Math.min(Z,J))},s9=function(J,$){return(J%$+$)%$};var L7=function(J,$,Z){return(1-Z)*J+Z*$};var z8=function(J){return(J&J-1)===0&&J!==0};var i7=function(J){return Math.pow(2,Math.floor(Math.log(J)/Math.LN2))};var P6=function(J,$){switch($.constructor){case Float32Array:return J;case Uint32Array:return J/4294967295;case Uint16Array:return J/65535;case Uint8Array:return J/255;case Int32Array:return Math.max(J/2147483647,-1);case Int16Array:return Math.max(J/32767,-1);case Int8Array:return Math.max(J/127,-1);default:throw new Error("Invalid component type.")}},qJ=function(J,$){switch($.constructor){case Float32Array:return J;case Uint32Array:return Math.round(J*4294967295);case Uint16Array:return Math.round(J*65535);case Uint8Array:return Math.round(J*255);case Int32Array:return Math.round(J*2147483647);case Int16Array:return Math.round(J*32767);case Int8Array:return Math.round(J*127);default:throw new Error("Invalid component type.")}},H9=function(J){for(let $=J.length-1;$>=0;--$)if(J[$]>=65535)return!0;return!1};var E7=function(J){return document.createElementNS("http://www.w3.org/1999/xhtml",J)},o9=function(){const J=E7("canvas");return J.style.display="block",J},b6=function(J){if(J in B8)return;B8[J]=!0,console.warn(J)},z6=function(J){return J<0.04045?J*0.0773993808:Math.pow(J*0.9478672986+0.0521327014,2.4)},P7=function(J){return J<0.0031308?J*12.92:1.055*Math.pow(J,0.41666)-0.055},T7=function(J){if(typeof HTMLImageElement!=="undefined"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&J instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&J instanceof ImageBitmap)return e7.getDataURL(J);else if(J.data)return{data:Array.from(J.data),width:J.width,height:J.height,type:J.data.constructor.name};else return console.warn("THREE.Texture: Unable to serialize Texture."),{}},y7=function(J,$,Z,Q,W){for(let Y=0,H=J.length-3;Y<=H;Y+=3){aJ.fromArray(J,Y);const X=W.x*Math.abs(aJ.x)+W.y*Math.abs(aJ.y)+W.z*Math.abs(aJ.z),G=$.dot(aJ),K=Z.dot(aJ),U=Q.dot(aJ);if(Math.max(-Math.max(G,K,U),Math.min(G,K,U))>X)return!1}return!0},m7=function(J,$,Z){if(Z<0)Z+=1;if(Z>1)Z-=1;if(Z<0.16666666666666666)return J+($-J)*6*Z;if(Z<0.5)return $;if(Z<0.6666666666666666)return J+($-J)*6*(0.6666666666666666-Z);return J};var K$=function(J,$,Z,Q,W,Y,H,X){let G;if($.side===1)G=Q.intersectTriangle(H,Y,W,!0,X);else G=Q.intersectTriangle(W,Y,H,$.side===0,X);if(G===null)return null;X7.copy(X),X7.applyMatrix4(J.matrixWorld);const K=Z.ray.origin.distanceTo(X7);if(KZ.far)return null;return{distance:K,point:X7.clone(),object:J}},H7=function(J,$,Z,Q,W,Y,H,X,G,K){J.getVertexPosition(X,D6),J.getVertexPosition(G,E6),J.getVertexPosition(K,F6);const U=K$(J,$,Z,Q,D6,E6,F6,Y7);if(U){if(W)Z7.fromBufferAttribute(W,X),Q7.fromBufferAttribute(W,G),W7.fromBufferAttribute(W,K),U.uv=kJ.getInterpolation(Y7,D6,E6,F6,Z7,Q7,W7,new m0);if(Y)Z7.fromBufferAttribute(Y,X),Q7.fromBufferAttribute(Y,G),W7.fromBufferAttribute(Y,K),U.uv1=kJ.getInterpolation(Y7,D6,E6,F6,Z7,Q7,W7,new m0),U.uv2=U.uv1;if(H){if(j8.fromBufferAttribute(H,X),b8.fromBufferAttribute(H,G),x8.fromBufferAttribute(H,K),U.normal=kJ.getInterpolation(Y7,D6,E6,F6,j8,b8,x8,new v),U.normal.dot(Q.direction)>0)U.normal.multiplyScalar(-1)}const V={a:X,b:G,c:K,normal:new v,materialIndex:0};kJ.getNormal(D6,E6,F6,V.normal),U.face=V}return U},B6=function(J){const $={};for(let Z in J){$[Z]={};for(let Q in J[Z]){const W=J[Z][Q];if(W&&(W.isColor||W.isMatrix3||W.isMatrix4||W.isVector2||W.isVector3||W.isVector4||W.isTexture||W.isQuaternion))if(W.isRenderTargetTexture)console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),$[Z][Q]=null;else $[Z][Q]=W.clone();else if(Array.isArray(W))$[Z][Q]=W.slice();else $[Z][Q]=W}}return $},UJ=function(J){const $={};for(let Z=0;Z0?Z:$).get(z);if(z===null)M(X,G);else if(z&&z.isColor)M(z,1),I=!0;const A=J.xr.getEnvironmentBlendMode();if(A==="additive")Q.buffers.color.setClear(0,0,0,1,H);else if(A==="alpha-blend")Q.buffers.color.setClear(0,0,0,0,H);if(J.autoClear||I)J.clear(J.autoClearColor,J.autoClearDepth,J.autoClearStencil);if(z&&(z.isCubeTexture||z.mapping===306)){if(U===void 0)U=new hJ(new p6(1,1,1),new sJ({name:"BackgroundCubeMaterial",uniforms:B6(AJ.backgroundCube.uniforms),vertexShader:AJ.backgroundCube.vertexShader,fragmentShader:AJ.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),U.geometry.deleteAttribute("normal"),U.geometry.deleteAttribute("uv"),U.onBeforeRender=function(L,w,g){this.matrixWorld.copyPosition(g.matrixWorld)},Object.defineProperty(U.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),W.update(U);if(U.material.uniforms.envMap.value=z,U.material.uniforms.flipEnvMap.value=z.isCubeTexture&&z.isRenderTargetTexture===!1?-1:1,U.material.uniforms.backgroundBlurriness.value=q.backgroundBlurriness,U.material.uniforms.backgroundIntensity.value=q.backgroundIntensity,U.material.toneMapped=h0.getTransfer(z.colorSpace)!=="srgb",V!==z||R!==z.version||E!==J.toneMapping)U.material.needsUpdate=!0,V=z,R=z.version,E=J.toneMapping;U.layers.enableAll(),D.unshift(U,U.geometry,U.material,0,0,null)}else if(z&&z.isTexture){if(K===void 0)K=new hJ(new V8(2,2),new sJ({name:"BackgroundMaterial",uniforms:B6(AJ.background.uniforms),vertexShader:AJ.background.vertexShader,fragmentShader:AJ.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),K.geometry.deleteAttribute("normal"),Object.defineProperty(K.material,"map",{get:function(){return this.uniforms.t2D.value}}),W.update(K);if(K.material.uniforms.t2D.value=z,K.material.uniforms.backgroundIntensity.value=q.backgroundIntensity,K.material.toneMapped=h0.getTransfer(z.colorSpace)!=="srgb",z.matrixAutoUpdate===!0)z.updateMatrix();if(K.material.uniforms.uvTransform.value.copy(z.matrix),V!==z||R!==z.version||E!==J.toneMapping)K.material.needsUpdate=!0,V=z,R=z.version,E=J.toneMapping;K.layers.enableAll(),D.unshift(K,K.geometry,K.material,0,0,null)}}function M(D,q){D.getRGB(G7,U9(J)),Q.buffers.color.setClear(G7.r,G7.g,G7.b,q,H)}return{getClearColor:function(){return X},setClearColor:function(D,q=1){X.set(D),G=q,M(X,G)},getClearAlpha:function(){return G},setClearAlpha:function(D){G=D,M(X,G)},render:O}},oZ=function(J,$,Z,Q){const W=J.getParameter(J.MAX_VERTEX_ATTRIBS),Y=Q.isWebGL2?null:$.get("OES_vertex_array_object"),H=Q.isWebGL2||Y!==null,X={},G=D(null);let K=G,U=!1;function V(P,l,n,d,r){let p=!1;if(H){const T=M(d,n,l);if(K!==T)K=T,E(K.object);if(p=q(P,d,n,r),p)I(P,d,n,r)}else{const T=l.wireframe===!0;if(K.geometry!==d.id||K.program!==n.id||K.wireframe!==T)K.geometry=d.id,K.program=n.id,K.wireframe=T,p=!0}if(r!==null)Z.update(r,J.ELEMENT_ARRAY_BUFFER);if(p||U){if(U=!1,u(P,l,n,d),r!==null)J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,Z.get(r).buffer)}}function R(){if(Q.isWebGL2)return J.createVertexArray();return Y.createVertexArrayOES()}function E(P){if(Q.isWebGL2)return J.bindVertexArray(P);return Y.bindVertexArrayOES(P)}function O(P){if(Q.isWebGL2)return J.deleteVertexArray(P);return Y.deleteVertexArrayOES(P)}function M(P,l,n){const d=n.wireframe===!0;let r=X[P.id];if(r===void 0)r={},X[P.id]=r;let p=r[l.id];if(p===void 0)p={},r[l.id]=p;let T=p[d];if(T===void 0)T=D(R()),p[d]=T;return T}function D(P){const l=[],n=[],d=[];for(let r=0;r=0){const X0=r[a];let U0=p[a];if(U0===void 0){if(a==="instanceMatrix"&&P.instanceMatrix)U0=P.instanceMatrix;if(a==="instanceColor"&&P.instanceColor)U0=P.instanceColor}if(X0===void 0)return!0;if(X0.attribute!==U0)return!0;if(U0&&X0.data!==U0.data)return!0;T++}if(K.attributesNum!==T)return!0;if(K.index!==d)return!0;return!1}function I(P,l,n,d){const r={},p=l.attributes;let T=0;const h=n.getAttributes();for(let a in h)if(h[a].location>=0){let X0=p[a];if(X0===void 0){if(a==="instanceMatrix"&&P.instanceMatrix)X0=P.instanceMatrix;if(a==="instanceColor"&&P.instanceColor)X0=P.instanceColor}const U0={};if(U0.attribute=X0,X0&&X0.data)U0.data=X0.data;r[a]=U0,T++}K.attributes=r,K.attributesNum=T,K.index=d}function z(){const P=K.newAttributes;for(let l=0,n=P.length;l=0){let G0=r[h];if(G0===void 0){if(h==="instanceMatrix"&&P.instanceMatrix)G0=P.instanceMatrix;if(h==="instanceColor"&&P.instanceColor)G0=P.instanceColor}if(G0!==void 0){const{normalized:X0,itemSize:U0}=G0,j0=Z.get(G0);if(j0===void 0)continue;const{buffer:F0,type:y0,bytesPerElement:n0}=j0,KJ=Q.isWebGL2===!0&&(y0===J.INT||y0===J.UNSIGNED_INT||G0.gpuType===1013);if(G0.isInterleavedBufferAttribute){const S=G0.data,i0=S.stride,f0=G0.offset;if(S.isInstancedInterleavedBuffer){for(let E0=0;E00&&J.getShaderPrecisionFormat(J.FRAGMENT_SHADER,J.HIGH_FLOAT).precision>0)return"highp";g="mediump"}if(g==="mediump"){if(J.getShaderPrecisionFormat(J.VERTEX_SHADER,J.MEDIUM_FLOAT).precision>0&&J.getShaderPrecisionFormat(J.FRAGMENT_SHADER,J.MEDIUM_FLOAT).precision>0)return"mediump"}return"lowp"}const H=typeof WebGL2RenderingContext!=="undefined"&&J.constructor.name==="WebGL2RenderingContext";let X=Z.precision!==void 0?Z.precision:"highp";const G=Y(X);if(G!==X)console.warn("THREE.WebGLRenderer:",X,"not supported, using",G,"instead."),X=G;const K=H||$.has("WEBGL_draw_buffers"),U=Z.logarithmicDepthBuffer===!0,V=J.getParameter(J.MAX_TEXTURE_IMAGE_UNITS),R=J.getParameter(J.MAX_VERTEX_TEXTURE_IMAGE_UNITS),E=J.getParameter(J.MAX_TEXTURE_SIZE),O=J.getParameter(J.MAX_CUBE_MAP_TEXTURE_SIZE),M=J.getParameter(J.MAX_VERTEX_ATTRIBS),D=J.getParameter(J.MAX_VERTEX_UNIFORM_VECTORS),q=J.getParameter(J.MAX_VARYING_VECTORS),I=J.getParameter(J.MAX_FRAGMENT_UNIFORM_VECTORS),z=R>0,A=H||$.has("OES_texture_float"),L=z&&A,w=H?J.getParameter(J.MAX_SAMPLES):0;return{isWebGL2:H,drawBuffers:K,getMaxAnisotropy:W,getMaxPrecision:Y,precision:X,logarithmicDepthBuffer:U,maxTextures:V,maxVertexTextures:R,maxTextureSize:E,maxCubemapSize:O,maxAttributes:M,maxVertexUniforms:D,maxVaryings:q,maxFragmentUniforms:I,vertexTextures:z,floatFragmentTextures:A,floatVertexTextures:L,maxSamples:w}},aZ=function(J){const $=this;let Z=null,Q=0,W=!1,Y=!1;const H=new dJ,X=new A0,G={value:null,needsUpdate:!1};this.uniform=G,this.numPlanes=0,this.numIntersection=0,this.init=function(V,R){const E=V.length!==0||R||Q!==0||W;return W=R,Q=V.length,E},this.beginShadows=function(){Y=!0,U(null)},this.endShadows=function(){Y=!1},this.setGlobalState=function(V,R){Z=U(V,R,0)},this.setState=function(V,R,E){const{clippingPlanes:O,clipIntersection:M,clipShadows:D}=V,q=J.get(V);if(!W||O===null||O.length===0||Y&&!D)if(Y)U(null);else K();else{const I=Y?0:Q,z=I*4;let A=q.clippingState||null;G.value=A,A=U(O,R,z,E);for(let L=0;L!==z;++L)A[L]=Z[L];q.clippingState=A,this.numIntersection=M?this.numPlanes:0,this.numPlanes+=I}};function K(){if(G.value!==Z)G.value=Z,G.needsUpdate=Q>0;$.numPlanes=Q,$.numIntersection=0}function U(V,R,E,O){const M=V!==null?V.length:0;let D=null;if(M!==0){if(D=G.value,O!==!0||D===null){const q=E+M*4,I=R.matrixWorldInverse;if(X.getNormalMatrix(I),D===null||D.length0){const K=new R9(G.height/2);return K.fromEquirectangularTexture(J,H),$.set(H,K),H.addEventListener("dispose",W),Z(K.texture,H.mapping)}else return null}}return H}function W(H){const X=H.target;X.removeEventListener("dispose",W);const G=$.get(X);if(G!==void 0)$.delete(X),G.dispose()}function Y(){$=new WeakMap}return{get:Q,dispose:Y}},eZ=function(J){const $=[],Z=[],Q=[];let W=J;const Y=J-_6+1+h8.length;for(let H=0;HJ-_6)G=h8[H-J+_6-1];else if(H===0)G=0;Q.push(G);const K=1/(X-2),U=-K,V=1+K,R=[U,U,V,U,V,V,U,U,V,V,U,V],E=6,O=6,M=3,D=2,q=1,I=new Float32Array(M*O*E),z=new Float32Array(D*O*E),A=new Float32Array(q*O*E);for(let w=0;w2?0:-1,N=[g,u,0,g+0.6666666666666666,u,0,g+0.6666666666666666,u+1,0,g,u,0,g+0.6666666666666666,u+1,0,g,u+1,0];I.set(N,M*O*w),z.set(R,D*O*w);const C=[w,w,w,w,w,w];A.set(C,q*O*w)}const L=new PJ;if(L.setAttribute("position",new CJ(I,M)),L.setAttribute("uv",new CJ(z,D)),L.setAttribute("faceIndex",new CJ(A,q)),$.push(L),W>_6)W--}return{lodPlanes:$,sizeLods:Z,sigmas:Q}},m8=function(J,$,Z){const Q=new nJ(J,$,Z);return Q.texture.mapping=306,Q.texture.name="PMREM.cubeUv",Q.scissorTest=!0,Q},V7=function(J,$,Z,Q,W){J.viewport.set($,Z,Q,W),J.scissor.set($,Z,Q,W)},JQ=function(J,$,Z){const Q=new Float32Array($6),W=new v(0,1,0);return new sJ({name:"SphericalGaussianBlur",defines:{n:$6,CUBEUV_TEXEL_WIDTH:1/$,CUBEUV_TEXEL_HEIGHT:1/Z,CUBEUV_MAX_MIP:`${J}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:Q},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:W}},vertexShader:U8(),fragmentShader:` +var h6=function(){const J=Math.random()*4294967295|0,$=Math.random()*4294967295|0,Z=Math.random()*4294967295|0,Q=Math.random()*4294967295|0;return(XJ[J&255]+XJ[J>>8&255]+XJ[J>>16&255]+XJ[J>>24&255]+"-"+XJ[$&255]+XJ[$>>8&255]+"-"+XJ[$>>16&15|64]+XJ[$>>24&255]+"-"+XJ[Z&63|128]+XJ[Z>>8&255]+"-"+XJ[Z>>16&255]+XJ[Z>>24&255]+XJ[Q&255]+XJ[Q>>8&255]+XJ[Q>>16&255]+XJ[Q>>24&255]).toLowerCase()},RJ=function(J,$,Z){return Math.max($,Math.min(Z,J))},s9=function(J,$){return(J%$+$)%$};var L7=function(J,$,Z){return(1-Z)*J+Z*$};var z8=function(J){return(J&J-1)===0&&J!==0};var i7=function(J){return Math.pow(2,Math.floor(Math.log(J)/Math.LN2))};var P6=function(J,$){switch($.constructor){case Float32Array:return J;case Uint32Array:return J/4294967295;case Uint16Array:return J/65535;case Uint8Array:return J/255;case Int32Array:return Math.max(J/2147483647,-1);case Int16Array:return Math.max(J/32767,-1);case Int8Array:return Math.max(J/127,-1);default:throw new Error("Invalid component type.")}},qJ=function(J,$){switch($.constructor){case Float32Array:return J;case Uint32Array:return Math.round(J*4294967295);case Uint16Array:return Math.round(J*65535);case Uint8Array:return Math.round(J*255);case Int32Array:return Math.round(J*2147483647);case Int16Array:return Math.round(J*32767);case Int8Array:return Math.round(J*127);default:throw new Error("Invalid component type.")}},H9=function(J){for(let $=J.length-1;$>=0;--$)if(J[$]>=65535)return!0;return!1};var D7=function(J){return document.createElementNS("http://www.w3.org/1999/xhtml",J)},o9=function(){const J=D7("canvas");return J.style.display="block",J},b6=function(J){if(J in B8)return;B8[J]=!0,console.warn(J)},z6=function(J){return J<0.04045?J*0.0773993808:Math.pow(J*0.9478672986+0.0521327014,2.4)},P7=function(J){return J<0.0031308?J*12.92:1.055*Math.pow(J,0.41666)-0.055},T7=function(J){if(typeof HTMLImageElement!=="undefined"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&J instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&J instanceof ImageBitmap)return e7.getDataURL(J);else if(J.data)return{data:Array.from(J.data),width:J.width,height:J.height,type:J.data.constructor.name};else return console.warn("THREE.Texture: Unable to serialize Texture."),{}},y7=function(J,$,Z,Q,W){for(let Y=0,H=J.length-3;Y<=H;Y+=3){aJ.fromArray(J,Y);const X=W.x*Math.abs(aJ.x)+W.y*Math.abs(aJ.y)+W.z*Math.abs(aJ.z),K=$.dot(aJ),G=Z.dot(aJ),U=Q.dot(aJ);if(Math.max(-Math.max(K,G,U),Math.min(K,G,U))>X)return!1}return!0},m7=function(J,$,Z){if(Z<0)Z+=1;if(Z>1)Z-=1;if(Z<0.16666666666666666)return J+($-J)*6*Z;if(Z<0.5)return $;if(Z<0.6666666666666666)return J+($-J)*6*(0.6666666666666666-Z);return J};var K$=function(J,$,Z,Q,W,Y,H,X){let K;if($.side===1)K=Q.intersectTriangle(H,Y,W,!0,X);else K=Q.intersectTriangle(W,Y,H,$.side===0,X);if(K===null)return null;X7.copy(X),X7.applyMatrix4(J.matrixWorld);const G=Z.ray.origin.distanceTo(X7);if(GZ.far)return null;return{distance:G,point:X7.clone(),object:J}},H7=function(J,$,Z,Q,W,Y,H,X,K,G){J.getVertexPosition(X,E6),J.getVertexPosition(K,D6),J.getVertexPosition(G,F6);const U=K$(J,$,Z,Q,E6,D6,F6,Y7);if(U){if(W)Z7.fromBufferAttribute(W,X),Q7.fromBufferAttribute(W,K),W7.fromBufferAttribute(W,G),U.uv=kJ.getInterpolation(Y7,E6,D6,F6,Z7,Q7,W7,new m0);if(Y)Z7.fromBufferAttribute(Y,X),Q7.fromBufferAttribute(Y,K),W7.fromBufferAttribute(Y,G),U.uv1=kJ.getInterpolation(Y7,E6,D6,F6,Z7,Q7,W7,new m0),U.uv2=U.uv1;if(H){if(j8.fromBufferAttribute(H,X),b8.fromBufferAttribute(H,K),x8.fromBufferAttribute(H,G),U.normal=kJ.getInterpolation(Y7,E6,D6,F6,j8,b8,x8,new v),U.normal.dot(Q.direction)>0)U.normal.multiplyScalar(-1)}const V={a:X,b:K,c:G,normal:new v,materialIndex:0};kJ.getNormal(E6,D6,F6,V.normal),U.face=V}return U},B6=function(J){const $={};for(let Z in J){$[Z]={};for(let Q in J[Z]){const W=J[Z][Q];if(W&&(W.isColor||W.isMatrix3||W.isMatrix4||W.isVector2||W.isVector3||W.isVector4||W.isTexture||W.isQuaternion))if(W.isRenderTargetTexture)console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),$[Z][Q]=null;else $[Z][Q]=W.clone();else if(Array.isArray(W))$[Z][Q]=W.slice();else $[Z][Q]=W}}return $},UJ=function(J){const $={};for(let Z=0;Z0?Z:$).get(z);if(z===null)O(X,K);else if(z&&z.isColor)O(z,1),I=!0;const A=J.xr.getEnvironmentBlendMode();if(A==="additive")Q.buffers.color.setClear(0,0,0,1,H);else if(A==="alpha-blend")Q.buffers.color.setClear(0,0,0,0,H);if(J.autoClear||I)J.clear(J.autoClearColor,J.autoClearDepth,J.autoClearStencil);if(z&&(z.isCubeTexture||z.mapping===306)){if(U===void 0)U=new hJ(new p6(1,1,1),new sJ({name:"BackgroundCubeMaterial",uniforms:B6(AJ.backgroundCube.uniforms),vertexShader:AJ.backgroundCube.vertexShader,fragmentShader:AJ.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),U.geometry.deleteAttribute("normal"),U.geometry.deleteAttribute("uv"),U.onBeforeRender=function(L,w,g){this.matrixWorld.copyPosition(g.matrixWorld)},Object.defineProperty(U.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),W.update(U);if(U.material.uniforms.envMap.value=z,U.material.uniforms.flipEnvMap.value=z.isCubeTexture&&z.isRenderTargetTexture===!1?-1:1,U.material.uniforms.backgroundBlurriness.value=q.backgroundBlurriness,U.material.uniforms.backgroundIntensity.value=q.backgroundIntensity,U.material.toneMapped=h0.getTransfer(z.colorSpace)!=="srgb",V!==z||R!==z.version||D!==J.toneMapping)U.material.needsUpdate=!0,V=z,R=z.version,D=J.toneMapping;U.layers.enableAll(),E.unshift(U,U.geometry,U.material,0,0,null)}else if(z&&z.isTexture){if(G===void 0)G=new hJ(new V8(2,2),new sJ({name:"BackgroundMaterial",uniforms:B6(AJ.background.uniforms),vertexShader:AJ.background.vertexShader,fragmentShader:AJ.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),G.geometry.deleteAttribute("normal"),Object.defineProperty(G.material,"map",{get:function(){return this.uniforms.t2D.value}}),W.update(G);if(G.material.uniforms.t2D.value=z,G.material.uniforms.backgroundIntensity.value=q.backgroundIntensity,G.material.toneMapped=h0.getTransfer(z.colorSpace)!=="srgb",z.matrixAutoUpdate===!0)z.updateMatrix();if(G.material.uniforms.uvTransform.value.copy(z.matrix),V!==z||R!==z.version||D!==J.toneMapping)G.material.needsUpdate=!0,V=z,R=z.version,D=J.toneMapping;G.layers.enableAll(),E.unshift(G,G.geometry,G.material,0,0,null)}}function O(E,q){E.getRGB(G7,U9(J)),Q.buffers.color.setClear(G7.r,G7.g,G7.b,q,H)}return{getClearColor:function(){return X},setClearColor:function(E,q=1){X.set(E),K=q,O(X,K)},getClearAlpha:function(){return K},setClearAlpha:function(E){K=E,O(X,K)},render:M}},oZ=function(J,$,Z,Q){const W=J.getParameter(J.MAX_VERTEX_ATTRIBS),Y=Q.isWebGL2?null:$.get("OES_vertex_array_object"),H=Q.isWebGL2||Y!==null,X={},K=E(null);let G=K,U=!1;function V(P,l,n,d,r){let p=!1;if(H){const T=O(d,n,l);if(G!==T)G=T,D(G.object);if(p=q(P,d,n,r),p)I(P,d,n,r)}else{const T=l.wireframe===!0;if(G.geometry!==d.id||G.program!==n.id||G.wireframe!==T)G.geometry=d.id,G.program=n.id,G.wireframe=T,p=!0}if(r!==null)Z.update(r,J.ELEMENT_ARRAY_BUFFER);if(p||U){if(U=!1,u(P,l,n,d),r!==null)J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,Z.get(r).buffer)}}function R(){if(Q.isWebGL2)return J.createVertexArray();return Y.createVertexArrayOES()}function D(P){if(Q.isWebGL2)return J.bindVertexArray(P);return Y.bindVertexArrayOES(P)}function M(P){if(Q.isWebGL2)return J.deleteVertexArray(P);return Y.deleteVertexArrayOES(P)}function O(P,l,n){const d=n.wireframe===!0;let r=X[P.id];if(r===void 0)r={},X[P.id]=r;let p=r[l.id];if(p===void 0)p={},r[l.id]=p;let T=p[d];if(T===void 0)T=E(R()),p[d]=T;return T}function E(P){const l=[],n=[],d=[];for(let r=0;r=0){const X0=r[a];let U0=p[a];if(U0===void 0){if(a==="instanceMatrix"&&P.instanceMatrix)U0=P.instanceMatrix;if(a==="instanceColor"&&P.instanceColor)U0=P.instanceColor}if(X0===void 0)return!0;if(X0.attribute!==U0)return!0;if(U0&&X0.data!==U0.data)return!0;T++}if(G.attributesNum!==T)return!0;if(G.index!==d)return!0;return!1}function I(P,l,n,d){const r={},p=l.attributes;let T=0;const h=n.getAttributes();for(let a in h)if(h[a].location>=0){let X0=p[a];if(X0===void 0){if(a==="instanceMatrix"&&P.instanceMatrix)X0=P.instanceMatrix;if(a==="instanceColor"&&P.instanceColor)X0=P.instanceColor}const U0={};if(U0.attribute=X0,X0&&X0.data)U0.data=X0.data;r[a]=U0,T++}G.attributes=r,G.attributesNum=T,G.index=d}function z(){const P=G.newAttributes;for(let l=0,n=P.length;l=0){let G0=r[h];if(G0===void 0){if(h==="instanceMatrix"&&P.instanceMatrix)G0=P.instanceMatrix;if(h==="instanceColor"&&P.instanceColor)G0=P.instanceColor}if(G0!==void 0){const{normalized:X0,itemSize:U0}=G0,j0=Z.get(G0);if(j0===void 0)continue;const{buffer:F0,type:y0,bytesPerElement:n0}=j0,KJ=Q.isWebGL2===!0&&(y0===J.INT||y0===J.UNSIGNED_INT||G0.gpuType===1013);if(G0.isInterleavedBufferAttribute){const S=G0.data,i0=S.stride,f0=G0.offset;if(S.isInstancedInterleavedBuffer){for(let D0=0;D00&&J.getShaderPrecisionFormat(J.FRAGMENT_SHADER,J.HIGH_FLOAT).precision>0)return"highp";g="mediump"}if(g==="mediump"){if(J.getShaderPrecisionFormat(J.VERTEX_SHADER,J.MEDIUM_FLOAT).precision>0&&J.getShaderPrecisionFormat(J.FRAGMENT_SHADER,J.MEDIUM_FLOAT).precision>0)return"mediump"}return"lowp"}const H=typeof WebGL2RenderingContext!=="undefined"&&J.constructor.name==="WebGL2RenderingContext";let X=Z.precision!==void 0?Z.precision:"highp";const K=Y(X);if(K!==X)console.warn("THREE.WebGLRenderer:",X,"not supported, using",K,"instead."),X=K;const G=H||$.has("WEBGL_draw_buffers"),U=Z.logarithmicDepthBuffer===!0,V=J.getParameter(J.MAX_TEXTURE_IMAGE_UNITS),R=J.getParameter(J.MAX_VERTEX_TEXTURE_IMAGE_UNITS),D=J.getParameter(J.MAX_TEXTURE_SIZE),M=J.getParameter(J.MAX_CUBE_MAP_TEXTURE_SIZE),O=J.getParameter(J.MAX_VERTEX_ATTRIBS),E=J.getParameter(J.MAX_VERTEX_UNIFORM_VECTORS),q=J.getParameter(J.MAX_VARYING_VECTORS),I=J.getParameter(J.MAX_FRAGMENT_UNIFORM_VECTORS),z=R>0,A=H||$.has("OES_texture_float"),L=z&&A,w=H?J.getParameter(J.MAX_SAMPLES):0;return{isWebGL2:H,drawBuffers:G,getMaxAnisotropy:W,getMaxPrecision:Y,precision:X,logarithmicDepthBuffer:U,maxTextures:V,maxVertexTextures:R,maxTextureSize:D,maxCubemapSize:M,maxAttributes:O,maxVertexUniforms:E,maxVaryings:q,maxFragmentUniforms:I,vertexTextures:z,floatFragmentTextures:A,floatVertexTextures:L,maxSamples:w}},aZ=function(J){const $=this;let Z=null,Q=0,W=!1,Y=!1;const H=new dJ,X=new A0,K={value:null,needsUpdate:!1};this.uniform=K,this.numPlanes=0,this.numIntersection=0,this.init=function(V,R){const D=V.length!==0||R||Q!==0||W;return W=R,Q=V.length,D},this.beginShadows=function(){Y=!0,U(null)},this.endShadows=function(){Y=!1},this.setGlobalState=function(V,R){Z=U(V,R,0)},this.setState=function(V,R,D){const{clippingPlanes:M,clipIntersection:O,clipShadows:E}=V,q=J.get(V);if(!W||M===null||M.length===0||Y&&!E)if(Y)U(null);else G();else{const I=Y?0:Q,z=I*4;let A=q.clippingState||null;K.value=A,A=U(M,R,z,D);for(let L=0;L!==z;++L)A[L]=Z[L];q.clippingState=A,this.numIntersection=O?this.numPlanes:0,this.numPlanes+=I}};function G(){if(K.value!==Z)K.value=Z,K.needsUpdate=Q>0;$.numPlanes=Q,$.numIntersection=0}function U(V,R,D,M){const O=V!==null?V.length:0;let E=null;if(O!==0){if(E=K.value,M!==!0||E===null){const q=D+O*4,I=R.matrixWorldInverse;if(X.getNormalMatrix(I),E===null||E.length0){const G=new R9(K.height/2);return G.fromEquirectangularTexture(J,H),$.set(H,G),H.addEventListener("dispose",W),Z(G.texture,H.mapping)}else return null}}return H}function W(H){const X=H.target;X.removeEventListener("dispose",W);const K=$.get(X);if(K!==void 0)$.delete(X),K.dispose()}function Y(){$=new WeakMap}return{get:Q,dispose:Y}},eZ=function(J){const $=[],Z=[],Q=[];let W=J;const Y=J-_6+1+h8.length;for(let H=0;HJ-_6)K=h8[H-J+_6-1];else if(H===0)K=0;Q.push(K);const G=1/(X-2),U=-G,V=1+G,R=[U,U,V,U,V,V,U,U,V,V,U,V],D=6,M=6,O=3,E=2,q=1,I=new Float32Array(O*M*D),z=new Float32Array(E*M*D),A=new Float32Array(q*M*D);for(let w=0;w2?0:-1,N=[g,u,0,g+0.6666666666666666,u,0,g+0.6666666666666666,u+1,0,g,u,0,g+0.6666666666666666,u+1,0,g,u+1,0];I.set(N,O*M*w),z.set(R,E*M*w);const C=[w,w,w,w,w,w];A.set(C,q*M*w)}const L=new PJ;if(L.setAttribute("position",new CJ(I,O)),L.setAttribute("uv",new CJ(z,E)),L.setAttribute("faceIndex",new CJ(A,q)),$.push(L),W>_6)W--}return{lodPlanes:$,sizeLods:Z,sigmas:Q}},m8=function(J,$,Z){const Q=new nJ(J,$,Z);return Q.texture.mapping=306,Q.texture.name="PMREM.cubeUv",Q.scissorTest=!0,Q},V7=function(J,$,Z,Q,W){J.viewport.set($,Z,Q,W),J.scissor.set($,Z,Q,W)},JQ=function(J,$,Z){const Q=new Float32Array($6),W=new v(0,1,0);return new sJ({name:"SphericalGaussianBlur",defines:{n:$6,CUBEUV_TEXEL_WIDTH:1/$,CUBEUV_TEXEL_HEIGHT:1/Z,CUBEUV_MAX_MIP:`${J}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:Q},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:W}},vertexShader:U8(),fragmentShader:` precision mediump float; precision mediump int; @@ -148,7 +148,7 @@ var h6=function(){const J=Math.random()*4294967295|0,$=Math.random()*4294967295| gl_Position = vec4( position, 1.0 ); } - `},$Q=function(J){let $=new WeakMap,Z=null;function Q(X){if(X&&X.isTexture){const G=X.mapping,K=G===303||G===304,U=G===301||G===302;if(K||U)if(X.isRenderTargetTexture&&X.needsPMREMUpdate===!0){X.needsPMREMUpdate=!1;let V=$.get(X);if(Z===null)Z=new r7(J);return V=K?Z.fromEquirectangular(X,V):Z.fromCubemap(X,V),$.set(X,V),V.texture}else if($.has(X))return $.get(X).texture;else{const V=X.image;if(K&&V&&V.height>0||U&&V&&W(V)){if(Z===null)Z=new r7(J);const R=K?Z.fromEquirectangular(X):Z.fromCubemap(X);return $.set(X,R),X.addEventListener("dispose",Y),R.texture}else return null}}return X}function W(X){let G=0;const K=6;for(let U=0;U$.maxTextureSize)C=Math.ceil(N/$.maxTextureSize),N=$.maxTextureSize;const m=new Float32Array(N*C*4*O),e=new $8(m,N,C,O);e.type=1015,e.needsUpdate=!0;const W0=u*4;for(let l=0;l0)return J;const W=$*Z;let Y=d8[W];if(Y===void 0)Y=new Float32Array(W),d8[W]=Y;if($!==0){Q.toArray(Y,0);for(let H=1,X=0;H!==$;++H)X+=Z,J[H].toArray(Y,X)}return Y},e0=function(J,$){if(J.length!==$.length)return!1;for(let Z=0,Q=J.length;Z":" "} ${X}: ${Z[H]}`)}return Q.join("\n")},eQ=function(J){const $=h0.getPrimaries(h0.workingColorSpace),Z=h0.getPrimaries(J);let Q;if($===Z)Q="";else if($==="p3"&&Z==="rec709")Q="LinearDisplayP3ToLinearSRGB";else if($==="rec709"&&Z==="p3")Q="LinearSRGBToLinearDisplayP3";switch(J){case"srgb-linear":case"display-p3-linear":return[Q,"LinearTransferOETF"];case"srgb":case"display-p3":return[Q,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",J),[Q,"LinearTransferOETF"]}},a8=function(J,$,Z){const Q=J.getShaderParameter($,J.COMPILE_STATUS),W=J.getShaderInfoLog($).trim();if(Q&&W==="")return"";const Y=/ERROR: 0:(\d+)/.exec(W);if(Y){const H=parseInt(Y[1]);return Z.toUpperCase()+"\n\n"+W+"\n\n"+tQ(J.getShaderSource($),H)}else return W},JW=function(J,$){const Z=eQ($);return`vec4 ${J}( vec4 value ) { return ${Z[0]}( ${Z[1]}( value ) ); }`},$W=function(J,$){let Z;switch($){case 1:Z="Linear";break;case 2:Z="Reinhard";break;case 3:Z="OptimizedCineon";break;case 4:Z="ACESFilmic";break;case 5:Z="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",$),Z="Linear"}return"vec3 "+J+"( vec3 color ) { return "+Z+"ToneMapping( color ); }"},ZW=function(J){return[J.extensionDerivatives||!!J.envMapCubeUVHeight||J.bumpMap||J.normalMapTangentSpace||J.clearcoatNormalMap||J.flatShading||J.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(J.extensionFragDepth||J.logarithmicDepthBuffer)&&J.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",J.extensionDrawBuffers&&J.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(J.extensionShaderTextureLOD||J.envMap||J.transmission)&&J.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(v6).join("\n")},QW=function(J){const $=[];for(let Z in J){const Q=J[Z];if(Q===!1)continue;$.push("#define "+Z+" "+Q)}return $.join("\n")},WW=function(J,$){const Z={},Q=J.getProgramParameter($,J.ACTIVE_ATTRIBUTES);for(let W=0;W")}return a7(Z)},J9=function(J){return J.replace(KW,GW)},GW=function(J,$,Z,Q){let W="";for(let Y=parseInt($);Y0)D+="\n";if(q=[E,"#define SHADER_TYPE "+Z.shaderType,"#define SHADER_NAME "+Z.shaderName,O].filter(v6).join("\n"),q.length>0)q+="\n"}else D=[$9(Z),"#define SHADER_TYPE "+Z.shaderType,"#define SHADER_NAME "+Z.shaderName,O,Z.instancing?"#define USE_INSTANCING":"",Z.instancingColor?"#define USE_INSTANCING_COLOR":"",Z.useFog&&Z.fog?"#define USE_FOG":"",Z.useFog&&Z.fogExp2?"#define FOG_EXP2":"",Z.map?"#define USE_MAP":"",Z.envMap?"#define USE_ENVMAP":"",Z.envMap?"#define "+U:"",Z.lightMap?"#define USE_LIGHTMAP":"",Z.aoMap?"#define USE_AOMAP":"",Z.bumpMap?"#define USE_BUMPMAP":"",Z.normalMap?"#define USE_NORMALMAP":"",Z.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",Z.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",Z.displacementMap?"#define USE_DISPLACEMENTMAP":"",Z.emissiveMap?"#define USE_EMISSIVEMAP":"",Z.anisotropy?"#define USE_ANISOTROPY":"",Z.anisotropyMap?"#define USE_ANISOTROPYMAP":"",Z.clearcoatMap?"#define USE_CLEARCOATMAP":"",Z.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",Z.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",Z.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",Z.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",Z.specularMap?"#define USE_SPECULARMAP":"",Z.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",Z.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",Z.roughnessMap?"#define USE_ROUGHNESSMAP":"",Z.metalnessMap?"#define USE_METALNESSMAP":"",Z.alphaMap?"#define USE_ALPHAMAP":"",Z.alphaHash?"#define USE_ALPHAHASH":"",Z.transmission?"#define USE_TRANSMISSION":"",Z.transmissionMap?"#define USE_TRANSMISSIONMAP":"",Z.thicknessMap?"#define USE_THICKNESSMAP":"",Z.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",Z.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",Z.mapUv?"#define MAP_UV "+Z.mapUv:"",Z.alphaMapUv?"#define ALPHAMAP_UV "+Z.alphaMapUv:"",Z.lightMapUv?"#define LIGHTMAP_UV "+Z.lightMapUv:"",Z.aoMapUv?"#define AOMAP_UV "+Z.aoMapUv:"",Z.emissiveMapUv?"#define EMISSIVEMAP_UV "+Z.emissiveMapUv:"",Z.bumpMapUv?"#define BUMPMAP_UV "+Z.bumpMapUv:"",Z.normalMapUv?"#define NORMALMAP_UV "+Z.normalMapUv:"",Z.displacementMapUv?"#define DISPLACEMENTMAP_UV "+Z.displacementMapUv:"",Z.metalnessMapUv?"#define METALNESSMAP_UV "+Z.metalnessMapUv:"",Z.roughnessMapUv?"#define ROUGHNESSMAP_UV "+Z.roughnessMapUv:"",Z.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+Z.anisotropyMapUv:"",Z.clearcoatMapUv?"#define CLEARCOATMAP_UV "+Z.clearcoatMapUv:"",Z.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+Z.clearcoatNormalMapUv:"",Z.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+Z.clearcoatRoughnessMapUv:"",Z.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+Z.iridescenceMapUv:"",Z.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+Z.iridescenceThicknessMapUv:"",Z.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+Z.sheenColorMapUv:"",Z.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+Z.sheenRoughnessMapUv:"",Z.specularMapUv?"#define SPECULARMAP_UV "+Z.specularMapUv:"",Z.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+Z.specularColorMapUv:"",Z.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+Z.specularIntensityMapUv:"",Z.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+Z.transmissionMapUv:"",Z.thicknessMapUv?"#define THICKNESSMAP_UV "+Z.thicknessMapUv:"",Z.vertexTangents&&Z.flatShading===!1?"#define USE_TANGENT":"",Z.vertexColors?"#define USE_COLOR":"",Z.vertexAlphas?"#define USE_COLOR_ALPHA":"",Z.vertexUv1s?"#define USE_UV1":"",Z.vertexUv2s?"#define USE_UV2":"",Z.vertexUv3s?"#define USE_UV3":"",Z.pointsUvs?"#define USE_POINTS_UV":"",Z.flatShading?"#define FLAT_SHADED":"",Z.skinning?"#define USE_SKINNING":"",Z.morphTargets?"#define USE_MORPHTARGETS":"",Z.morphNormals&&Z.flatShading===!1?"#define USE_MORPHNORMALS":"",Z.morphColors&&Z.isWebGL2?"#define USE_MORPHCOLORS":"",Z.morphTargetsCount>0&&Z.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",Z.morphTargetsCount>0&&Z.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+Z.morphTextureStride:"",Z.morphTargetsCount>0&&Z.isWebGL2?"#define MORPHTARGETS_COUNT "+Z.morphTargetsCount:"",Z.doubleSided?"#define DOUBLE_SIDED":"",Z.flipSided?"#define FLIP_SIDED":"",Z.shadowMapEnabled?"#define USE_SHADOWMAP":"",Z.shadowMapEnabled?"#define "+G:"",Z.sizeAttenuation?"#define USE_SIZEATTENUATION":"",Z.numLightProbes>0?"#define USE_LIGHT_PROBES":"",Z.useLegacyLights?"#define LEGACY_LIGHTS":"",Z.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",Z.logarithmicDepthBuffer&&Z.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif","\n"].filter(v6).join("\n"),q=[E,$9(Z),"#define SHADER_TYPE "+Z.shaderType,"#define SHADER_NAME "+Z.shaderName,O,Z.useFog&&Z.fog?"#define USE_FOG":"",Z.useFog&&Z.fogExp2?"#define FOG_EXP2":"",Z.map?"#define USE_MAP":"",Z.matcap?"#define USE_MATCAP":"",Z.envMap?"#define USE_ENVMAP":"",Z.envMap?"#define "+K:"",Z.envMap?"#define "+U:"",Z.envMap?"#define "+V:"",R?"#define CUBEUV_TEXEL_WIDTH "+R.texelWidth:"",R?"#define CUBEUV_TEXEL_HEIGHT "+R.texelHeight:"",R?"#define CUBEUV_MAX_MIP "+R.maxMip+".0":"",Z.lightMap?"#define USE_LIGHTMAP":"",Z.aoMap?"#define USE_AOMAP":"",Z.bumpMap?"#define USE_BUMPMAP":"",Z.normalMap?"#define USE_NORMALMAP":"",Z.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",Z.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",Z.emissiveMap?"#define USE_EMISSIVEMAP":"",Z.anisotropy?"#define USE_ANISOTROPY":"",Z.anisotropyMap?"#define USE_ANISOTROPYMAP":"",Z.clearcoat?"#define USE_CLEARCOAT":"",Z.clearcoatMap?"#define USE_CLEARCOATMAP":"",Z.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",Z.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",Z.iridescence?"#define USE_IRIDESCENCE":"",Z.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",Z.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",Z.specularMap?"#define USE_SPECULARMAP":"",Z.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",Z.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",Z.roughnessMap?"#define USE_ROUGHNESSMAP":"",Z.metalnessMap?"#define USE_METALNESSMAP":"",Z.alphaMap?"#define USE_ALPHAMAP":"",Z.alphaTest?"#define USE_ALPHATEST":"",Z.alphaHash?"#define USE_ALPHAHASH":"",Z.sheen?"#define USE_SHEEN":"",Z.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",Z.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",Z.transmission?"#define USE_TRANSMISSION":"",Z.transmissionMap?"#define USE_TRANSMISSIONMAP":"",Z.thicknessMap?"#define USE_THICKNESSMAP":"",Z.vertexTangents&&Z.flatShading===!1?"#define USE_TANGENT":"",Z.vertexColors||Z.instancingColor?"#define USE_COLOR":"",Z.vertexAlphas?"#define USE_COLOR_ALPHA":"",Z.vertexUv1s?"#define USE_UV1":"",Z.vertexUv2s?"#define USE_UV2":"",Z.vertexUv3s?"#define USE_UV3":"",Z.pointsUvs?"#define USE_POINTS_UV":"",Z.gradientMap?"#define USE_GRADIENTMAP":"",Z.flatShading?"#define FLAT_SHADED":"",Z.doubleSided?"#define DOUBLE_SIDED":"",Z.flipSided?"#define FLIP_SIDED":"",Z.shadowMapEnabled?"#define USE_SHADOWMAP":"",Z.shadowMapEnabled?"#define "+G:"",Z.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",Z.numLightProbes>0?"#define USE_LIGHT_PROBES":"",Z.useLegacyLights?"#define LEGACY_LIGHTS":"",Z.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",Z.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",Z.logarithmicDepthBuffer&&Z.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",Z.toneMapping!==0?"#define TONE_MAPPING":"",Z.toneMapping!==0?k0.tonemapping_pars_fragment:"",Z.toneMapping!==0?$W("toneMapping",Z.toneMapping):"",Z.dithering?"#define DITHERING":"",Z.opaque?"#define OPAQUE":"",k0.colorspace_pars_fragment,JW("linearToOutputTexel",Z.outputColorSpace),Z.useDepthPacking?"#define DEPTH_PACKING "+Z.depthPacking:"","\n"].filter(v6).join("\n");if(H=a7(H),H=t8(H,Z),H=e8(H,Z),X=a7(X),X=t8(X,Z),X=e8(X,Z),H=J9(H),X=J9(X),Z.isWebGL2&&Z.isRawShaderMaterial!==!0)I="#version 300 es\n",D=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+D,q=["#define varying in",Z.glslVersion==="300 es"?"":"layout(location = 0) out highp vec4 pc_fragColor;",Z.glslVersion==="300 es"?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+q;const z=I+D+H,A=I+q+X,L=r8(W,W.VERTEX_SHADER,z),w=r8(W,W.FRAGMENT_SHADER,A);if(W.attachShader(M,L),W.attachShader(M,w),Z.index0AttributeName!==void 0)W.bindAttribLocation(M,0,Z.index0AttributeName);else if(Z.morphTargets===!0)W.bindAttribLocation(M,0,"position");if(W.linkProgram(M),J.debug.checkShaderErrors){const N=W.getProgramInfoLog(M).trim(),C=W.getShaderInfoLog(L).trim(),m=W.getShaderInfoLog(w).trim();let e=!0,W0=!0;if(W.getProgramParameter(M,W.LINK_STATUS)===!1)if(e=!1,typeof J.debug.onShaderError==="function")J.debug.onShaderError(W,M,L,w);else{const P=a8(W,L,"vertex"),l=a8(W,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+W.getError()+" - VALIDATE_STATUS "+W.getProgramParameter(M,W.VALIDATE_STATUS)+"\n\nProgram Info Log: "+N+"\n"+P+"\n"+l)}else if(N!=="")console.warn("THREE.WebGLProgram: Program Info Log:",N);else if(C===""||m==="")W0=!1;if(W0)this.diagnostics={runnable:e,programLog:N,vertexShader:{log:C,prefix:D},fragmentShader:{log:m,prefix:q}}}W.deleteShader(L),W.deleteShader(w);let g;this.getUniforms=function(){if(g===void 0)g=new x6(W,M);return g};let u;return this.getAttributes=function(){if(u===void 0)u=WW(W,M);return u},this.destroy=function(){Q.releaseStatesOfProgram(this),W.deleteProgram(M),this.program=void 0},this.type=Z.shaderType,this.name=Z.shaderName,this.id=aQ++,this.cacheKey=$,this.usedTimes=1,this.program=M,this.vertexShader=L,this.fragmentShader=w,this},NW=function(J,$,Z,Q,W,Y,H){const X=new Q8,G=new I9,K=[],U=W.isWebGL2,V=W.logarithmicDepthBuffer,R=W.vertexTextures;let E=W.precision;const O={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function M(N){if(N===0)return"uv";return`uv${N}`}function D(N,C,m,e,W0){const P=e.fog,l=W0.geometry,n=N.isMeshStandardMaterial?e.environment:null,d=(N.isMeshStandardMaterial?Z:$).get(N.envMap||n),r=!!d&&d.mapping===306?d.image.height:null,p=O[N.type];if(N.precision!==null){if(E=W.getMaxPrecision(N.precision),E!==N.precision)console.warn("THREE.WebGLProgram.getParameters:",N.precision,"not supported, using",E,"instead.")}const T=l.morphAttributes.position||l.morphAttributes.normal||l.morphAttributes.color,h=T!==void 0?T.length:0;let a=0;if(l.morphAttributes.position!==void 0)a=1;if(l.morphAttributes.normal!==void 0)a=2;if(l.morphAttributes.color!==void 0)a=3;let G0,X0,U0,j0;if(p){const u0=AJ[p];G0=u0.vertexShader,X0=u0.fragmentShader}else G0=N.vertexShader,X0=N.fragmentShader,G.update(N),U0=G.getVertexShaderID(N),j0=G.getFragmentShaderID(N);const F0=J.getRenderTarget(),y0=W0.isInstancedMesh===!0,n0=!!N.map,KJ=!!N.matcap,S=!!d,i0=!!N.aoMap,f0=!!N.lightMap,E0=!!N.bumpMap,B0=!!N.normalMap,d0=!!N.displacementMap,T0=!!N.emissiveMap,v0=!!N.metalnessMap,s0=!!N.roughnessMap,p0=N.anisotropy>0,WJ=N.clearcoat>0,_J=N.iridescence>0,B=N.sheen>0,F=N.transmission>0,j=p0&&!!N.anisotropyMap,t=WJ&&!!N.clearcoatMap,o=WJ&&!!N.clearcoatNormalMap,i=WJ&&!!N.clearcoatRoughnessMap,R0=_J&&!!N.iridescenceMap,Z0=_J&&!!N.iridescenceThicknessMap,q0=B&&!!N.sheenColorMap,M0=B&&!!N.sheenRoughnessMap,b0=!!N.specularMap,s=!!N.specularColorMap,l0=!!N.specularIntensityMap,C0=F&&!!N.transmissionMap,I0=F&&!!N.thicknessMap,V0=!!N.gradientMap,k=!!N.alphaMap,$0=N.alphaTest>0,J0=!!N.alphaHash,H0=!!N.extensions,Y0=!!l.attributes.uv1,c=!!l.attributes.uv2,D0=!!l.attributes.uv3;let L0=0;if(N.toneMapped){if(F0===null||F0.isXRRenderTarget===!0)L0=J.toneMapping}return{isWebGL2:U,shaderID:p,shaderType:N.type,shaderName:N.name,vertexShader:G0,fragmentShader:X0,defines:N.defines,customVertexShaderID:U0,customFragmentShaderID:j0,isRawShaderMaterial:N.isRawShaderMaterial===!0,glslVersion:N.glslVersion,precision:E,instancing:y0,instancingColor:y0&&W0.instanceColor!==null,supportsVertexTextures:R,outputColorSpace:F0===null?J.outputColorSpace:F0.isXRRenderTarget===!0?F0.texture.colorSpace:"srgb-linear",map:n0,matcap:KJ,envMap:S,envMapMode:S&&d.mapping,envMapCubeUVHeight:r,aoMap:i0,lightMap:f0,bumpMap:E0,normalMap:B0,displacementMap:R&&d0,emissiveMap:T0,normalMapObjectSpace:B0&&N.normalMapType===1,normalMapTangentSpace:B0&&N.normalMapType===0,metalnessMap:v0,roughnessMap:s0,anisotropy:p0,anisotropyMap:j,clearcoat:WJ,clearcoatMap:t,clearcoatNormalMap:o,clearcoatRoughnessMap:i,iridescence:_J,iridescenceMap:R0,iridescenceThicknessMap:Z0,sheen:B,sheenColorMap:q0,sheenRoughnessMap:M0,specularMap:b0,specularColorMap:s,specularIntensityMap:l0,transmission:F,transmissionMap:C0,thicknessMap:I0,gradientMap:V0,opaque:N.transparent===!1&&N.blending===1,alphaMap:k,alphaTest:$0,alphaHash:J0,combine:N.combine,mapUv:n0&&M(N.map.channel),aoMapUv:i0&&M(N.aoMap.channel),lightMapUv:f0&&M(N.lightMap.channel),bumpMapUv:E0&&M(N.bumpMap.channel),normalMapUv:B0&&M(N.normalMap.channel),displacementMapUv:d0&&M(N.displacementMap.channel),emissiveMapUv:T0&&M(N.emissiveMap.channel),metalnessMapUv:v0&&M(N.metalnessMap.channel),roughnessMapUv:s0&&M(N.roughnessMap.channel),anisotropyMapUv:j&&M(N.anisotropyMap.channel),clearcoatMapUv:t&&M(N.clearcoatMap.channel),clearcoatNormalMapUv:o&&M(N.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:i&&M(N.clearcoatRoughnessMap.channel),iridescenceMapUv:R0&&M(N.iridescenceMap.channel),iridescenceThicknessMapUv:Z0&&M(N.iridescenceThicknessMap.channel),sheenColorMapUv:q0&&M(N.sheenColorMap.channel),sheenRoughnessMapUv:M0&&M(N.sheenRoughnessMap.channel),specularMapUv:b0&&M(N.specularMap.channel),specularColorMapUv:s&&M(N.specularColorMap.channel),specularIntensityMapUv:l0&&M(N.specularIntensityMap.channel),transmissionMapUv:C0&&M(N.transmissionMap.channel),thicknessMapUv:I0&&M(N.thicknessMap.channel),alphaMapUv:k&&M(N.alphaMap.channel),vertexTangents:!!l.attributes.tangent&&(B0||p0),vertexColors:N.vertexColors,vertexAlphas:N.vertexColors===!0&&!!l.attributes.color&&l.attributes.color.itemSize===4,vertexUv1s:Y0,vertexUv2s:c,vertexUv3s:D0,pointsUvs:W0.isPoints===!0&&!!l.attributes.uv&&(n0||k),fog:!!P,useFog:N.fog===!0,fogExp2:P&&P.isFogExp2,flatShading:N.flatShading===!0,sizeAttenuation:N.sizeAttenuation===!0,logarithmicDepthBuffer:V,skinning:W0.isSkinnedMesh===!0,morphTargets:l.morphAttributes.position!==void 0,morphNormals:l.morphAttributes.normal!==void 0,morphColors:l.morphAttributes.color!==void 0,morphTargetsCount:h,morphTextureStride:a,numDirLights:C.directional.length,numPointLights:C.point.length,numSpotLights:C.spot.length,numSpotLightMaps:C.spotLightMap.length,numRectAreaLights:C.rectArea.length,numHemiLights:C.hemi.length,numDirLightShadows:C.directionalShadowMap.length,numPointLightShadows:C.pointShadowMap.length,numSpotLightShadows:C.spotShadowMap.length,numSpotLightShadowsWithMaps:C.numSpotLightShadowsWithMaps,numLightProbes:C.numLightProbes,numClippingPlanes:H.numPlanes,numClipIntersection:H.numIntersection,dithering:N.dithering,shadowMapEnabled:J.shadowMap.enabled&&m.length>0,shadowMapType:J.shadowMap.type,toneMapping:L0,useLegacyLights:J._useLegacyLights,decodeVideoTexture:n0&&N.map.isVideoTexture===!0&&h0.getTransfer(N.map.colorSpace)==="srgb",premultipliedAlpha:N.premultipliedAlpha,doubleSided:N.side===2,flipSided:N.side===1,useDepthPacking:N.depthPacking>=0,depthPacking:N.depthPacking||0,index0AttributeName:N.index0AttributeName,extensionDerivatives:H0&&N.extensions.derivatives===!0,extensionFragDepth:H0&&N.extensions.fragDepth===!0,extensionDrawBuffers:H0&&N.extensions.drawBuffers===!0,extensionShaderTextureLOD:H0&&N.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:U||Q.has("EXT_frag_depth"),rendererExtensionDrawBuffers:U||Q.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:U||Q.has("EXT_shader_texture_lod"),customProgramCacheKey:N.customProgramCacheKey()}}function q(N){const C=[];if(N.shaderID)C.push(N.shaderID);else C.push(N.customVertexShaderID),C.push(N.customFragmentShaderID);if(N.defines!==void 0)for(let m in N.defines)C.push(m),C.push(N.defines[m]);if(N.isRawShaderMaterial===!1)I(C,N),z(C,N),C.push(J.outputColorSpace);return C.push(N.customProgramCacheKey),C.join()}function I(N,C){N.push(C.precision),N.push(C.outputColorSpace),N.push(C.envMapMode),N.push(C.envMapCubeUVHeight),N.push(C.mapUv),N.push(C.alphaMapUv),N.push(C.lightMapUv),N.push(C.aoMapUv),N.push(C.bumpMapUv),N.push(C.normalMapUv),N.push(C.displacementMapUv),N.push(C.emissiveMapUv),N.push(C.metalnessMapUv),N.push(C.roughnessMapUv),N.push(C.anisotropyMapUv),N.push(C.clearcoatMapUv),N.push(C.clearcoatNormalMapUv),N.push(C.clearcoatRoughnessMapUv),N.push(C.iridescenceMapUv),N.push(C.iridescenceThicknessMapUv),N.push(C.sheenColorMapUv),N.push(C.sheenRoughnessMapUv),N.push(C.specularMapUv),N.push(C.specularColorMapUv),N.push(C.specularIntensityMapUv),N.push(C.transmissionMapUv),N.push(C.thicknessMapUv),N.push(C.combine),N.push(C.fogExp2),N.push(C.sizeAttenuation),N.push(C.morphTargetsCount),N.push(C.morphAttributeCount),N.push(C.numDirLights),N.push(C.numPointLights),N.push(C.numSpotLights),N.push(C.numSpotLightMaps),N.push(C.numHemiLights),N.push(C.numRectAreaLights),N.push(C.numDirLightShadows),N.push(C.numPointLightShadows),N.push(C.numSpotLightShadows),N.push(C.numSpotLightShadowsWithMaps),N.push(C.numLightProbes),N.push(C.shadowMapType),N.push(C.toneMapping),N.push(C.numClippingPlanes),N.push(C.numClipIntersection),N.push(C.depthPacking)}function z(N,C){if(X.disableAll(),C.isWebGL2)X.enable(0);if(C.supportsVertexTextures)X.enable(1);if(C.instancing)X.enable(2);if(C.instancingColor)X.enable(3);if(C.matcap)X.enable(4);if(C.envMap)X.enable(5);if(C.normalMapObjectSpace)X.enable(6);if(C.normalMapTangentSpace)X.enable(7);if(C.clearcoat)X.enable(8);if(C.iridescence)X.enable(9);if(C.alphaTest)X.enable(10);if(C.vertexColors)X.enable(11);if(C.vertexAlphas)X.enable(12);if(C.vertexUv1s)X.enable(13);if(C.vertexUv2s)X.enable(14);if(C.vertexUv3s)X.enable(15);if(C.vertexTangents)X.enable(16);if(C.anisotropy)X.enable(17);if(N.push(X.mask),X.disableAll(),C.fog)X.enable(0);if(C.useFog)X.enable(1);if(C.flatShading)X.enable(2);if(C.logarithmicDepthBuffer)X.enable(3);if(C.skinning)X.enable(4);if(C.morphTargets)X.enable(5);if(C.morphNormals)X.enable(6);if(C.morphColors)X.enable(7);if(C.premultipliedAlpha)X.enable(8);if(C.shadowMapEnabled)X.enable(9);if(C.useLegacyLights)X.enable(10);if(C.doubleSided)X.enable(11);if(C.flipSided)X.enable(12);if(C.useDepthPacking)X.enable(13);if(C.dithering)X.enable(14);if(C.transmission)X.enable(15);if(C.sheen)X.enable(16);if(C.opaque)X.enable(17);if(C.pointsUvs)X.enable(18);if(C.decodeVideoTexture)X.enable(19);N.push(X.mask)}function A(N){const C=O[N.type];let m;if(C){const e=AJ[C];m=V$.clone(e.uniforms)}else m=N.uniforms;return m}function L(N,C){let m;for(let e=0,W0=K.length;e0)Q.push(q);else if(E.transparent===!0)W.push(q);else Z.push(q)}function G(V,R,E,O,M,D){const q=H(V,R,E,O,M,D);if(E.transmission>0)Q.unshift(q);else if(E.transparent===!0)W.unshift(q);else Z.unshift(q)}function K(V,R){if(Z.length>1)Z.sort(V||MW);if(Q.length>1)Q.sort(R||Z9);if(W.length>1)W.sort(R||Z9)}function U(){for(let V=$,R=J.length;V=Y.length)H=new Q9,Y.push(H);else H=Y[W];return H}function Z(){J=new WeakMap}return{get:$,dispose:Z}},zW=function(){const J={};return{get:function($){if(J[$.id]!==void 0)return J[$.id];let Z;switch($.type){case"DirectionalLight":Z={direction:new v,color:new g0};break;case"SpotLight":Z={position:new v,direction:new v,color:new g0,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":Z={position:new v,color:new g0,distance:0,decay:0};break;case"HemisphereLight":Z={direction:new v,skyColor:new g0,groundColor:new g0};break;case"RectAreaLight":Z={color:new g0,position:new v,halfWidth:new v,halfHeight:new v};break}return J[$.id]=Z,Z}}},BW=function(){const J={};return{get:function($){if(J[$.id]!==void 0)return J[$.id];let Z;switch($.type){case"DirectionalLight":Z={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new m0};break;case"SpotLight":Z={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new m0};break;case"PointLight":Z={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new m0,shadowCameraNear:1,shadowCameraFar:1000};break}return J[$.id]=Z,Z}}},wW=function(J,$){return($.castShadow?2:0)-(J.castShadow?2:0)+($.map?1:0)-(J.map?1:0)},kW=function(J,$){const Z=new zW,Q=BW(),W={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let U=0;U<9;U++)W.probe.push(new v);const Y=new v,H=new ZJ,X=new ZJ;function G(U,V){let R=0,E=0,O=0;for(let e=0;e<9;e++)W.probe[e].set(0,0,0);let M=0,D=0,q=0,I=0,z=0,A=0,L=0,w=0,g=0,u=0,N=0;U.sort(wW);const C=V===!0?Math.PI:1;for(let e=0,W0=U.length;e0)if($.isWebGL2)W.rectAreaLTC1=Q0.LTC_FLOAT_1,W.rectAreaLTC2=Q0.LTC_FLOAT_2;else if(J.has("OES_texture_float_linear")===!0)W.rectAreaLTC1=Q0.LTC_FLOAT_1,W.rectAreaLTC2=Q0.LTC_FLOAT_2;else if(J.has("OES_texture_half_float_linear")===!0)W.rectAreaLTC1=Q0.LTC_HALF_1,W.rectAreaLTC2=Q0.LTC_HALF_2;else console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.");W.ambient[0]=R,W.ambient[1]=E,W.ambient[2]=O;const m=W.hash;if(m.directionalLength!==M||m.pointLength!==D||m.spotLength!==q||m.rectAreaLength!==I||m.hemiLength!==z||m.numDirectionalShadows!==A||m.numPointShadows!==L||m.numSpotShadows!==w||m.numSpotMaps!==g||m.numLightProbes!==N)W.directional.length=M,W.spot.length=q,W.rectArea.length=I,W.point.length=D,W.hemi.length=z,W.directionalShadow.length=A,W.directionalShadowMap.length=A,W.pointShadow.length=L,W.pointShadowMap.length=L,W.spotShadow.length=w,W.spotShadowMap.length=w,W.directionalShadowMatrix.length=A,W.pointShadowMatrix.length=L,W.spotLightMatrix.length=w+g-u,W.spotLightMap.length=g,W.numSpotLightShadowsWithMaps=u,W.numLightProbes=N,m.directionalLength=M,m.pointLength=D,m.spotLength=q,m.rectAreaLength=I,m.hemiLength=z,m.numDirectionalShadows=A,m.numPointShadows=L,m.numSpotShadows=w,m.numSpotMaps=g,m.numLightProbes=N,W.version=IW++}function K(U,V){let R=0,E=0,O=0,M=0,D=0;const q=V.matrixWorldInverse;for(let I=0,z=U.length;I=X.length)G=new W9(J,$),X.push(G);else G=X[H];return G}function W(){Z=new WeakMap}return{get:Q,dispose:W}},PW=function(J,$,Z){let Q=new G8;const W=new m0,Y=new m0,H=new QJ,X=new k9({depthPacking:3201}),G=new C9,K={},U=Z.maxTextureSize,V={[0]:1,[1]:0,[2]:2},R=new sJ({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new m0},radius:{value:4}},vertexShader:LW,fragmentShader:AW}),E=R.clone();E.defines.HORIZONTAL_PASS=1;const O=new PJ;O.setAttribute("position",new CJ(new Float32Array([-1,-1,0.5,3,-1,0.5,-1,3,0.5]),3));const M=new hJ(O,R),D=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let q=this.type;this.render=function(L,w,g){if(D.enabled===!1)return;if(D.autoUpdate===!1&&D.needsUpdate===!1)return;if(L.length===0)return;const u=J.getRenderTarget(),N=J.getActiveCubeFace(),C=J.getActiveMipmapLevel(),m=J.state;m.setBlending(0),m.buffers.color.setClear(1,1,1,1),m.buffers.depth.setTest(!0),m.setScissorTest(!1);const e=q!==3&&this.type===3,W0=q===3&&this.type!==3;for(let P=0,l=L.length;PU||W.y>U){if(W.x>U)Y.x=Math.floor(U/r.x),W.x=Y.x*r.x,d.mapSize.x=Y.x;if(W.y>U)Y.y=Math.floor(U/r.y),W.y=Y.y*r.y,d.mapSize.y=Y.y}if(d.map===null||e===!0||W0===!0){const T=this.type!==3?{minFilter:1003,magFilter:1003}:{};if(d.map!==null)d.map.dispose();d.map=new nJ(W.x,W.y,T),d.map.texture.name=n.name+".shadowMap",d.camera.updateProjectionMatrix()}J.setRenderTarget(d.map),J.clear();const p=d.getViewportCount();for(let T=0;T0||w.map&&w.alphaTest>0){const m=N.uuid,e=w.uuid;let W0=K[m];if(W0===void 0)W0={},K[m]=W0;let P=W0[e];if(P===void 0)P=N.clone(),W0[e]=P;N=P}if(N.visible=w.visible,N.wireframe=w.wireframe,u===3)N.side=w.shadowSide!==null?w.shadowSide:w.side;else N.side=w.shadowSide!==null?w.shadowSide:V[w.side];if(N.alphaMap=w.alphaMap,N.alphaTest=w.alphaTest,N.map=w.map,N.clipShadows=w.clipShadows,N.clippingPlanes=w.clippingPlanes,N.clipIntersection=w.clipIntersection,N.displacementMap=w.displacementMap,N.displacementScale=w.displacementScale,N.displacementBias=w.displacementBias,N.wireframeLinewidth=w.wireframeLinewidth,N.linewidth=w.linewidth,g.isPointLight===!0&&N.isMeshDistanceMaterial===!0){const m=J.properties.get(N);m.light=g}return N}function A(L,w,g,u,N){if(L.visible===!1)return;if(L.layers.test(w.layers)&&(L.isMesh||L.isLine||L.isPoints)){if((L.castShadow||L.receiveShadow&&N===3)&&(!L.frustumCulled||Q.intersectsObject(L))){L.modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,L.matrixWorld);const e=$.update(L),W0=L.material;if(Array.isArray(W0)){const P=e.groups;for(let l=0,n=P.length;l=1;else if(r.indexOf("OpenGL ES")!==-1)d=parseFloat(/^OpenGL ES (\d)/.exec(r)[1]),n=d>=2;let p=null,T={};const h=J.getParameter(J.SCISSOR_BOX),a=J.getParameter(J.VIEWPORT),G0=new QJ().fromArray(h),X0=new QJ().fromArray(a);function U0(k,$0,J0,H0){const Y0=new Uint8Array(4),c=J.createTexture();J.bindTexture(k,c),J.texParameteri(k,J.TEXTURE_MIN_FILTER,J.NEAREST),J.texParameteri(k,J.TEXTURE_MAG_FILTER,J.NEAREST);for(let D0=0;D0t||B.height>t)o=t/Math.max(B.width,B.height);if(o<1||F===!0)if(typeof HTMLImageElement!=="undefined"&&B instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&B instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&B instanceof ImageBitmap){const i=F?i7:Math.floor,R0=i(o*B.width),Z0=i(o*B.height);if(M===void 0)M=I(R0,Z0);const q0=j?I(R0,Z0):M;return q0.width=R0,q0.height=Z0,q0.getContext("2d").drawImage(B,0,0,R0,Z0),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+B.width+"x"+B.height+") to ("+R0+"x"+Z0+")."),q0}else{if("data"in B)console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+B.width+"x"+B.height+").");return B}return B}function A(B){return z8(B.width)&&z8(B.height)}function L(B){if(X)return!1;return B.wrapS!==1001||B.wrapT!==1001||B.minFilter!==1003&&B.minFilter!==1006}function w(B,F){return B.generateMipmaps&&F&&B.minFilter!==1003&&B.minFilter!==1006}function g(B){J.generateMipmap(B)}function u(B,F,j,t,o=!1){if(X===!1)return F;if(B!==null){if(J[B]!==void 0)return J[B];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \'"+B+"\'")}let i=F;if(F===J.RED){if(j===J.FLOAT)i=J.R32F;if(j===J.HALF_FLOAT)i=J.R16F;if(j===J.UNSIGNED_BYTE)i=J.R8}if(F===J.RED_INTEGER){if(j===J.UNSIGNED_BYTE)i=J.R8UI;if(j===J.UNSIGNED_SHORT)i=J.R16UI;if(j===J.UNSIGNED_INT)i=J.R32UI;if(j===J.BYTE)i=J.R8I;if(j===J.SHORT)i=J.R16I;if(j===J.INT)i=J.R32I}if(F===J.RG){if(j===J.FLOAT)i=J.RG32F;if(j===J.HALF_FLOAT)i=J.RG16F;if(j===J.UNSIGNED_BYTE)i=J.RG8}if(F===J.RGBA){const R0=o?"linear":h0.getTransfer(t);if(j===J.FLOAT)i=J.RGBA32F;if(j===J.HALF_FLOAT)i=J.RGBA16F;if(j===J.UNSIGNED_BYTE)i=R0==="srgb"?J.SRGB8_ALPHA8:J.RGBA8;if(j===J.UNSIGNED_SHORT_4_4_4_4)i=J.RGBA4;if(j===J.UNSIGNED_SHORT_5_5_5_1)i=J.RGB5_A1}if(i===J.R16F||i===J.R32F||i===J.RG16F||i===J.RG32F||i===J.RGBA16F||i===J.RGBA32F)$.get("EXT_color_buffer_float");return i}function N(B,F,j){if(w(B,j)===!0||B.isFramebufferTexture&&B.minFilter!==1003&&B.minFilter!==1006)return Math.log2(Math.max(F.width,F.height))+1;else if(B.mipmaps!==void 0&&B.mipmaps.length>0)return B.mipmaps.length;else if(B.isCompressedTexture&&Array.isArray(B.image))return F.mipmaps.length;else return 1}function C(B){if(B===1003||B===1004||B===1005)return J.NEAREST;return J.LINEAR}function m(B){const F=B.target;if(F.removeEventListener("dispose",m),W0(F),F.isVideoTexture)O.delete(F)}function e(B){const F=B.target;F.removeEventListener("dispose",e),l(F)}function W0(B){const F=Q.get(B);if(F.__webglInit===void 0)return;const j=B.source,t=D.get(j);if(t){const o=t[F.__cacheKey];if(o.usedTimes--,o.usedTimes===0)P(B);if(Object.keys(t).length===0)D.delete(j)}Q.remove(B)}function P(B){const F=Q.get(B);J.deleteTexture(F.__webglTexture);const j=B.source,t=D.get(j);delete t[F.__cacheKey],H.memory.textures--}function l(B){const F=B.texture,j=Q.get(B),t=Q.get(F);if(t.__webglTexture!==void 0)J.deleteTexture(t.__webglTexture),H.memory.textures--;if(B.depthTexture)B.depthTexture.dispose();if(B.isWebGLCubeRenderTarget)for(let o=0;o<6;o++){if(Array.isArray(j.__webglFramebuffer[o]))for(let i=0;i=G)console.warn("THREE.WebGLTextures: Trying to use "+B+" texture units while this GPU supports only "+G);return n+=1,B}function p(B){const F=[];return F.push(B.wrapS),F.push(B.wrapT),F.push(B.wrapR||0),F.push(B.magFilter),F.push(B.minFilter),F.push(B.anisotropy),F.push(B.internalFormat),F.push(B.format),F.push(B.type),F.push(B.generateMipmaps),F.push(B.premultiplyAlpha),F.push(B.flipY),F.push(B.unpackAlignment),F.push(B.colorSpace),F.join()}function T(B,F){const j=Q.get(B);if(B.isVideoTexture)WJ(B);if(B.isRenderTargetTexture===!1&&B.version>0&&j.__version!==B.version){const t=B.image;if(t===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(t.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{n0(j,B,F);return}}Z.bindTexture(J.TEXTURE_2D,j.__webglTexture,J.TEXTURE0+F)}function h(B,F){const j=Q.get(B);if(B.version>0&&j.__version!==B.version){n0(j,B,F);return}Z.bindTexture(J.TEXTURE_2D_ARRAY,j.__webglTexture,J.TEXTURE0+F)}function a(B,F){const j=Q.get(B);if(B.version>0&&j.__version!==B.version){n0(j,B,F);return}Z.bindTexture(J.TEXTURE_3D,j.__webglTexture,J.TEXTURE0+F)}function G0(B,F){const j=Q.get(B);if(B.version>0&&j.__version!==B.version){KJ(j,B,F);return}Z.bindTexture(J.TEXTURE_CUBE_MAP,j.__webglTexture,J.TEXTURE0+F)}const X0={[1000]:J.REPEAT,[1001]:J.CLAMP_TO_EDGE,[1002]:J.MIRRORED_REPEAT},U0={[1003]:J.NEAREST,[1004]:J.NEAREST_MIPMAP_NEAREST,[1005]:J.NEAREST_MIPMAP_LINEAR,[1006]:J.LINEAR,[1007]:J.LINEAR_MIPMAP_NEAREST,[1008]:J.LINEAR_MIPMAP_LINEAR},j0={[512]:J.NEVER,[519]:J.ALWAYS,[513]:J.LESS,[515]:J.LEQUAL,[514]:J.EQUAL,[518]:J.GEQUAL,[516]:J.GREATER,[517]:J.NOTEQUAL};function F0(B,F,j){if(j){if(J.texParameteri(B,J.TEXTURE_WRAP_S,X0[F.wrapS]),J.texParameteri(B,J.TEXTURE_WRAP_T,X0[F.wrapT]),B===J.TEXTURE_3D||B===J.TEXTURE_2D_ARRAY)J.texParameteri(B,J.TEXTURE_WRAP_R,X0[F.wrapR]);J.texParameteri(B,J.TEXTURE_MAG_FILTER,U0[F.magFilter]),J.texParameteri(B,J.TEXTURE_MIN_FILTER,U0[F.minFilter])}else{if(J.texParameteri(B,J.TEXTURE_WRAP_S,J.CLAMP_TO_EDGE),J.texParameteri(B,J.TEXTURE_WRAP_T,J.CLAMP_TO_EDGE),B===J.TEXTURE_3D||B===J.TEXTURE_2D_ARRAY)J.texParameteri(B,J.TEXTURE_WRAP_R,J.CLAMP_TO_EDGE);if(F.wrapS!==1001||F.wrapT!==1001)console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.");if(J.texParameteri(B,J.TEXTURE_MAG_FILTER,C(F.magFilter)),J.texParameteri(B,J.TEXTURE_MIN_FILTER,C(F.minFilter)),F.minFilter!==1003&&F.minFilter!==1006)console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")}if(F.compareFunction)J.texParameteri(B,J.TEXTURE_COMPARE_MODE,J.COMPARE_REF_TO_TEXTURE),J.texParameteri(B,J.TEXTURE_COMPARE_FUNC,j0[F.compareFunction]);if($.has("EXT_texture_filter_anisotropic")===!0){const t=$.get("EXT_texture_filter_anisotropic");if(F.magFilter===1003)return;if(F.minFilter!==1005&&F.minFilter!==1008)return;if(F.type===1015&&$.has("OES_texture_float_linear")===!1)return;if(X===!1&&(F.type===1016&&$.has("OES_texture_half_float_linear")===!1))return;if(F.anisotropy>1||Q.get(F).__currentAnisotropy)J.texParameterf(B,t.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(F.anisotropy,W.getMaxAnisotropy())),Q.get(F).__currentAnisotropy=F.anisotropy}}function y0(B,F){let j=!1;if(B.__webglInit===void 0)B.__webglInit=!0,F.addEventListener("dispose",m);const t=F.source;let o=D.get(t);if(o===void 0)o={},D.set(t,o);const i=p(F);if(i!==B.__cacheKey){if(o[i]===void 0)o[i]={texture:J.createTexture(),usedTimes:0},H.memory.textures++,j=!0;o[i].usedTimes++;const R0=o[B.__cacheKey];if(R0!==void 0){if(o[B.__cacheKey].usedTimes--,R0.usedTimes===0)P(F)}B.__cacheKey=i,B.__webglTexture=o[i].texture}return j}function n0(B,F,j){let t=J.TEXTURE_2D;if(F.isDataArrayTexture||F.isCompressedArrayTexture)t=J.TEXTURE_2D_ARRAY;if(F.isData3DTexture)t=J.TEXTURE_3D;const o=y0(B,F),i=F.source;Z.bindTexture(t,B.__webglTexture,J.TEXTURE0+j);const R0=Q.get(i);if(i.version!==R0.__version||o===!0){Z.activeTexture(J.TEXTURE0+j);const Z0=h0.getPrimaries(h0.workingColorSpace),q0=F.colorSpace===""?null:h0.getPrimaries(F.colorSpace),M0=F.colorSpace===""||Z0===q0?J.NONE:J.BROWSER_DEFAULT_WEBGL;J.pixelStorei(J.UNPACK_FLIP_Y_WEBGL,F.flipY),J.pixelStorei(J.UNPACK_PREMULTIPLY_ALPHA_WEBGL,F.premultiplyAlpha),J.pixelStorei(J.UNPACK_ALIGNMENT,F.unpackAlignment),J.pixelStorei(J.UNPACK_COLORSPACE_CONVERSION_WEBGL,M0);const b0=L(F)&&A(F.image)===!1;let s=z(F.image,b0,!1,U);s=_J(F,s);const l0=A(s)||X,C0=Y.convert(F.format,F.colorSpace);let I0=Y.convert(F.type),V0=u(F.internalFormat,C0,I0,F.colorSpace,F.isVideoTexture);F0(t,F,l0);let k;const $0=F.mipmaps,J0=X&&F.isVideoTexture!==!0,H0=R0.__version===void 0||o===!0,Y0=N(F,s,l0);if(F.isDepthTexture){if(V0=J.DEPTH_COMPONENT,X)if(F.type===1015)V0=J.DEPTH_COMPONENT32F;else if(F.type===1014)V0=J.DEPTH_COMPONENT24;else if(F.type===1020)V0=J.DEPTH24_STENCIL8;else V0=J.DEPTH_COMPONENT16;else if(F.type===1015)console.error("WebGLRenderer: Floating point depth texture requires WebGL2.");if(F.format===1026&&V0===J.DEPTH_COMPONENT){if(F.type!==1012&&F.type!==1014)console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),F.type=1014,I0=Y.convert(F.type)}if(F.format===1027&&V0===J.DEPTH_COMPONENT){if(V0=J.DEPTH_STENCIL,F.type!==1020)console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),F.type=1020,I0=Y.convert(F.type)}if(H0)if(J0)Z.texStorage2D(J.TEXTURE_2D,1,V0,s.width,s.height);else Z.texImage2D(J.TEXTURE_2D,0,V0,s.width,s.height,0,C0,I0,null)}else if(F.isDataTexture)if($0.length>0&&l0){if(J0&&H0)Z.texStorage2D(J.TEXTURE_2D,Y0,V0,$0[0].width,$0[0].height);for(let c=0,D0=$0.length;c>=1,D0>>=1}}else if($0.length>0&&l0){if(J0&&H0)Z.texStorage2D(J.TEXTURE_2D,Y0,V0,$0[0].width,$0[0].height);for(let c=0,D0=$0.length;c0)H0++;Z.texStorage2D(J.TEXTURE_CUBE_MAP,H0,k,s[0].width,s[0].height)}for(let c=0;c<6;c++)if(b0){if($0)Z.texSubImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+c,0,0,0,s[c].width,s[c].height,I0,V0,s[c].data);else Z.texImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+c,0,k,s[c].width,s[c].height,0,I0,V0,s[c].data);for(let D0=0;D0>i),s=Math.max(1,F.height>>i);if(o===J.TEXTURE_3D||o===J.TEXTURE_2D_ARRAY)Z.texImage3D(o,i,q0,b0,s,F.depth,0,R0,Z0,null);else Z.texImage2D(o,i,q0,b0,s,0,R0,Z0,null)}if(Z.bindFramebuffer(J.FRAMEBUFFER,B),p0(F))R.framebufferTexture2DMultisampleEXT(J.FRAMEBUFFER,t,o,Q.get(j).__webglTexture,0,s0(F));else if(o===J.TEXTURE_2D||o>=J.TEXTURE_CUBE_MAP_POSITIVE_X&&o<=J.TEXTURE_CUBE_MAP_NEGATIVE_Z)J.framebufferTexture2D(J.FRAMEBUFFER,t,o,Q.get(j).__webglTexture,i);Z.bindFramebuffer(J.FRAMEBUFFER,null)}function i0(B,F,j){if(J.bindRenderbuffer(J.RENDERBUFFER,B),F.depthBuffer&&!F.stencilBuffer){let t=X===!0?J.DEPTH_COMPONENT24:J.DEPTH_COMPONENT16;if(j||p0(F)){const o=F.depthTexture;if(o&&o.isDepthTexture){if(o.type===1015)t=J.DEPTH_COMPONENT32F;else if(o.type===1014)t=J.DEPTH_COMPONENT24}const i=s0(F);if(p0(F))R.renderbufferStorageMultisampleEXT(J.RENDERBUFFER,i,t,F.width,F.height);else J.renderbufferStorageMultisample(J.RENDERBUFFER,i,t,F.width,F.height)}else J.renderbufferStorage(J.RENDERBUFFER,t,F.width,F.height);J.framebufferRenderbuffer(J.FRAMEBUFFER,J.DEPTH_ATTACHMENT,J.RENDERBUFFER,B)}else if(F.depthBuffer&&F.stencilBuffer){const t=s0(F);if(j&&p0(F)===!1)J.renderbufferStorageMultisample(J.RENDERBUFFER,t,J.DEPTH24_STENCIL8,F.width,F.height);else if(p0(F))R.renderbufferStorageMultisampleEXT(J.RENDERBUFFER,t,J.DEPTH24_STENCIL8,F.width,F.height);else J.renderbufferStorage(J.RENDERBUFFER,J.DEPTH_STENCIL,F.width,F.height);J.framebufferRenderbuffer(J.FRAMEBUFFER,J.DEPTH_STENCIL_ATTACHMENT,J.RENDERBUFFER,B)}else{const t=F.isWebGLMultipleRenderTargets===!0?F.texture:[F.texture];for(let o=0;o0){j.__webglFramebuffer[Z0]=[];for(let q0=0;q00){j.__webglFramebuffer=[];for(let Z0=0;Z00&&p0(B)===!1){const Z0=i?F:[F];j.__webglMultisampledFramebuffer=J.createFramebuffer(),j.__webglColorRenderbuffer=[],Z.bindFramebuffer(J.FRAMEBUFFER,j.__webglMultisampledFramebuffer);for(let q0=0;q00)for(let q0=0;q00)for(let q0=0;q00&&p0(B)===!1){const F=B.isWebGLMultipleRenderTargets?B.texture:[B.texture],j=B.width,t=B.height;let o=J.COLOR_BUFFER_BIT;const i=[],R0=B.stencilBuffer?J.DEPTH_STENCIL_ATTACHMENT:J.DEPTH_ATTACHMENT,Z0=Q.get(B),q0=B.isWebGLMultipleRenderTargets===!0;if(q0)for(let M0=0;M00&&$.has("WEBGL_multisampled_render_to_texture")===!0&&F.__useRenderToTexture!==!1}function WJ(B){const F=H.render.frame;if(O.get(B)!==F)O.set(B,F),B.update()}function _J(B,F){const{colorSpace:j,format:t,type:o}=B;if(B.isCompressedTexture===!0||B.isVideoTexture===!0||B.format===1035)return F;if(j!=="srgb-linear"&&j!=="")if(h0.getTransfer(j)==="srgb"){if(X===!1)if($.has("EXT_sRGB")===!0&&t===1023)B.format=1035,B.minFilter=1006,B.generateMipmaps=!1;else F=e7.sRGBToLinear(F);else if(t!==1023||o!==1009)console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.")}else console.error("THREE.WebGLTextures: Unsupported texture color space:",j);return F}this.allocateTextureUnit=r,this.resetTextureUnits=d,this.setTexture2D=T,this.setTexture2DArray=h,this.setTexture3D=a,this.setTextureCube=G0,this.rebindTextures=B0,this.setupRenderTarget=d0,this.updateRenderTargetMipmap=T0,this.updateMultisampleRenderTarget=v0,this.setupDepthRenderbuffer=E0,this.setupFrameBufferTexture=S,this.useMultisampledRTT=p0},yW=function(J,$,Z){const Q=Z.isWebGL2;function W(Y,H=""){let X;const G=h0.getTransfer(H);if(Y===1009)return J.UNSIGNED_BYTE;if(Y===1017)return J.UNSIGNED_SHORT_4_4_4_4;if(Y===1018)return J.UNSIGNED_SHORT_5_5_5_1;if(Y===1010)return J.BYTE;if(Y===1011)return J.SHORT;if(Y===1012)return J.UNSIGNED_SHORT;if(Y===1013)return J.INT;if(Y===1014)return J.UNSIGNED_INT;if(Y===1015)return J.FLOAT;if(Y===1016){if(Q)return J.HALF_FLOAT;if(X=$.get("OES_texture_half_float"),X!==null)return X.HALF_FLOAT_OES;else return null}if(Y===1021)return J.ALPHA;if(Y===1023)return J.RGBA;if(Y===1024)return J.LUMINANCE;if(Y===1025)return J.LUMINANCE_ALPHA;if(Y===1026)return J.DEPTH_COMPONENT;if(Y===1027)return J.DEPTH_STENCIL;if(Y===1035)if(X=$.get("EXT_sRGB"),X!==null)return X.SRGB_ALPHA_EXT;else return null;if(Y===1028)return J.RED;if(Y===1029)return J.RED_INTEGER;if(Y===1030)return J.RG;if(Y===1031)return J.RG_INTEGER;if(Y===1033)return J.RGBA_INTEGER;if(Y===33776||Y===33777||Y===33778||Y===33779)if(G==="srgb")if(X=$.get("WEBGL_compressed_texture_s3tc_srgb"),X!==null){if(Y===33776)return X.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(Y===33777)return X.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(Y===33778)return X.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(Y===33779)return X.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(X=$.get("WEBGL_compressed_texture_s3tc"),X!==null){if(Y===33776)return X.COMPRESSED_RGB_S3TC_DXT1_EXT;if(Y===33777)return X.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(Y===33778)return X.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(Y===33779)return X.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(Y===35840||Y===35841||Y===35842||Y===35843)if(X=$.get("WEBGL_compressed_texture_pvrtc"),X!==null){if(Y===35840)return X.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(Y===35841)return X.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(Y===35842)return X.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(Y===35843)return X.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(Y===36196)if(X=$.get("WEBGL_compressed_texture_etc1"),X!==null)return X.COMPRESSED_RGB_ETC1_WEBGL;else return null;if(Y===37492||Y===37496)if(X=$.get("WEBGL_compressed_texture_etc"),X!==null){if(Y===37492)return G==="srgb"?X.COMPRESSED_SRGB8_ETC2:X.COMPRESSED_RGB8_ETC2;if(Y===37496)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:X.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(Y===37808||Y===37809||Y===37810||Y===37811||Y===37812||Y===37813||Y===37814||Y===37815||Y===37816||Y===37817||Y===37818||Y===37819||Y===37820||Y===37821)if(X=$.get("WEBGL_compressed_texture_astc"),X!==null){if(Y===37808)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:X.COMPRESSED_RGBA_ASTC_4x4_KHR;if(Y===37809)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:X.COMPRESSED_RGBA_ASTC_5x4_KHR;if(Y===37810)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:X.COMPRESSED_RGBA_ASTC_5x5_KHR;if(Y===37811)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:X.COMPRESSED_RGBA_ASTC_6x5_KHR;if(Y===37812)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:X.COMPRESSED_RGBA_ASTC_6x6_KHR;if(Y===37813)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:X.COMPRESSED_RGBA_ASTC_8x5_KHR;if(Y===37814)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:X.COMPRESSED_RGBA_ASTC_8x6_KHR;if(Y===37815)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:X.COMPRESSED_RGBA_ASTC_8x8_KHR;if(Y===37816)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:X.COMPRESSED_RGBA_ASTC_10x5_KHR;if(Y===37817)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:X.COMPRESSED_RGBA_ASTC_10x6_KHR;if(Y===37818)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:X.COMPRESSED_RGBA_ASTC_10x8_KHR;if(Y===37819)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:X.COMPRESSED_RGBA_ASTC_10x10_KHR;if(Y===37820)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:X.COMPRESSED_RGBA_ASTC_12x10_KHR;if(Y===37821)return G==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:X.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(Y===36492||Y===36494||Y===36495)if(X=$.get("EXT_texture_compression_bptc"),X!==null){if(Y===36492)return G==="srgb"?X.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:X.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(Y===36494)return X.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(Y===36495)return X.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(Y===36283||Y===36284||Y===36285||Y===36286)if(X=$.get("EXT_texture_compression_rgtc"),X!==null){if(Y===36492)return X.COMPRESSED_RED_RGTC1_EXT;if(Y===36284)return X.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(Y===36285)return X.COMPRESSED_RED_GREEN_RGTC2_EXT;if(Y===36286)return X.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;if(Y===1020){if(Q)return J.UNSIGNED_INT_24_8;if(X=$.get("WEBGL_depth_texture"),X!==null)return X.UNSIGNED_INT_24_8_WEBGL;else return null}return J[Y]!==void 0?J[Y]:null}return{convert:W}},vW=function(J,$){function Z(D,q){if(D.matrixAutoUpdate===!0)D.updateMatrix();q.value.copy(D.matrix)}function Q(D,q){if(q.color.getRGB(D.fogColor.value,U9(J)),q.isFog)D.fogNear.value=q.near,D.fogFar.value=q.far;else if(q.isFogExp2)D.fogDensity.value=q.density}function W(D,q,I,z,A){if(q.isMeshBasicMaterial)Y(D,q);else if(q.isMeshLambertMaterial)Y(D,q);else if(q.isMeshToonMaterial)Y(D,q),V(D,q);else if(q.isMeshPhongMaterial)Y(D,q),U(D,q);else if(q.isMeshStandardMaterial){if(Y(D,q),R(D,q),q.isMeshPhysicalMaterial)E(D,q,A)}else if(q.isMeshMatcapMaterial)Y(D,q),O(D,q);else if(q.isMeshDepthMaterial)Y(D,q);else if(q.isMeshDistanceMaterial)Y(D,q),M(D,q);else if(q.isMeshNormalMaterial)Y(D,q);else if(q.isLineBasicMaterial){if(H(D,q),q.isLineDashedMaterial)X(D,q)}else if(q.isPointsMaterial)G(D,q,I,z);else if(q.isSpriteMaterial)K(D,q);else if(q.isShadowMaterial)D.color.value.copy(q.color),D.opacity.value=q.opacity;else if(q.isShaderMaterial)q.uniformsNeedUpdate=!1}function Y(D,q){if(D.opacity.value=q.opacity,q.color)D.diffuse.value.copy(q.color);if(q.emissive)D.emissive.value.copy(q.emissive).multiplyScalar(q.emissiveIntensity);if(q.map)D.map.value=q.map,Z(q.map,D.mapTransform);if(q.alphaMap)D.alphaMap.value=q.alphaMap,Z(q.alphaMap,D.alphaMapTransform);if(q.bumpMap){if(D.bumpMap.value=q.bumpMap,Z(q.bumpMap,D.bumpMapTransform),D.bumpScale.value=q.bumpScale,q.side===1)D.bumpScale.value*=-1}if(q.normalMap){if(D.normalMap.value=q.normalMap,Z(q.normalMap,D.normalMapTransform),D.normalScale.value.copy(q.normalScale),q.side===1)D.normalScale.value.negate()}if(q.displacementMap)D.displacementMap.value=q.displacementMap,Z(q.displacementMap,D.displacementMapTransform),D.displacementScale.value=q.displacementScale,D.displacementBias.value=q.displacementBias;if(q.emissiveMap)D.emissiveMap.value=q.emissiveMap,Z(q.emissiveMap,D.emissiveMapTransform);if(q.specularMap)D.specularMap.value=q.specularMap,Z(q.specularMap,D.specularMapTransform);if(q.alphaTest>0)D.alphaTest.value=q.alphaTest;const I=$.get(q).envMap;if(I)D.envMap.value=I,D.flipEnvMap.value=I.isCubeTexture&&I.isRenderTargetTexture===!1?-1:1,D.reflectivity.value=q.reflectivity,D.ior.value=q.ior,D.refractionRatio.value=q.refractionRatio;if(q.lightMap){D.lightMap.value=q.lightMap;const z=J._useLegacyLights===!0?Math.PI:1;D.lightMapIntensity.value=q.lightMapIntensity*z,Z(q.lightMap,D.lightMapTransform)}if(q.aoMap)D.aoMap.value=q.aoMap,D.aoMapIntensity.value=q.aoMapIntensity,Z(q.aoMap,D.aoMapTransform)}function H(D,q){if(D.diffuse.value.copy(q.color),D.opacity.value=q.opacity,q.map)D.map.value=q.map,Z(q.map,D.mapTransform)}function X(D,q){D.dashSize.value=q.dashSize,D.totalSize.value=q.dashSize+q.gapSize,D.scale.value=q.scale}function G(D,q,I,z){if(D.diffuse.value.copy(q.color),D.opacity.value=q.opacity,D.size.value=q.size*I,D.scale.value=z*0.5,q.map)D.map.value=q.map,Z(q.map,D.uvTransform);if(q.alphaMap)D.alphaMap.value=q.alphaMap,Z(q.alphaMap,D.alphaMapTransform);if(q.alphaTest>0)D.alphaTest.value=q.alphaTest}function K(D,q){if(D.diffuse.value.copy(q.color),D.opacity.value=q.opacity,D.rotation.value=q.rotation,q.map)D.map.value=q.map,Z(q.map,D.mapTransform);if(q.alphaMap)D.alphaMap.value=q.alphaMap,Z(q.alphaMap,D.alphaMapTransform);if(q.alphaTest>0)D.alphaTest.value=q.alphaTest}function U(D,q){D.specular.value.copy(q.specular),D.shininess.value=Math.max(q.shininess,0.0001)}function V(D,q){if(q.gradientMap)D.gradientMap.value=q.gradientMap}function R(D,q){if(D.metalness.value=q.metalness,q.metalnessMap)D.metalnessMap.value=q.metalnessMap,Z(q.metalnessMap,D.metalnessMapTransform);if(D.roughness.value=q.roughness,q.roughnessMap)D.roughnessMap.value=q.roughnessMap,Z(q.roughnessMap,D.roughnessMapTransform);if($.get(q).envMap)D.envMapIntensity.value=q.envMapIntensity}function E(D,q,I){if(D.ior.value=q.ior,q.sheen>0){if(D.sheenColor.value.copy(q.sheenColor).multiplyScalar(q.sheen),D.sheenRoughness.value=q.sheenRoughness,q.sheenColorMap)D.sheenColorMap.value=q.sheenColorMap,Z(q.sheenColorMap,D.sheenColorMapTransform);if(q.sheenRoughnessMap)D.sheenRoughnessMap.value=q.sheenRoughnessMap,Z(q.sheenRoughnessMap,D.sheenRoughnessMapTransform)}if(q.clearcoat>0){if(D.clearcoat.value=q.clearcoat,D.clearcoatRoughness.value=q.clearcoatRoughness,q.clearcoatMap)D.clearcoatMap.value=q.clearcoatMap,Z(q.clearcoatMap,D.clearcoatMapTransform);if(q.clearcoatRoughnessMap)D.clearcoatRoughnessMap.value=q.clearcoatRoughnessMap,Z(q.clearcoatRoughnessMap,D.clearcoatRoughnessMapTransform);if(q.clearcoatNormalMap){if(D.clearcoatNormalMap.value=q.clearcoatNormalMap,Z(q.clearcoatNormalMap,D.clearcoatNormalMapTransform),D.clearcoatNormalScale.value.copy(q.clearcoatNormalScale),q.side===1)D.clearcoatNormalScale.value.negate()}}if(q.iridescence>0){if(D.iridescence.value=q.iridescence,D.iridescenceIOR.value=q.iridescenceIOR,D.iridescenceThicknessMinimum.value=q.iridescenceThicknessRange[0],D.iridescenceThicknessMaximum.value=q.iridescenceThicknessRange[1],q.iridescenceMap)D.iridescenceMap.value=q.iridescenceMap,Z(q.iridescenceMap,D.iridescenceMapTransform);if(q.iridescenceThicknessMap)D.iridescenceThicknessMap.value=q.iridescenceThicknessMap,Z(q.iridescenceThicknessMap,D.iridescenceThicknessMapTransform)}if(q.transmission>0){if(D.transmission.value=q.transmission,D.transmissionSamplerMap.value=I.texture,D.transmissionSamplerSize.value.set(I.width,I.height),q.transmissionMap)D.transmissionMap.value=q.transmissionMap,Z(q.transmissionMap,D.transmissionMapTransform);if(D.thickness.value=q.thickness,q.thicknessMap)D.thicknessMap.value=q.thicknessMap,Z(q.thicknessMap,D.thicknessMapTransform);D.attenuationDistance.value=q.attenuationDistance,D.attenuationColor.value.copy(q.attenuationColor)}if(q.anisotropy>0){if(D.anisotropyVector.value.set(q.anisotropy*Math.cos(q.anisotropyRotation),q.anisotropy*Math.sin(q.anisotropyRotation)),q.anisotropyMap)D.anisotropyMap.value=q.anisotropyMap,Z(q.anisotropyMap,D.anisotropyMapTransform)}if(D.specularIntensity.value=q.specularIntensity,D.specularColor.value.copy(q.specularColor),q.specularColorMap)D.specularColorMap.value=q.specularColorMap,Z(q.specularColorMap,D.specularColorMapTransform);if(q.specularIntensityMap)D.specularIntensityMap.value=q.specularIntensityMap,Z(q.specularIntensityMap,D.specularIntensityMapTransform)}function O(D,q){if(q.matcap)D.matcap.value=q.matcap}function M(D,q){const I=$.get(q).light;D.referencePosition.value.setFromMatrixPosition(I.matrixWorld),D.nearDistance.value=I.shadow.camera.near,D.farDistance.value=I.shadow.camera.far}return{refreshFogUniforms:Q,refreshMaterialUniforms:W}},jW=function(J,$,Z,Q){let W={},Y={},H=[];const X=Z.isWebGL2?J.getParameter(J.MAX_UNIFORM_BUFFER_BINDINGS):0;function G(I,z){const A=z.program;Q.uniformBlockBinding(I,A)}function K(I,z){let A=W[I.id];if(A===void 0)O(I),A=U(I),W[I.id]=A,I.addEventListener("dispose",D);const L=z.program;Q.updateUBOMapping(I,L);const w=$.render.frame;if(Y[I.id]!==w)R(I),Y[I.id]=w}function U(I){const z=V();I.__bindingPointIndex=z;const A=J.createBuffer(),L=I.__size,w=I.usage;return J.bindBuffer(J.UNIFORM_BUFFER,A),J.bufferData(J.UNIFORM_BUFFER,L,w),J.bindBuffer(J.UNIFORM_BUFFER,null),J.bindBufferBase(J.UNIFORM_BUFFER,z,A),A}function V(){for(let I=0;I0){w=A%L;const e=L-w;if(w!==0&&e-C.boundary<0)A+=L-w,N.__offset=A}A+=C.storage}if(w=A%L,w>0)A+=L-w;return I.__size=A,I.__cache={},this}function M(I){const z={boundary:0,storage:0};if(typeof I==="number")z.boundary=4,z.storage=4;else if(I.isVector2)z.boundary=8,z.storage=8;else if(I.isVector3||I.isColor)z.boundary=16,z.storage=12;else if(I.isVector4)z.boundary=16,z.storage=16;else if(I.isMatrix3)z.boundary=48,z.storage=48;else if(I.isMatrix4)z.boundary=64,z.storage=64;else if(I.isTexture)console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.");else console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",I);return z}function D(I){const z=I.target;z.removeEventListener("dispose",D);const A=H.indexOf(z.__bindingPointIndex);H.splice(A,1),J.deleteBuffer(W[z.id]),delete W[z.id],delete Y[z.id]}function q(){for(let I in W)J.deleteBuffer(W[I]);H=[],W={},Y={}}return{bind:G,update:K,dispose:q}};var X9=function(J,$,Z,Q,W,Y,H){const X=t7.distanceSqToPoint(J);if(XW.far)return;Y.push({distance:K,distanceToRay:Math.sqrt(X),point:G,index:$,face:null,object:H})}};var R7=function(J,$,Z){if(!J||!Z&&J.constructor===$)return J;if(typeof $.BYTES_PER_ELEMENT==="number")return new $(J);return Array.prototype.slice.call(J)},bW=function(J){return ArrayBuffer.isView(J)&&!(J instanceof DataView)};class Z6{addEventListener(J,$){if(this._listeners===void 0)this._listeners={};const Z=this._listeners;if(Z[J]===void 0)Z[J]=[];if(Z[J].indexOf($)===-1)Z[J].push($)}hasEventListener(J,$){if(this._listeners===void 0)return!1;const Z=this._listeners;return Z[J]!==void 0&&Z[J].indexOf($)!==-1}removeEventListener(J,$){if(this._listeners===void 0)return;const Q=this._listeners[J];if(Q!==void 0){const W=Q.indexOf($);if(W!==-1)Q.splice(W,1)}}dispatchEvent(J){if(this._listeners===void 0)return;const Z=this._listeners[J.type];if(Z!==void 0){J.target=this;const Q=Z.slice(0);for(let W=0,Y=Q.length;WJ,fromReference:(J)=>J},["srgb"]:{transfer:"srgb",primaries:"rec709",toReference:(J)=>J.convertSRGBToLinear(),fromReference:(J)=>J.convertLinearToSRGB()},["display-p3-linear"]:{transfer:"linear",primaries:"p3",toReference:(J)=>J.applyMatrix3(w8),fromReference:(J)=>J.applyMatrix3(I8)},["display-p3"]:{transfer:"srgb",primaries:"p3",toReference:(J)=>J.convertSRGBToLinear().applyMatrix3(w8),fromReference:(J)=>J.applyMatrix3(I8).convertLinearToSRGB()}},i9=new Set(["srgb-linear","display-p3-linear"]),h0={enabled:!0,_workingColorSpace:"srgb-linear",get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(J){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!J},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(J){if(!i9.has(J))throw new Error(`Unsupported working color space, "${J}".`);this._workingColorSpace=J},convert:function(J,$,Z){if(this.enabled===!1||$===Z||!$||!Z)return J;const Q=d6[$].toReference,W=d6[Z].fromReference;return W(Q(J))},fromWorkingColorSpace:function(J,$){return this.convert(J,this._workingColorSpace,$)},toWorkingColorSpace:function(J,$){return this.convert(J,$,this._workingColorSpace)},getPrimaries:function(J){return d6[J].primaries},getTransfer:function(J){if(J==="")return"linear";return d6[J].transfer}},W6;class e7{static getDataURL(J){if(/^data:/i.test(J.src))return J.src;if(typeof HTMLCanvasElement==="undefined")return J.src;let $;if(J instanceof HTMLCanvasElement)$=J;else{if(W6===void 0)W6=E7("canvas");W6.width=J.width,W6.height=J.height;const Z=W6.getContext("2d");if(J instanceof ImageData)Z.putImageData(J,0,0);else Z.drawImage(J,0,0,J.width,J.height);$=W6}if($.width>2048||$.height>2048)return console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",J),$.toDataURL("image/jpeg",0.6);else return $.toDataURL("image/png")}static sRGBToLinear(J){if(typeof HTMLImageElement!=="undefined"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&J instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&J instanceof ImageBitmap){const $=E7("canvas");$.width=J.width,$.height=J.height;const Z=$.getContext("2d");Z.drawImage(J,0,0,J.width,J.height);const Q=Z.getImageData(0,0,J.width,J.height),W=Q.data;for(let Y=0;Y0)Z.userData=this.userData;if(!$)J.textures[this.uuid]=Z;return Z}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(J){if(this.mapping!==300)return J;if(J.applyMatrix3(this.matrix),J.x<0||J.x>1)switch(this.wrapS){case 1000:J.x=J.x-Math.floor(J.x);break;case 1001:J.x=J.x<0?0:1;break;case 1002:if(Math.abs(Math.floor(J.x)%2)===1)J.x=Math.ceil(J.x)-J.x;else J.x=J.x-Math.floor(J.x);break}if(J.y<0||J.y>1)switch(this.wrapT){case 1000:J.y=J.y-Math.floor(J.y);break;case 1001:J.y=J.y<0?0:1;break;case 1002:if(Math.abs(Math.floor(J.y)%2)===1)J.y=Math.ceil(J.y)-J.y;else J.y=J.y-Math.floor(J.y);break}if(this.flipY)J.y=1-J.y;return J}set needsUpdate(J){if(J===!0)this.version++,this.source.needsUpdate=!0}get encoding(){return b6("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace==="srgb"?3001:3000}set encoding(J){b6("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=J===3001?"srgb":""}}MJ.DEFAULT_IMAGE=null;MJ.DEFAULT_MAPPING=300;MJ.DEFAULT_ANISOTROPY=1;class QJ{constructor(J=0,$=0,Z=0,Q=1){QJ.prototype.isVector4=!0,this.x=J,this.y=$,this.z=Z,this.w=Q}get width(){return this.z}set width(J){this.z=J}get height(){return this.w}set height(J){this.w=J}set(J,$,Z,Q){return this.x=J,this.y=$,this.z=Z,this.w=Q,this}setScalar(J){return this.x=J,this.y=J,this.z=J,this.w=J,this}setX(J){return this.x=J,this}setY(J){return this.y=J,this}setZ(J){return this.z=J,this}setW(J){return this.w=J,this}setComponent(J,$){switch(J){case 0:this.x=$;break;case 1:this.y=$;break;case 2:this.z=$;break;case 3:this.w=$;break;default:throw new Error("index is out of range: "+J)}return this}getComponent(J){switch(J){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+J)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(J){return this.x=J.x,this.y=J.y,this.z=J.z,this.w=J.w!==void 0?J.w:1,this}add(J){return this.x+=J.x,this.y+=J.y,this.z+=J.z,this.w+=J.w,this}addScalar(J){return this.x+=J,this.y+=J,this.z+=J,this.w+=J,this}addVectors(J,$){return this.x=J.x+$.x,this.y=J.y+$.y,this.z=J.z+$.z,this.w=J.w+$.w,this}addScaledVector(J,$){return this.x+=J.x*$,this.y+=J.y*$,this.z+=J.z*$,this.w+=J.w*$,this}sub(J){return this.x-=J.x,this.y-=J.y,this.z-=J.z,this.w-=J.w,this}subScalar(J){return this.x-=J,this.y-=J,this.z-=J,this.w-=J,this}subVectors(J,$){return this.x=J.x-$.x,this.y=J.y-$.y,this.z=J.z-$.z,this.w=J.w-$.w,this}multiply(J){return this.x*=J.x,this.y*=J.y,this.z*=J.z,this.w*=J.w,this}multiplyScalar(J){return this.x*=J,this.y*=J,this.z*=J,this.w*=J,this}applyMatrix4(J){const $=this.x,Z=this.y,Q=this.z,W=this.w,Y=J.elements;return this.x=Y[0]*$+Y[4]*Z+Y[8]*Q+Y[12]*W,this.y=Y[1]*$+Y[5]*Z+Y[9]*Q+Y[13]*W,this.z=Y[2]*$+Y[6]*Z+Y[10]*Q+Y[14]*W,this.w=Y[3]*$+Y[7]*Z+Y[11]*Q+Y[15]*W,this}divideScalar(J){return this.multiplyScalar(1/J)}setAxisAngleFromQuaternion(J){this.w=2*Math.acos(J.w);const $=Math.sqrt(1-J.w*J.w);if($<0.0001)this.x=1,this.y=0,this.z=0;else this.x=J.x/$,this.y=J.y/$,this.z=J.z/$;return this}setAxisAngleFromRotationMatrix(J){let $,Z,Q,W;const Y=0.01,H=0.1,X=J.elements,G=X[0],K=X[4],U=X[8],V=X[1],R=X[5],E=X[9],O=X[2],M=X[6],D=X[10];if(Math.abs(K-V)<0.01&&Math.abs(U-O)<0.01&&Math.abs(E-M)<0.01){if(Math.abs(K+V)<0.1&&Math.abs(U+O)<0.1&&Math.abs(E+M)<0.1&&Math.abs(G+R+D-3)<0.1)return this.set(1,0,0,0),this;$=Math.PI;const I=(G+1)/2,z=(R+1)/2,A=(D+1)/2,L=(K+V)/4,w=(U+O)/4,g=(E+M)/4;if(I>z&&I>A)if(I<0.01)Z=0,Q=0.707106781,W=0.707106781;else Z=Math.sqrt(I),Q=L/Z,W=w/Z;else if(z>A)if(z<0.01)Z=0.707106781,Q=0,W=0.707106781;else Q=Math.sqrt(z),Z=L/Q,W=g/Q;else if(A<0.01)Z=0.707106781,Q=0.707106781,W=0;else W=Math.sqrt(A),Z=w/W,Q=g/W;return this.set(Z,Q,W,$),this}let q=Math.sqrt((M-E)*(M-E)+(U-O)*(U-O)+(V-K)*(V-K));if(Math.abs(q)<0.001)q=1;return this.x=(M-E)/q,this.y=(U-O)/q,this.z=(V-K)/q,this.w=Math.acos((G+R+D-1)/2),this}min(J){return this.x=Math.min(this.x,J.x),this.y=Math.min(this.y,J.y),this.z=Math.min(this.z,J.z),this.w=Math.min(this.w,J.w),this}max(J){return this.x=Math.max(this.x,J.x),this.y=Math.max(this.y,J.y),this.z=Math.max(this.z,J.z),this.w=Math.max(this.w,J.w),this}clamp(J,$){return this.x=Math.max(J.x,Math.min($.x,this.x)),this.y=Math.max(J.y,Math.min($.y,this.y)),this.z=Math.max(J.z,Math.min($.z,this.z)),this.w=Math.max(J.w,Math.min($.w,this.w)),this}clampScalar(J,$){return this.x=Math.max(J,Math.min($,this.x)),this.y=Math.max(J,Math.min($,this.y)),this.z=Math.max(J,Math.min($,this.z)),this.w=Math.max(J,Math.min($,this.w)),this}clampLength(J,$){const Z=this.length();return this.divideScalar(Z||1).multiplyScalar(Math.max(J,Math.min($,Z)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(J){return this.x*J.x+this.y*J.y+this.z*J.z+this.w*J.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(J){return this.normalize().multiplyScalar(J)}lerp(J,$){return this.x+=(J.x-this.x)*$,this.y+=(J.y-this.y)*$,this.z+=(J.z-this.z)*$,this.w+=(J.w-this.w)*$,this}lerpVectors(J,$,Z){return this.x=J.x+($.x-J.x)*Z,this.y=J.y+($.y-J.y)*Z,this.z=J.z+($.z-J.z)*Z,this.w=J.w+($.w-J.w)*Z,this}equals(J){return J.x===this.x&&J.y===this.y&&J.z===this.z&&J.w===this.w}fromArray(J,$=0){return this.x=J[$],this.y=J[$+1],this.z=J[$+2],this.w=J[$+3],this}toArray(J=[],$=0){return J[$]=this.x,J[$+1]=this.y,J[$+2]=this.z,J[$+3]=this.w,J}fromBufferAttribute(J,$){return this.x=J.getX($),this.y=J.getY($),this.z=J.getZ($),this.w=J.getW($),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class K9 extends Z6{constructor(J=1,$=1,Z={}){super();this.isRenderTarget=!0,this.width=J,this.height=$,this.depth=1,this.scissor=new QJ(0,0,J,$),this.scissorTest=!1,this.viewport=new QJ(0,0,J,$);const Q={width:J,height:$,depth:1};if(Z.encoding!==void 0)b6("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),Z.colorSpace=Z.encoding===3001?"srgb":"";Z=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:1006,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},Z),this.texture=new MJ(Q,Z.mapping,Z.wrapS,Z.wrapT,Z.magFilter,Z.minFilter,Z.format,Z.type,Z.anisotropy,Z.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=Z.generateMipmaps,this.texture.internalFormat=Z.internalFormat,this.depthBuffer=Z.depthBuffer,this.stencilBuffer=Z.stencilBuffer,this.depthTexture=Z.depthTexture,this.samples=Z.samples}setSize(J,$,Z=1){if(this.width!==J||this.height!==$||this.depth!==Z)this.width=J,this.height=$,this.depth=Z,this.texture.image.width=J,this.texture.image.height=$,this.texture.image.depth=Z,this.dispose();this.viewport.set(0,0,J,$),this.scissor.set(0,0,J,$)}clone(){return new this.constructor().copy(this)}copy(J){this.width=J.width,this.height=J.height,this.depth=J.depth,this.scissor.copy(J.scissor),this.scissorTest=J.scissorTest,this.viewport.copy(J.viewport),this.texture=J.texture.clone(),this.texture.isRenderTargetTexture=!0;const $=Object.assign({},J.texture.image);if(this.texture.source=new J8($),this.depthBuffer=J.depthBuffer,this.stencilBuffer=J.stencilBuffer,J.depthTexture!==null)this.depthTexture=J.depthTexture.clone();return this.samples=J.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class nJ extends K9{constructor(J=1,$=1,Z={}){super(J,$,Z);this.isWebGLRenderTarget=!0}}class $8 extends MJ{constructor(J=null,$=1,Z=1,Q=1){super(null);this.isDataArrayTexture=!0,this.image={data:J,width:$,height:Z,depth:Q},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class G9 extends MJ{constructor(J=null,$=1,Z=1,Q=1){super(null);this.isData3DTexture=!0,this.image={data:J,width:$,height:Z,depth:Q},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Q6{constructor(J=0,$=0,Z=0,Q=1){this.isQuaternion=!0,this._x=J,this._y=$,this._z=Z,this._w=Q}static slerpFlat(J,$,Z,Q,W,Y,H){let X=Z[Q+0],G=Z[Q+1],K=Z[Q+2],U=Z[Q+3];const V=W[Y+0],R=W[Y+1],E=W[Y+2],O=W[Y+3];if(H===0){J[$+0]=X,J[$+1]=G,J[$+2]=K,J[$+3]=U;return}if(H===1){J[$+0]=V,J[$+1]=R,J[$+2]=E,J[$+3]=O;return}if(U!==O||X!==V||G!==R||K!==E){let M=1-H;const D=X*V+G*R+K*E+U*O,q=D>=0?1:-1,I=1-D*D;if(I>Number.EPSILON){const A=Math.sqrt(I),L=Math.atan2(A,D*q);M=Math.sin(M*L)/A,H=Math.sin(H*L)/A}const z=H*q;if(X=X*M+V*z,G=G*M+R*z,K=K*M+E*z,U=U*M+O*z,M===1-H){const A=1/Math.sqrt(X*X+G*G+K*K+U*U);X*=A,G*=A,K*=A,U*=A}}J[$]=X,J[$+1]=G,J[$+2]=K,J[$+3]=U}static multiplyQuaternionsFlat(J,$,Z,Q,W,Y){const H=Z[Q],X=Z[Q+1],G=Z[Q+2],K=Z[Q+3],U=W[Y],V=W[Y+1],R=W[Y+2],E=W[Y+3];return J[$]=H*E+K*U+X*R-G*V,J[$+1]=X*E+K*V+G*U-H*R,J[$+2]=G*E+K*R+H*V-X*U,J[$+3]=K*E-H*U-X*V-G*R,J}get x(){return this._x}set x(J){this._x=J,this._onChangeCallback()}get y(){return this._y}set y(J){this._y=J,this._onChangeCallback()}get z(){return this._z}set z(J){this._z=J,this._onChangeCallback()}get w(){return this._w}set w(J){this._w=J,this._onChangeCallback()}set(J,$,Z,Q){return this._x=J,this._y=$,this._z=Z,this._w=Q,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(J){return this._x=J.x,this._y=J.y,this._z=J.z,this._w=J.w,this._onChangeCallback(),this}setFromEuler(J,$){const{_x:Z,_y:Q,_z:W,_order:Y}=J,H=Math.cos,X=Math.sin,G=H(Z/2),K=H(Q/2),U=H(W/2),V=X(Z/2),R=X(Q/2),E=X(W/2);switch(Y){case"XYZ":this._x=V*K*U+G*R*E,this._y=G*R*U-V*K*E,this._z=G*K*E+V*R*U,this._w=G*K*U-V*R*E;break;case"YXZ":this._x=V*K*U+G*R*E,this._y=G*R*U-V*K*E,this._z=G*K*E-V*R*U,this._w=G*K*U+V*R*E;break;case"ZXY":this._x=V*K*U-G*R*E,this._y=G*R*U+V*K*E,this._z=G*K*E+V*R*U,this._w=G*K*U-V*R*E;break;case"ZYX":this._x=V*K*U-G*R*E,this._y=G*R*U+V*K*E,this._z=G*K*E-V*R*U,this._w=G*K*U+V*R*E;break;case"YZX":this._x=V*K*U+G*R*E,this._y=G*R*U+V*K*E,this._z=G*K*E-V*R*U,this._w=G*K*U-V*R*E;break;case"XZY":this._x=V*K*U-G*R*E,this._y=G*R*U-V*K*E,this._z=G*K*E+V*R*U,this._w=G*K*U+V*R*E;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+Y)}if($!==!1)this._onChangeCallback();return this}setFromAxisAngle(J,$){const Z=$/2,Q=Math.sin(Z);return this._x=J.x*Q,this._y=J.y*Q,this._z=J.z*Q,this._w=Math.cos(Z),this._onChangeCallback(),this}setFromRotationMatrix(J){const $=J.elements,Z=$[0],Q=$[4],W=$[8],Y=$[1],H=$[5],X=$[9],G=$[2],K=$[6],U=$[10],V=Z+H+U;if(V>0){const R=0.5/Math.sqrt(V+1);this._w=0.25/R,this._x=(K-X)*R,this._y=(W-G)*R,this._z=(Y-Q)*R}else if(Z>H&&Z>U){const R=2*Math.sqrt(1+Z-H-U);this._w=(K-X)/R,this._x=0.25*R,this._y=(Q+Y)/R,this._z=(W+G)/R}else if(H>U){const R=2*Math.sqrt(1+H-Z-U);this._w=(W-G)/R,this._x=(Q+Y)/R,this._y=0.25*R,this._z=(X+K)/R}else{const R=2*Math.sqrt(1+U-Z-H);this._w=(Y-Q)/R,this._x=(W+G)/R,this._y=(X+K)/R,this._z=0.25*R}return this._onChangeCallback(),this}setFromUnitVectors(J,$){let Z=J.dot($)+1;if(ZMath.abs(J.z))this._x=-J.y,this._y=J.x,this._z=0,this._w=Z;else this._x=0,this._y=-J.z,this._z=J.y,this._w=Z;else this._x=J.y*$.z-J.z*$.y,this._y=J.z*$.x-J.x*$.z,this._z=J.x*$.y-J.y*$.x,this._w=Z;return this.normalize()}angleTo(J){return 2*Math.acos(Math.abs(RJ(this.dot(J),-1,1)))}rotateTowards(J,$){const Z=this.angleTo(J);if(Z===0)return this;const Q=Math.min(1,$/Z);return this.slerp(J,Q),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(J){return this._x*J._x+this._y*J._y+this._z*J._z+this._w*J._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let J=this.length();if(J===0)this._x=0,this._y=0,this._z=0,this._w=1;else J=1/J,this._x=this._x*J,this._y=this._y*J,this._z=this._z*J,this._w=this._w*J;return this._onChangeCallback(),this}multiply(J){return this.multiplyQuaternions(this,J)}premultiply(J){return this.multiplyQuaternions(J,this)}multiplyQuaternions(J,$){const{_x:Z,_y:Q,_z:W,_w:Y}=J,H=$._x,X=$._y,G=$._z,K=$._w;return this._x=Z*K+Y*H+Q*G-W*X,this._y=Q*K+Y*X+W*H-Z*G,this._z=W*K+Y*G+Z*X-Q*H,this._w=Y*K-Z*H-Q*X-W*G,this._onChangeCallback(),this}slerp(J,$){if($===0)return this;if($===1)return this.copy(J);const Z=this._x,Q=this._y,W=this._z,Y=this._w;let H=Y*J._w+Z*J._x+Q*J._y+W*J._z;if(H<0)this._w=-J._w,this._x=-J._x,this._y=-J._y,this._z=-J._z,H=-H;else this.copy(J);if(H>=1)return this._w=Y,this._x=Z,this._y=Q,this._z=W,this;const X=1-H*H;if(X<=Number.EPSILON){const R=1-$;return this._w=R*Y+$*this._w,this._x=R*Z+$*this._x,this._y=R*Q+$*this._y,this._z=R*W+$*this._z,this.normalize(),this._onChangeCallback(),this}const G=Math.sqrt(X),K=Math.atan2(G,H),U=Math.sin((1-$)*K)/G,V=Math.sin($*K)/G;return this._w=Y*U+this._w*V,this._x=Z*U+this._x*V,this._y=Q*U+this._y*V,this._z=W*U+this._z*V,this._onChangeCallback(),this}slerpQuaternions(J,$,Z){return this.copy(J).slerp($,Z)}random(){const J=Math.random(),$=Math.sqrt(1-J),Z=Math.sqrt(J),Q=2*Math.PI*Math.random(),W=2*Math.PI*Math.random();return this.set($*Math.cos(Q),Z*Math.sin(W),Z*Math.cos(W),$*Math.sin(Q))}equals(J){return J._x===this._x&&J._y===this._y&&J._z===this._z&&J._w===this._w}fromArray(J,$=0){return this._x=J[$],this._y=J[$+1],this._z=J[$+2],this._w=J[$+3],this._onChangeCallback(),this}toArray(J=[],$=0){return J[$]=this._x,J[$+1]=this._y,J[$+2]=this._z,J[$+3]=this._w,J}fromBufferAttribute(J,$){return this._x=J.getX($),this._y=J.getY($),this._z=J.getZ($),this._w=J.getW($),this}toJSON(){return this.toArray()}_onChange(J){return this._onChangeCallback=J,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class v{constructor(J=0,$=0,Z=0){v.prototype.isVector3=!0,this.x=J,this.y=$,this.z=Z}set(J,$,Z){if(Z===void 0)Z=this.z;return this.x=J,this.y=$,this.z=Z,this}setScalar(J){return this.x=J,this.y=J,this.z=J,this}setX(J){return this.x=J,this}setY(J){return this.y=J,this}setZ(J){return this.z=J,this}setComponent(J,$){switch(J){case 0:this.x=$;break;case 1:this.y=$;break;case 2:this.z=$;break;default:throw new Error("index is out of range: "+J)}return this}getComponent(J){switch(J){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+J)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(J){return this.x=J.x,this.y=J.y,this.z=J.z,this}add(J){return this.x+=J.x,this.y+=J.y,this.z+=J.z,this}addScalar(J){return this.x+=J,this.y+=J,this.z+=J,this}addVectors(J,$){return this.x=J.x+$.x,this.y=J.y+$.y,this.z=J.z+$.z,this}addScaledVector(J,$){return this.x+=J.x*$,this.y+=J.y*$,this.z+=J.z*$,this}sub(J){return this.x-=J.x,this.y-=J.y,this.z-=J.z,this}subScalar(J){return this.x-=J,this.y-=J,this.z-=J,this}subVectors(J,$){return this.x=J.x-$.x,this.y=J.y-$.y,this.z=J.z-$.z,this}multiply(J){return this.x*=J.x,this.y*=J.y,this.z*=J.z,this}multiplyScalar(J){return this.x*=J,this.y*=J,this.z*=J,this}multiplyVectors(J,$){return this.x=J.x*$.x,this.y=J.y*$.y,this.z=J.z*$.z,this}applyEuler(J){return this.applyQuaternion(k8.setFromEuler(J))}applyAxisAngle(J,$){return this.applyQuaternion(k8.setFromAxisAngle(J,$))}applyMatrix3(J){const $=this.x,Z=this.y,Q=this.z,W=J.elements;return this.x=W[0]*$+W[3]*Z+W[6]*Q,this.y=W[1]*$+W[4]*Z+W[7]*Q,this.z=W[2]*$+W[5]*Z+W[8]*Q,this}applyNormalMatrix(J){return this.applyMatrix3(J).normalize()}applyMatrix4(J){const $=this.x,Z=this.y,Q=this.z,W=J.elements,Y=1/(W[3]*$+W[7]*Z+W[11]*Q+W[15]);return this.x=(W[0]*$+W[4]*Z+W[8]*Q+W[12])*Y,this.y=(W[1]*$+W[5]*Z+W[9]*Q+W[13])*Y,this.z=(W[2]*$+W[6]*Z+W[10]*Q+W[14])*Y,this}applyQuaternion(J){const $=this.x,Z=this.y,Q=this.z,W=J.x,Y=J.y,H=J.z,X=J.w,G=X*$+Y*Q-H*Z,K=X*Z+H*$-W*Q,U=X*Q+W*Z-Y*$,V=-W*$-Y*Z-H*Q;return this.x=G*X+V*-W+K*-H-U*-Y,this.y=K*X+V*-Y+U*-W-G*-H,this.z=U*X+V*-H+G*-Y-K*-W,this}project(J){return this.applyMatrix4(J.matrixWorldInverse).applyMatrix4(J.projectionMatrix)}unproject(J){return this.applyMatrix4(J.projectionMatrixInverse).applyMatrix4(J.matrixWorld)}transformDirection(J){const $=this.x,Z=this.y,Q=this.z,W=J.elements;return this.x=W[0]*$+W[4]*Z+W[8]*Q,this.y=W[1]*$+W[5]*Z+W[9]*Q,this.z=W[2]*$+W[6]*Z+W[10]*Q,this.normalize()}divide(J){return this.x/=J.x,this.y/=J.y,this.z/=J.z,this}divideScalar(J){return this.multiplyScalar(1/J)}min(J){return this.x=Math.min(this.x,J.x),this.y=Math.min(this.y,J.y),this.z=Math.min(this.z,J.z),this}max(J){return this.x=Math.max(this.x,J.x),this.y=Math.max(this.y,J.y),this.z=Math.max(this.z,J.z),this}clamp(J,$){return this.x=Math.max(J.x,Math.min($.x,this.x)),this.y=Math.max(J.y,Math.min($.y,this.y)),this.z=Math.max(J.z,Math.min($.z,this.z)),this}clampScalar(J,$){return this.x=Math.max(J,Math.min($,this.x)),this.y=Math.max(J,Math.min($,this.y)),this.z=Math.max(J,Math.min($,this.z)),this}clampLength(J,$){const Z=this.length();return this.divideScalar(Z||1).multiplyScalar(Math.max(J,Math.min($,Z)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(J){return this.x*J.x+this.y*J.y+this.z*J.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(J){return this.normalize().multiplyScalar(J)}lerp(J,$){return this.x+=(J.x-this.x)*$,this.y+=(J.y-this.y)*$,this.z+=(J.z-this.z)*$,this}lerpVectors(J,$,Z){return this.x=J.x+($.x-J.x)*Z,this.y=J.y+($.y-J.y)*Z,this.z=J.z+($.z-J.z)*Z,this}cross(J){return this.crossVectors(this,J)}crossVectors(J,$){const{x:Z,y:Q,z:W}=J,Y=$.x,H=$.y,X=$.z;return this.x=Q*X-W*H,this.y=W*Y-Z*X,this.z=Z*H-Q*Y,this}projectOnVector(J){const $=J.lengthSq();if($===0)return this.set(0,0,0);const Z=J.dot(this)/$;return this.copy(J).multiplyScalar(Z)}projectOnPlane(J){return S7.copy(this).projectOnVector(J),this.sub(S7)}reflect(J){return this.sub(S7.copy(J).multiplyScalar(2*this.dot(J)))}angleTo(J){const $=Math.sqrt(this.lengthSq()*J.lengthSq());if($===0)return Math.PI/2;const Z=this.dot(J)/$;return Math.acos(RJ(Z,-1,1))}distanceTo(J){return Math.sqrt(this.distanceToSquared(J))}distanceToSquared(J){const $=this.x-J.x,Z=this.y-J.y,Q=this.z-J.z;return $*$+Z*Z+Q*Q}manhattanDistanceTo(J){return Math.abs(this.x-J.x)+Math.abs(this.y-J.y)+Math.abs(this.z-J.z)}setFromSpherical(J){return this.setFromSphericalCoords(J.radius,J.phi,J.theta)}setFromSphericalCoords(J,$,Z){const Q=Math.sin($)*J;return this.x=Q*Math.sin(Z),this.y=Math.cos($)*J,this.z=Q*Math.cos(Z),this}setFromCylindrical(J){return this.setFromCylindricalCoords(J.radius,J.theta,J.y)}setFromCylindricalCoords(J,$,Z){return this.x=J*Math.sin($),this.y=Z,this.z=J*Math.cos($),this}setFromMatrixPosition(J){const $=J.elements;return this.x=$[12],this.y=$[13],this.z=$[14],this}setFromMatrixScale(J){const $=this.setFromMatrixColumn(J,0).length(),Z=this.setFromMatrixColumn(J,1).length(),Q=this.setFromMatrixColumn(J,2).length();return this.x=$,this.y=Z,this.z=Q,this}setFromMatrixColumn(J,$){return this.fromArray(J.elements,$*4)}setFromMatrix3Column(J,$){return this.fromArray(J.elements,$*3)}setFromEuler(J){return this.x=J._x,this.y=J._y,this.z=J._z,this}setFromColor(J){return this.x=J.r,this.y=J.g,this.z=J.b,this}equals(J){return J.x===this.x&&J.y===this.y&&J.z===this.z}fromArray(J,$=0){return this.x=J[$],this.y=J[$+1],this.z=J[$+2],this}toArray(J=[],$=0){return J[$]=this.x,J[$+1]=this.y,J[$+2]=this.z,J}fromBufferAttribute(J,$){return this.x=J.getX($),this.y=J.getY($),this.z=J.getZ($),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const J=(Math.random()-0.5)*2,$=Math.random()*Math.PI*2,Z=Math.sqrt(1-J**2);return this.x=Z*Math.cos($),this.y=Z*Math.sin($),this.z=J,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}var S7=new v,k8=new Q6;class I6{constructor(J=new v(Infinity,Infinity,Infinity),$=new v((-Infinity),(-Infinity),(-Infinity))){this.isBox3=!0,this.min=J,this.max=$}set(J,$){return this.min.copy(J),this.max.copy($),this}setFromArray(J){this.makeEmpty();for(let $=0,Z=J.length;$this.max.x||J.ythis.max.y||J.zthis.max.z?!1:!0}containsBox(J){return this.min.x<=J.min.x&&J.max.x<=this.max.x&&this.min.y<=J.min.y&&J.max.y<=this.max.y&&this.min.z<=J.min.z&&J.max.z<=this.max.z}getParameter(J,$){return $.set((J.x-this.min.x)/(this.max.x-this.min.x),(J.y-this.min.y)/(this.max.y-this.min.y),(J.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(J){return J.max.xthis.max.x||J.max.ythis.max.y||J.max.zthis.max.z?!1:!0}intersectsSphere(J){return this.clampPoint(J.center,fJ),fJ.distanceToSquared(J.center)<=J.radius*J.radius}intersectsPlane(J){let $,Z;if(J.normal.x>0)$=J.normal.x*this.min.x,Z=J.normal.x*this.max.x;else $=J.normal.x*this.max.x,Z=J.normal.x*this.min.x;if(J.normal.y>0)$+=J.normal.y*this.min.y,Z+=J.normal.y*this.max.y;else $+=J.normal.y*this.max.y,Z+=J.normal.y*this.min.y;if(J.normal.z>0)$+=J.normal.z*this.min.z,Z+=J.normal.z*this.max.z;else $+=J.normal.z*this.max.z,Z+=J.normal.z*this.min.z;return $<=-J.constant&&Z>=-J.constant}intersectsTriangle(J){if(this.isEmpty())return!1;this.getCenter(T6),c6.subVectors(this.max,T6),X6.subVectors(J.a,T6),H6.subVectors(J.b,T6),K6.subVectors(J.c,T6),gJ.subVectors(H6,X6),pJ.subVectors(K6,H6),rJ.subVectors(X6,K6);let $=[0,-gJ.z,gJ.y,0,-pJ.z,pJ.y,0,-rJ.z,rJ.y,gJ.z,0,-gJ.x,pJ.z,0,-pJ.x,rJ.z,0,-rJ.x,-gJ.y,gJ.x,0,-pJ.y,pJ.x,0,-rJ.y,rJ.x,0];if(!y7($,X6,H6,K6,c6))return!1;if($=[1,0,0,0,1,0,0,0,1],!y7($,X6,H6,K6,c6))return!1;return n6.crossVectors(gJ,pJ),$=[n6.x,n6.y,n6.z],y7($,X6,H6,K6,c6)}clampPoint(J,$){return $.copy(J).clamp(this.min,this.max)}distanceToPoint(J){return this.clampPoint(J,fJ).distanceTo(J)}getBoundingSphere(J){if(this.isEmpty())J.makeEmpty();else this.getCenter(J.center),J.radius=this.getSize(fJ).length()*0.5;return J}intersect(J){if(this.min.max(J.min),this.max.min(J.max),this.isEmpty())this.makeEmpty();return this}union(J){return this.min.min(J.min),this.max.max(J.max),this}applyMatrix4(J){if(this.isEmpty())return this;return yJ[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(J),yJ[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(J),yJ[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(J),yJ[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(J),yJ[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(J),yJ[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(J),yJ[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(J),yJ[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(J),this.setFromPoints(yJ),this}translate(J){return this.min.add(J),this.max.add(J),this}equals(J){return J.min.equals(this.min)&&J.max.equals(this.max)}}var yJ=[new v,new v,new v,new v,new v,new v,new v,new v],fJ=new v,Y6=new I6,X6=new v,H6=new v,K6=new v,gJ=new v,pJ=new v,rJ=new v,T6=new v,c6=new v,n6=new v,aJ=new v,t9=new I6,S6=new v,f7=new v;class g6{constructor(J=new v,$=-1){this.center=J,this.radius=$}set(J,$){return this.center.copy(J),this.radius=$,this}setFromPoints(J,$){const Z=this.center;if($!==void 0)Z.copy($);else t9.setFromPoints(J).getCenter(Z);let Q=0;for(let W=0,Y=J.length;Wthis.radius*this.radius)$.sub(this.center).normalize(),$.multiplyScalar(this.radius).add(this.center);return $}getBoundingBox(J){if(this.isEmpty())return J.makeEmpty(),J;return J.set(this.center,this.center),J.expandByScalar(this.radius),J}applyMatrix4(J){return this.center.applyMatrix4(J),this.radius=this.radius*J.getMaxScaleOnAxis(),this}translate(J){return this.center.add(J),this}expandByPoint(J){if(this.isEmpty())return this.center.copy(J),this.radius=0,this;S6.subVectors(J,this.center);const $=S6.lengthSq();if($>this.radius*this.radius){const Z=Math.sqrt($),Q=(Z-this.radius)*0.5;this.center.addScaledVector(S6,Q/Z),this.radius+=Q}return this}union(J){if(J.isEmpty())return this;if(this.isEmpty())return this.copy(J),this;if(this.center.equals(J.center)===!0)this.radius=Math.max(this.radius,J.radius);else f7.subVectors(J.center,this.center).setLength(J.radius),this.expandByPoint(S6.copy(J.center).add(f7)),this.expandByPoint(S6.copy(J.center).sub(f7));return this}equals(J){return J.center.equals(this.center)&&J.radius===this.radius}clone(){return new this.constructor().copy(this)}}var vJ=new v,v7=new v,s6=new v,mJ=new v,j7=new v,o6=new v,b7=new v;class Z8{constructor(J=new v,$=new v(0,0,-1)){this.origin=J,this.direction=$}set(J,$){return this.origin.copy(J),this.direction.copy($),this}copy(J){return this.origin.copy(J.origin),this.direction.copy(J.direction),this}at(J,$){return $.copy(this.origin).addScaledVector(this.direction,J)}lookAt(J){return this.direction.copy(J).sub(this.origin).normalize(),this}recast(J){return this.origin.copy(this.at(J,vJ)),this}closestPointToPoint(J,$){$.subVectors(J,this.origin);const Z=$.dot(this.direction);if(Z<0)return $.copy(this.origin);return $.copy(this.origin).addScaledVector(this.direction,Z)}distanceToPoint(J){return Math.sqrt(this.distanceSqToPoint(J))}distanceSqToPoint(J){const $=vJ.subVectors(J,this.origin).dot(this.direction);if($<0)return this.origin.distanceToSquared(J);return vJ.copy(this.origin).addScaledVector(this.direction,$),vJ.distanceToSquared(J)}distanceSqToSegment(J,$,Z,Q){v7.copy(J).add($).multiplyScalar(0.5),s6.copy($).sub(J).normalize(),mJ.copy(this.origin).sub(v7);const W=J.distanceTo($)*0.5,Y=-this.direction.dot(s6),H=mJ.dot(this.direction),X=-mJ.dot(s6),G=mJ.lengthSq(),K=Math.abs(1-Y*Y);let U,V,R,E;if(K>0)if(U=Y*X-H,V=Y*H-X,E=W*K,U>=0)if(V>=-E)if(V<=E){const O=1/K;U*=O,V*=O,R=U*(U+Y*V+2*H)+V*(Y*U+V+2*X)+G}else V=W,U=Math.max(0,-(Y*V+H)),R=-U*U+V*(V+2*X)+G;else V=-W,U=Math.max(0,-(Y*V+H)),R=-U*U+V*(V+2*X)+G;else if(V<=-E)U=Math.max(0,-(-Y*W+H)),V=U>0?-W:Math.min(Math.max(-W,-X),W),R=-U*U+V*(V+2*X)+G;else if(V<=E)U=0,V=Math.min(Math.max(-W,-X),W),R=V*(V+2*X)+G;else U=Math.max(0,-(Y*W+H)),V=U>0?W:Math.min(Math.max(-W,-X),W),R=-U*U+V*(V+2*X)+G;else V=Y>0?-W:W,U=Math.max(0,-(Y*V+H)),R=-U*U+V*(V+2*X)+G;if(Z)Z.copy(this.origin).addScaledVector(this.direction,U);if(Q)Q.copy(v7).addScaledVector(s6,V);return R}intersectSphere(J,$){vJ.subVectors(J.center,this.origin);const Z=vJ.dot(this.direction),Q=vJ.dot(vJ)-Z*Z,W=J.radius*J.radius;if(Q>W)return null;const Y=Math.sqrt(W-Q),H=Z-Y,X=Z+Y;if(X<0)return null;if(H<0)return this.at(X,$);return this.at(H,$)}intersectsSphere(J){return this.distanceSqToPoint(J.center)<=J.radius*J.radius}distanceToPlane(J){const $=J.normal.dot(this.direction);if($===0){if(J.distanceToPoint(this.origin)===0)return 0;return null}const Z=-(this.origin.dot(J.normal)+J.constant)/$;return Z>=0?Z:null}intersectPlane(J,$){const Z=this.distanceToPlane(J);if(Z===null)return null;return this.at(Z,$)}intersectsPlane(J){const $=J.distanceToPoint(this.origin);if($===0)return!0;if(J.normal.dot(this.direction)*$<0)return!0;return!1}intersectBox(J,$){let Z,Q,W,Y,H,X;const G=1/this.direction.x,K=1/this.direction.y,U=1/this.direction.z,V=this.origin;if(G>=0)Z=(J.min.x-V.x)*G,Q=(J.max.x-V.x)*G;else Z=(J.max.x-V.x)*G,Q=(J.min.x-V.x)*G;if(K>=0)W=(J.min.y-V.y)*K,Y=(J.max.y-V.y)*K;else W=(J.max.y-V.y)*K,Y=(J.min.y-V.y)*K;if(Z>Y||W>Q)return null;if(W>Z||isNaN(Z))Z=W;if(Y=0)H=(J.min.z-V.z)*U,X=(J.max.z-V.z)*U;else H=(J.max.z-V.z)*U,X=(J.min.z-V.z)*U;if(Z>X||H>Q)return null;if(H>Z||Z!==Z)Z=H;if(X=0?Z:Q,$)}intersectsBox(J){return this.intersectBox(J,vJ)!==null}intersectTriangle(J,$,Z,Q,W){j7.subVectors($,J),o6.subVectors(Z,J),b7.crossVectors(j7,o6);let Y=this.direction.dot(b7),H;if(Y>0){if(Q)return null;H=1}else if(Y<0)H=-1,Y=-Y;else return null;mJ.subVectors(this.origin,J);const X=H*this.direction.dot(o6.crossVectors(mJ,o6));if(X<0)return null;const G=H*this.direction.dot(j7.cross(mJ));if(G<0)return null;if(X+G>Y)return null;const K=-H*mJ.dot(b7);if(K<0)return null;return this.at(K/Y,W)}applyMatrix4(J){return this.origin.applyMatrix4(J),this.direction.transformDirection(J),this}equals(J){return J.origin.equals(this.origin)&&J.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ZJ{constructor(J,$,Z,Q,W,Y,H,X,G,K,U,V,R,E,O,M){if(ZJ.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],J!==void 0)this.set(J,$,Z,Q,W,Y,H,X,G,K,U,V,R,E,O,M)}set(J,$,Z,Q,W,Y,H,X,G,K,U,V,R,E,O,M){const D=this.elements;return D[0]=J,D[4]=$,D[8]=Z,D[12]=Q,D[1]=W,D[5]=Y,D[9]=H,D[13]=X,D[2]=G,D[6]=K,D[10]=U,D[14]=V,D[3]=R,D[7]=E,D[11]=O,D[15]=M,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new ZJ().fromArray(this.elements)}copy(J){const $=this.elements,Z=J.elements;return $[0]=Z[0],$[1]=Z[1],$[2]=Z[2],$[3]=Z[3],$[4]=Z[4],$[5]=Z[5],$[6]=Z[6],$[7]=Z[7],$[8]=Z[8],$[9]=Z[9],$[10]=Z[10],$[11]=Z[11],$[12]=Z[12],$[13]=Z[13],$[14]=Z[14],$[15]=Z[15],this}copyPosition(J){const $=this.elements,Z=J.elements;return $[12]=Z[12],$[13]=Z[13],$[14]=Z[14],this}setFromMatrix3(J){const $=J.elements;return this.set($[0],$[3],$[6],0,$[1],$[4],$[7],0,$[2],$[5],$[8],0,0,0,0,1),this}extractBasis(J,$,Z){return J.setFromMatrixColumn(this,0),$.setFromMatrixColumn(this,1),Z.setFromMatrixColumn(this,2),this}makeBasis(J,$,Z){return this.set(J.x,$.x,Z.x,0,J.y,$.y,Z.y,0,J.z,$.z,Z.z,0,0,0,0,1),this}extractRotation(J){const $=this.elements,Z=J.elements,Q=1/G6.setFromMatrixColumn(J,0).length(),W=1/G6.setFromMatrixColumn(J,1).length(),Y=1/G6.setFromMatrixColumn(J,2).length();return $[0]=Z[0]*Q,$[1]=Z[1]*Q,$[2]=Z[2]*Q,$[3]=0,$[4]=Z[4]*W,$[5]=Z[5]*W,$[6]=Z[6]*W,$[7]=0,$[8]=Z[8]*Y,$[9]=Z[9]*Y,$[10]=Z[10]*Y,$[11]=0,$[12]=0,$[13]=0,$[14]=0,$[15]=1,this}makeRotationFromEuler(J){const $=this.elements,Z=J.x,Q=J.y,W=J.z,Y=Math.cos(Z),H=Math.sin(Z),X=Math.cos(Q),G=Math.sin(Q),K=Math.cos(W),U=Math.sin(W);if(J.order==="XYZ"){const V=Y*K,R=Y*U,E=H*K,O=H*U;$[0]=X*K,$[4]=-X*U,$[8]=G,$[1]=R+E*G,$[5]=V-O*G,$[9]=-H*X,$[2]=O-V*G,$[6]=E+R*G,$[10]=Y*X}else if(J.order==="YXZ"){const V=X*K,R=X*U,E=G*K,O=G*U;$[0]=V+O*H,$[4]=E*H-R,$[8]=Y*G,$[1]=Y*U,$[5]=Y*K,$[9]=-H,$[2]=R*H-E,$[6]=O+V*H,$[10]=Y*X}else if(J.order==="ZXY"){const V=X*K,R=X*U,E=G*K,O=G*U;$[0]=V-O*H,$[4]=-Y*U,$[8]=E+R*H,$[1]=R+E*H,$[5]=Y*K,$[9]=O-V*H,$[2]=-Y*G,$[6]=H,$[10]=Y*X}else if(J.order==="ZYX"){const V=Y*K,R=Y*U,E=H*K,O=H*U;$[0]=X*K,$[4]=E*G-R,$[8]=V*G+O,$[1]=X*U,$[5]=O*G+V,$[9]=R*G-E,$[2]=-G,$[6]=H*X,$[10]=Y*X}else if(J.order==="YZX"){const V=Y*X,R=Y*G,E=H*X,O=H*G;$[0]=X*K,$[4]=O-V*U,$[8]=E*U+R,$[1]=U,$[5]=Y*K,$[9]=-H*K,$[2]=-G*K,$[6]=R*U+E,$[10]=V-O*U}else if(J.order==="XZY"){const V=Y*X,R=Y*G,E=H*X,O=H*G;$[0]=X*K,$[4]=-U,$[8]=G*K,$[1]=V*U+O,$[5]=Y*K,$[9]=R*U-E,$[2]=E*U-R,$[6]=H*K,$[10]=O*U+V}return $[3]=0,$[7]=0,$[11]=0,$[12]=0,$[13]=0,$[14]=0,$[15]=1,this}makeRotationFromQuaternion(J){return this.compose(e9,J,J$)}lookAt(J,$,Z){const Q=this.elements;if(NJ.subVectors(J,$),NJ.lengthSq()===0)NJ.z=1;if(NJ.normalize(),lJ.crossVectors(Z,NJ),lJ.lengthSq()===0){if(Math.abs(Z.z)===1)NJ.x+=0.0001;else NJ.z+=0.0001;NJ.normalize(),lJ.crossVectors(Z,NJ)}return lJ.normalize(),i6.crossVectors(NJ,lJ),Q[0]=lJ.x,Q[4]=i6.x,Q[8]=NJ.x,Q[1]=lJ.y,Q[5]=i6.y,Q[9]=NJ.y,Q[2]=lJ.z,Q[6]=i6.z,Q[10]=NJ.z,this}multiply(J){return this.multiplyMatrices(this,J)}premultiply(J){return this.multiplyMatrices(J,this)}multiplyMatrices(J,$){const Z=J.elements,Q=$.elements,W=this.elements,Y=Z[0],H=Z[4],X=Z[8],G=Z[12],K=Z[1],U=Z[5],V=Z[9],R=Z[13],E=Z[2],O=Z[6],M=Z[10],D=Z[14],q=Z[3],I=Z[7],z=Z[11],A=Z[15],L=Q[0],w=Q[4],g=Q[8],u=Q[12],N=Q[1],C=Q[5],m=Q[9],e=Q[13],W0=Q[2],P=Q[6],l=Q[10],n=Q[14],d=Q[3],r=Q[7],p=Q[11],T=Q[15];return W[0]=Y*L+H*N+X*W0+G*d,W[4]=Y*w+H*C+X*P+G*r,W[8]=Y*g+H*m+X*l+G*p,W[12]=Y*u+H*e+X*n+G*T,W[1]=K*L+U*N+V*W0+R*d,W[5]=K*w+U*C+V*P+R*r,W[9]=K*g+U*m+V*l+R*p,W[13]=K*u+U*e+V*n+R*T,W[2]=E*L+O*N+M*W0+D*d,W[6]=E*w+O*C+M*P+D*r,W[10]=E*g+O*m+M*l+D*p,W[14]=E*u+O*e+M*n+D*T,W[3]=q*L+I*N+z*W0+A*d,W[7]=q*w+I*C+z*P+A*r,W[11]=q*g+I*m+z*l+A*p,W[15]=q*u+I*e+z*n+A*T,this}multiplyScalar(J){const $=this.elements;return $[0]*=J,$[4]*=J,$[8]*=J,$[12]*=J,$[1]*=J,$[5]*=J,$[9]*=J,$[13]*=J,$[2]*=J,$[6]*=J,$[10]*=J,$[14]*=J,$[3]*=J,$[7]*=J,$[11]*=J,$[15]*=J,this}determinant(){const J=this.elements,$=J[0],Z=J[4],Q=J[8],W=J[12],Y=J[1],H=J[5],X=J[9],G=J[13],K=J[2],U=J[6],V=J[10],R=J[14],E=J[3],O=J[7],M=J[11],D=J[15];return E*(+W*X*U-Q*G*U-W*H*V+Z*G*V+Q*H*R-Z*X*R)+O*(+$*X*R-$*G*V+W*Y*V-Q*Y*R+Q*G*K-W*X*K)+M*(+$*G*U-$*H*R-W*Y*U+Z*Y*R+W*H*K-Z*G*K)+D*(-Q*H*K-$*X*U+$*H*V+Q*Y*U-Z*Y*V+Z*X*K)}transpose(){const J=this.elements;let $;return $=J[1],J[1]=J[4],J[4]=$,$=J[2],J[2]=J[8],J[8]=$,$=J[6],J[6]=J[9],J[9]=$,$=J[3],J[3]=J[12],J[12]=$,$=J[7],J[7]=J[13],J[13]=$,$=J[11],J[11]=J[14],J[14]=$,this}setPosition(J,$,Z){const Q=this.elements;if(J.isVector3)Q[12]=J.x,Q[13]=J.y,Q[14]=J.z;else Q[12]=J,Q[13]=$,Q[14]=Z;return this}invert(){const J=this.elements,$=J[0],Z=J[1],Q=J[2],W=J[3],Y=J[4],H=J[5],X=J[6],G=J[7],K=J[8],U=J[9],V=J[10],R=J[11],E=J[12],O=J[13],M=J[14],D=J[15],q=U*M*G-O*V*G+O*X*R-H*M*R-U*X*D+H*V*D,I=E*V*G-K*M*G-E*X*R+Y*M*R+K*X*D-Y*V*D,z=K*O*G-E*U*G+E*H*R-Y*O*R-K*H*D+Y*U*D,A=E*U*X-K*O*X-E*H*V+Y*O*V+K*H*M-Y*U*M,L=$*q+Z*I+Q*z+W*A;if(L===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/L;return J[0]=q*w,J[1]=(O*V*W-U*M*W-O*Q*R+Z*M*R+U*Q*D-Z*V*D)*w,J[2]=(H*M*W-O*X*W+O*Q*G-Z*M*G-H*Q*D+Z*X*D)*w,J[3]=(U*X*W-H*V*W-U*Q*G+Z*V*G+H*Q*R-Z*X*R)*w,J[4]=I*w,J[5]=(K*M*W-E*V*W+E*Q*R-$*M*R-K*Q*D+$*V*D)*w,J[6]=(E*X*W-Y*M*W-E*Q*G+$*M*G+Y*Q*D-$*X*D)*w,J[7]=(Y*V*W-K*X*W+K*Q*G-$*V*G-Y*Q*R+$*X*R)*w,J[8]=z*w,J[9]=(E*U*W-K*O*W-E*Z*R+$*O*R+K*Z*D-$*U*D)*w,J[10]=(Y*O*W-E*H*W+E*Z*G-$*O*G-Y*Z*D+$*H*D)*w,J[11]=(K*H*W-Y*U*W-K*Z*G+$*U*G+Y*Z*R-$*H*R)*w,J[12]=A*w,J[13]=(K*O*Q-E*U*Q+E*Z*V-$*O*V-K*Z*M+$*U*M)*w,J[14]=(E*H*Q-Y*O*Q-E*Z*X+$*O*X+Y*Z*M-$*H*M)*w,J[15]=(Y*U*Q-K*H*Q+K*Z*X-$*U*X-Y*Z*V+$*H*V)*w,this}scale(J){const $=this.elements,Z=J.x,Q=J.y,W=J.z;return $[0]*=Z,$[4]*=Q,$[8]*=W,$[1]*=Z,$[5]*=Q,$[9]*=W,$[2]*=Z,$[6]*=Q,$[10]*=W,$[3]*=Z,$[7]*=Q,$[11]*=W,this}getMaxScaleOnAxis(){const J=this.elements,$=J[0]*J[0]+J[1]*J[1]+J[2]*J[2],Z=J[4]*J[4]+J[5]*J[5]+J[6]*J[6],Q=J[8]*J[8]+J[9]*J[9]+J[10]*J[10];return Math.sqrt(Math.max($,Z,Q))}makeTranslation(J,$,Z){if(J.isVector3)this.set(1,0,0,J.x,0,1,0,J.y,0,0,1,J.z,0,0,0,1);else this.set(1,0,0,J,0,1,0,$,0,0,1,Z,0,0,0,1);return this}makeRotationX(J){const $=Math.cos(J),Z=Math.sin(J);return this.set(1,0,0,0,0,$,-Z,0,0,Z,$,0,0,0,0,1),this}makeRotationY(J){const $=Math.cos(J),Z=Math.sin(J);return this.set($,0,Z,0,0,1,0,0,-Z,0,$,0,0,0,0,1),this}makeRotationZ(J){const $=Math.cos(J),Z=Math.sin(J);return this.set($,-Z,0,0,Z,$,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(J,$){const Z=Math.cos($),Q=Math.sin($),W=1-Z,Y=J.x,H=J.y,X=J.z,G=W*Y,K=W*H;return this.set(G*Y+Z,G*H-Q*X,G*X+Q*H,0,G*H+Q*X,K*H+Z,K*X-Q*Y,0,G*X-Q*H,K*X+Q*Y,W*X*X+Z,0,0,0,0,1),this}makeScale(J,$,Z){return this.set(J,0,0,0,0,$,0,0,0,0,Z,0,0,0,0,1),this}makeShear(J,$,Z,Q,W,Y){return this.set(1,Z,W,0,J,1,Y,0,$,Q,1,0,0,0,0,1),this}compose(J,$,Z){const Q=this.elements,W=$._x,Y=$._y,H=$._z,X=$._w,G=W+W,K=Y+Y,U=H+H,V=W*G,R=W*K,E=W*U,O=Y*K,M=Y*U,D=H*U,q=X*G,I=X*K,z=X*U,A=Z.x,L=Z.y,w=Z.z;return Q[0]=(1-(O+D))*A,Q[1]=(R+z)*A,Q[2]=(E-I)*A,Q[3]=0,Q[4]=(R-z)*L,Q[5]=(1-(V+D))*L,Q[6]=(M+q)*L,Q[7]=0,Q[8]=(E+I)*w,Q[9]=(M-q)*w,Q[10]=(1-(V+O))*w,Q[11]=0,Q[12]=J.x,Q[13]=J.y,Q[14]=J.z,Q[15]=1,this}decompose(J,$,Z){const Q=this.elements;let W=G6.set(Q[0],Q[1],Q[2]).length();const Y=G6.set(Q[4],Q[5],Q[6]).length(),H=G6.set(Q[8],Q[9],Q[10]).length();if(this.determinant()<0)W=-W;J.x=Q[12],J.y=Q[13],J.z=Q[14],IJ.copy(this);const G=1/W,K=1/Y,U=1/H;return IJ.elements[0]*=G,IJ.elements[1]*=G,IJ.elements[2]*=G,IJ.elements[4]*=K,IJ.elements[5]*=K,IJ.elements[6]*=K,IJ.elements[8]*=U,IJ.elements[9]*=U,IJ.elements[10]*=U,$.setFromRotationMatrix(IJ),Z.x=W,Z.y=Y,Z.z=H,this}makePerspective(J,$,Z,Q,W,Y,H=2000){const X=this.elements,G=2*W/($-J),K=2*W/(Z-Q),U=($+J)/($-J),V=(Z+Q)/(Z-Q);let R,E;if(H===2000)R=-(Y+W)/(Y-W),E=-2*Y*W/(Y-W);else if(H===2001)R=-Y/(Y-W),E=-Y*W/(Y-W);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+H);return X[0]=G,X[4]=0,X[8]=U,X[12]=0,X[1]=0,X[5]=K,X[9]=V,X[13]=0,X[2]=0,X[6]=0,X[10]=R,X[14]=E,X[3]=0,X[7]=0,X[11]=-1,X[15]=0,this}makeOrthographic(J,$,Z,Q,W,Y,H=2000){const X=this.elements,G=1/($-J),K=1/(Z-Q),U=1/(Y-W),V=($+J)*G,R=(Z+Q)*K;let E,O;if(H===2000)E=(Y+W)*U,O=-2*U;else if(H===2001)E=W*U,O=-1*U;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+H);return X[0]=2*G,X[4]=0,X[8]=0,X[12]=-V,X[1]=0,X[5]=2*K,X[9]=0,X[13]=-R,X[2]=0,X[6]=0,X[10]=O,X[14]=-E,X[3]=0,X[7]=0,X[11]=0,X[15]=1,this}equals(J){const $=this.elements,Z=J.elements;for(let Q=0;Q<16;Q++)if($[Q]!==Z[Q])return!1;return!0}fromArray(J,$=0){for(let Z=0;Z<16;Z++)this.elements[Z]=J[Z+$];return this}toArray(J=[],$=0){const Z=this.elements;return J[$]=Z[0],J[$+1]=Z[1],J[$+2]=Z[2],J[$+3]=Z[3],J[$+4]=Z[4],J[$+5]=Z[5],J[$+6]=Z[6],J[$+7]=Z[7],J[$+8]=Z[8],J[$+9]=Z[9],J[$+10]=Z[10],J[$+11]=Z[11],J[$+12]=Z[12],J[$+13]=Z[13],J[$+14]=Z[14],J[$+15]=Z[15],J}}var G6=new v,IJ=new ZJ,e9=new v(0,0,0),J$=new v(1,1,1),lJ=new v,i6=new v,NJ=new v,C8=new ZJ,L8=new Q6;class F7{constructor(J=0,$=0,Z=0,Q=F7.DEFAULT_ORDER){this.isEuler=!0,this._x=J,this._y=$,this._z=Z,this._order=Q}get x(){return this._x}set x(J){this._x=J,this._onChangeCallback()}get y(){return this._y}set y(J){this._y=J,this._onChangeCallback()}get z(){return this._z}set z(J){this._z=J,this._onChangeCallback()}get order(){return this._order}set order(J){this._order=J,this._onChangeCallback()}set(J,$,Z,Q=this._order){return this._x=J,this._y=$,this._z=Z,this._order=Q,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(J){return this._x=J._x,this._y=J._y,this._z=J._z,this._order=J._order,this._onChangeCallback(),this}setFromRotationMatrix(J,$=this._order,Z=!0){const Q=J.elements,W=Q[0],Y=Q[4],H=Q[8],X=Q[1],G=Q[5],K=Q[9],U=Q[2],V=Q[6],R=Q[10];switch($){case"XYZ":if(this._y=Math.asin(RJ(H,-1,1)),Math.abs(H)<0.9999999)this._x=Math.atan2(-K,R),this._z=Math.atan2(-Y,W);else this._x=Math.atan2(V,G),this._z=0;break;case"YXZ":if(this._x=Math.asin(-RJ(K,-1,1)),Math.abs(K)<0.9999999)this._y=Math.atan2(H,R),this._z=Math.atan2(X,G);else this._y=Math.atan2(-U,W),this._z=0;break;case"ZXY":if(this._x=Math.asin(RJ(V,-1,1)),Math.abs(V)<0.9999999)this._y=Math.atan2(-U,R),this._z=Math.atan2(-Y,G);else this._y=0,this._z=Math.atan2(X,W);break;case"ZYX":if(this._y=Math.asin(-RJ(U,-1,1)),Math.abs(U)<0.9999999)this._x=Math.atan2(V,R),this._z=Math.atan2(X,W);else this._x=0,this._z=Math.atan2(-Y,G);break;case"YZX":if(this._z=Math.asin(RJ(X,-1,1)),Math.abs(X)<0.9999999)this._x=Math.atan2(-K,G),this._y=Math.atan2(-U,W);else this._x=0,this._y=Math.atan2(H,R);break;case"XZY":if(this._z=Math.asin(-RJ(Y,-1,1)),Math.abs(Y)<0.9999999)this._x=Math.atan2(V,G),this._y=Math.atan2(H,W);else this._x=Math.atan2(-K,R),this._y=0;break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+$)}if(this._order=$,Z===!0)this._onChangeCallback();return this}setFromQuaternion(J,$,Z){return C8.makeRotationFromQuaternion(J),this.setFromRotationMatrix(C8,$,Z)}setFromVector3(J,$=this._order){return this.set(J.x,J.y,J.z,$)}reorder(J){return L8.setFromEuler(this),this.setFromQuaternion(L8,J)}equals(J){return J._x===this._x&&J._y===this._y&&J._z===this._z&&J._order===this._order}fromArray(J){if(this._x=J[0],this._y=J[1],this._z=J[2],J[3]!==void 0)this._order=J[3];return this._onChangeCallback(),this}toArray(J=[],$=0){return J[$]=this._x,J[$+1]=this._y,J[$+2]=this._z,J[$+3]=this._order,J}_onChange(J){return this._onChangeCallback=J,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}F7.DEFAULT_ORDER="XYZ";class Q8{constructor(){this.mask=1|0}set(J){this.mask=(1<>>0}enable(J){this.mask|=1<1){for(let $=0;$1){for(let Z=0;Z0)Z=Z.concat(Y)}return Z}getWorldPosition(J){return this.updateWorldMatrix(!0,!1),J.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(J){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(y6,J,Z$),J}getWorldScale(J){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(y6,Q$,J),J}getWorldDirection(J){this.updateWorldMatrix(!0,!1);const $=this.matrixWorld.elements;return J.set($[8],$[9],$[10]).normalize()}raycast(){}traverse(J){J(this);const $=this.children;for(let Z=0,Q=$.length;Z0)Q.userData=this.userData;if(Q.layers=this.layers.mask,Q.matrix=this.matrix.toArray(),Q.up=this.up.toArray(),this.matrixAutoUpdate===!1)Q.matrixAutoUpdate=!1;if(this.isInstancedMesh){if(Q.type="InstancedMesh",Q.count=this.count,Q.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null)Q.instanceColor=this.instanceColor.toJSON()}function W(H,X){if(H[X.uuid]===void 0)H[X.uuid]=X.toJSON(J);return X.uuid}if(this.isScene){if(this.background){if(this.background.isColor)Q.background=this.background.toJSON();else if(this.background.isTexture)Q.background=this.background.toJSON(J).uuid}if(this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0)Q.environment=this.environment.toJSON(J).uuid}else if(this.isMesh||this.isLine||this.isPoints){Q.geometry=W(J.geometries,this.geometry);const H=this.geometry.parameters;if(H!==void 0&&H.shapes!==void 0){const X=H.shapes;if(Array.isArray(X))for(let G=0,K=X.length;G0){Q.children=[];for(let H=0;H0){Q.animations=[];for(let H=0;H0)Z.geometries=H;if(X.length>0)Z.materials=X;if(G.length>0)Z.textures=G;if(K.length>0)Z.images=K;if(U.length>0)Z.shapes=U;if(V.length>0)Z.skeletons=V;if(R.length>0)Z.animations=R;if(E.length>0)Z.nodes=E}return Z.object=Q,Z;function Y(H){const X=[];for(let G in H){const K=H[G];delete K.metadata,X.push(K)}return X}}clone(J){return new this.constructor().copy(this,J)}copy(J,$=!0){if(this.name=J.name,this.up.copy(J.up),this.position.copy(J.position),this.rotation.order=J.rotation.order,this.quaternion.copy(J.quaternion),this.scale.copy(J.scale),this.matrix.copy(J.matrix),this.matrixWorld.copy(J.matrixWorld),this.matrixAutoUpdate=J.matrixAutoUpdate,this.matrixWorldNeedsUpdate=J.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=J.matrixWorldAutoUpdate,this.layers.mask=J.layers.mask,this.visible=J.visible,this.castShadow=J.castShadow,this.receiveShadow=J.receiveShadow,this.frustumCulled=J.frustumCulled,this.renderOrder=J.renderOrder,this.animations=J.animations.slice(),this.userData=JSON.parse(JSON.stringify(J.userData)),$===!0)for(let Z=0;Z0)return Q.multiplyScalar(1/Math.sqrt(W));return Q.set(0,0,0)}static getBarycoord(J,$,Z,Q,W){wJ.subVectors(Q,$),bJ.subVectors(Z,$),x7.subVectors(J,$);const Y=wJ.dot(wJ),H=wJ.dot(bJ),X=wJ.dot(x7),G=bJ.dot(bJ),K=bJ.dot(x7),U=Y*G-H*H;if(U===0)return W.set(-2,-1,-1);const V=1/U,R=(G*X-H*K)*V,E=(Y*K-H*X)*V;return W.set(1-R-E,E,R)}static containsPoint(J,$,Z,Q){return this.getBarycoord(J,$,Z,Q,xJ),xJ.x>=0&&xJ.y>=0&&xJ.x+xJ.y<=1}static getUV(J,$,Z,Q,W,Y,H,X){if(a6===!1)console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),a6=!0;return this.getInterpolation(J,$,Z,Q,W,Y,H,X)}static getInterpolation(J,$,Z,Q,W,Y,H,X){return this.getBarycoord(J,$,Z,Q,xJ),X.setScalar(0),X.addScaledVector(W,xJ.x),X.addScaledVector(Y,xJ.y),X.addScaledVector(H,xJ.z),X}static isFrontFacing(J,$,Z,Q){return wJ.subVectors(Z,$),bJ.subVectors(J,$),wJ.cross(bJ).dot(Q)<0?!0:!1}set(J,$,Z){return this.a.copy(J),this.b.copy($),this.c.copy(Z),this}setFromPointsAndIndices(J,$,Z,Q){return this.a.copy(J[$]),this.b.copy(J[Z]),this.c.copy(J[Q]),this}setFromAttributeAndIndices(J,$,Z,Q){return this.a.fromBufferAttribute(J,$),this.b.fromBufferAttribute(J,Z),this.c.fromBufferAttribute(J,Q),this}clone(){return new this.constructor().copy(this)}copy(J){return this.a.copy(J.a),this.b.copy(J.b),this.c.copy(J.c),this}getArea(){return wJ.subVectors(this.c,this.b),bJ.subVectors(this.a,this.b),wJ.cross(bJ).length()*0.5}getMidpoint(J){return J.addVectors(this.a,this.b).add(this.c).multiplyScalar(0.3333333333333333)}getNormal(J){return kJ.getNormal(this.a,this.b,this.c,J)}getPlane(J){return J.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(J,$){return kJ.getBarycoord(J,this.a,this.b,this.c,$)}getUV(J,$,Z,Q,W){if(a6===!1)console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),a6=!0;return kJ.getInterpolation(J,this.a,this.b,this.c,$,Z,Q,W)}getInterpolation(J,$,Z,Q,W){return kJ.getInterpolation(J,this.a,this.b,this.c,$,Z,Q,W)}containsPoint(J){return kJ.containsPoint(J,this.a,this.b,this.c)}isFrontFacing(J){return kJ.isFrontFacing(this.a,this.b,this.c,J)}intersectsBox(J){return J.intersectsTriangle(this)}closestPointToPoint(J,$){const Z=this.a,Q=this.b,W=this.c;let Y,H;U6.subVectors(Q,Z),q6.subVectors(W,Z),h7.subVectors(J,Z);const X=U6.dot(h7),G=q6.dot(h7);if(X<=0&&G<=0)return $.copy(Z);g7.subVectors(J,Q);const K=U6.dot(g7),U=q6.dot(g7);if(K>=0&&U<=K)return $.copy(Q);const V=X*U-K*G;if(V<=0&&X>=0&&K<=0)return Y=X/(X-K),$.copy(Z).addScaledVector(U6,Y);p7.subVectors(J,W);const R=U6.dot(p7),E=q6.dot(p7);if(E>=0&&R<=E)return $.copy(W);const O=R*G-X*E;if(O<=0&&G>=0&&E<=0)return H=G/(G-E),$.copy(Z).addScaledVector(q6,H);const M=K*E-R*U;if(M<=0&&U-K>=0&&R-E>=0)return y8.subVectors(W,Q),H=(U-K)/(U-K+(R-E)),$.copy(Q).addScaledVector(y8,H);const D=1/(M+O+V);return Y=O*D,H=V*D,$.copy(Z).addScaledVector(U6,Y).addScaledVector(q6,H)}equals(J){return J.a.equals(this.a)&&J.b.equals(this.b)&&J.c.equals(this.c)}}var X$=0;class w6 extends Z6{constructor(){super();this.isMaterial=!0,Object.defineProperty(this,"id",{value:X$++}),this.uuid=h6(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(J){if(this._alphaTest>0!==J>0)this.version++;this._alphaTest=J}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(J){if(J===void 0)return;for(let $ in J){const Z=J[$];if(Z===void 0){console.warn(`THREE.Material: parameter '${$}' has value of undefined.`);continue}const Q=this[$];if(Q===void 0){console.warn(`THREE.Material: '${$}' is not a property of THREE.${this.type}.`);continue}if(Q&&Q.isColor)Q.set(Z);else if(Q&&Q.isVector3&&(Z&&Z.isVector3))Q.copy(Z);else this[$]=Z}}toJSON(J){const $=J===void 0||typeof J==="string";if($)J={textures:{},images:{}};const Z={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};if(Z.uuid=this.uuid,Z.type=this.type,this.name!=="")Z.name=this.name;if(this.color&&this.color.isColor)Z.color=this.color.getHex();if(this.roughness!==void 0)Z.roughness=this.roughness;if(this.metalness!==void 0)Z.metalness=this.metalness;if(this.sheen!==void 0)Z.sheen=this.sheen;if(this.sheenColor&&this.sheenColor.isColor)Z.sheenColor=this.sheenColor.getHex();if(this.sheenRoughness!==void 0)Z.sheenRoughness=this.sheenRoughness;if(this.emissive&&this.emissive.isColor)Z.emissive=this.emissive.getHex();if(this.emissiveIntensity&&this.emissiveIntensity!==1)Z.emissiveIntensity=this.emissiveIntensity;if(this.specular&&this.specular.isColor)Z.specular=this.specular.getHex();if(this.specularIntensity!==void 0)Z.specularIntensity=this.specularIntensity;if(this.specularColor&&this.specularColor.isColor)Z.specularColor=this.specularColor.getHex();if(this.shininess!==void 0)Z.shininess=this.shininess;if(this.clearcoat!==void 0)Z.clearcoat=this.clearcoat;if(this.clearcoatRoughness!==void 0)Z.clearcoatRoughness=this.clearcoatRoughness;if(this.clearcoatMap&&this.clearcoatMap.isTexture)Z.clearcoatMap=this.clearcoatMap.toJSON(J).uuid;if(this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture)Z.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(J).uuid;if(this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture)Z.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(J).uuid,Z.clearcoatNormalScale=this.clearcoatNormalScale.toArray();if(this.iridescence!==void 0)Z.iridescence=this.iridescence;if(this.iridescenceIOR!==void 0)Z.iridescenceIOR=this.iridescenceIOR;if(this.iridescenceThicknessRange!==void 0)Z.iridescenceThicknessRange=this.iridescenceThicknessRange;if(this.iridescenceMap&&this.iridescenceMap.isTexture)Z.iridescenceMap=this.iridescenceMap.toJSON(J).uuid;if(this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture)Z.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(J).uuid;if(this.anisotropy!==void 0)Z.anisotropy=this.anisotropy;if(this.anisotropyRotation!==void 0)Z.anisotropyRotation=this.anisotropyRotation;if(this.anisotropyMap&&this.anisotropyMap.isTexture)Z.anisotropyMap=this.anisotropyMap.toJSON(J).uuid;if(this.map&&this.map.isTexture)Z.map=this.map.toJSON(J).uuid;if(this.matcap&&this.matcap.isTexture)Z.matcap=this.matcap.toJSON(J).uuid;if(this.alphaMap&&this.alphaMap.isTexture)Z.alphaMap=this.alphaMap.toJSON(J).uuid;if(this.lightMap&&this.lightMap.isTexture)Z.lightMap=this.lightMap.toJSON(J).uuid,Z.lightMapIntensity=this.lightMapIntensity;if(this.aoMap&&this.aoMap.isTexture)Z.aoMap=this.aoMap.toJSON(J).uuid,Z.aoMapIntensity=this.aoMapIntensity;if(this.bumpMap&&this.bumpMap.isTexture)Z.bumpMap=this.bumpMap.toJSON(J).uuid,Z.bumpScale=this.bumpScale;if(this.normalMap&&this.normalMap.isTexture)Z.normalMap=this.normalMap.toJSON(J).uuid,Z.normalMapType=this.normalMapType,Z.normalScale=this.normalScale.toArray();if(this.displacementMap&&this.displacementMap.isTexture)Z.displacementMap=this.displacementMap.toJSON(J).uuid,Z.displacementScale=this.displacementScale,Z.displacementBias=this.displacementBias;if(this.roughnessMap&&this.roughnessMap.isTexture)Z.roughnessMap=this.roughnessMap.toJSON(J).uuid;if(this.metalnessMap&&this.metalnessMap.isTexture)Z.metalnessMap=this.metalnessMap.toJSON(J).uuid;if(this.emissiveMap&&this.emissiveMap.isTexture)Z.emissiveMap=this.emissiveMap.toJSON(J).uuid;if(this.specularMap&&this.specularMap.isTexture)Z.specularMap=this.specularMap.toJSON(J).uuid;if(this.specularIntensityMap&&this.specularIntensityMap.isTexture)Z.specularIntensityMap=this.specularIntensityMap.toJSON(J).uuid;if(this.specularColorMap&&this.specularColorMap.isTexture)Z.specularColorMap=this.specularColorMap.toJSON(J).uuid;if(this.envMap&&this.envMap.isTexture){if(Z.envMap=this.envMap.toJSON(J).uuid,this.combine!==void 0)Z.combine=this.combine}if(this.envMapIntensity!==void 0)Z.envMapIntensity=this.envMapIntensity;if(this.reflectivity!==void 0)Z.reflectivity=this.reflectivity;if(this.refractionRatio!==void 0)Z.refractionRatio=this.refractionRatio;if(this.gradientMap&&this.gradientMap.isTexture)Z.gradientMap=this.gradientMap.toJSON(J).uuid;if(this.transmission!==void 0)Z.transmission=this.transmission;if(this.transmissionMap&&this.transmissionMap.isTexture)Z.transmissionMap=this.transmissionMap.toJSON(J).uuid;if(this.thickness!==void 0)Z.thickness=this.thickness;if(this.thicknessMap&&this.thicknessMap.isTexture)Z.thicknessMap=this.thicknessMap.toJSON(J).uuid;if(this.attenuationDistance!==void 0&&this.attenuationDistance!==Infinity)Z.attenuationDistance=this.attenuationDistance;if(this.attenuationColor!==void 0)Z.attenuationColor=this.attenuationColor.getHex();if(this.size!==void 0)Z.size=this.size;if(this.shadowSide!==null)Z.shadowSide=this.shadowSide;if(this.sizeAttenuation!==void 0)Z.sizeAttenuation=this.sizeAttenuation;if(this.blending!==1)Z.blending=this.blending;if(this.side!==0)Z.side=this.side;if(this.vertexColors===!0)Z.vertexColors=!0;if(this.opacity<1)Z.opacity=this.opacity;if(this.transparent===!0)Z.transparent=!0;if(Z.depthFunc=this.depthFunc,Z.depthTest=this.depthTest,Z.depthWrite=this.depthWrite,Z.colorWrite=this.colorWrite,Z.stencilWrite=this.stencilWrite,Z.stencilWriteMask=this.stencilWriteMask,Z.stencilFunc=this.stencilFunc,Z.stencilRef=this.stencilRef,Z.stencilFuncMask=this.stencilFuncMask,Z.stencilFail=this.stencilFail,Z.stencilZFail=this.stencilZFail,Z.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0)Z.rotation=this.rotation;if(this.polygonOffset===!0)Z.polygonOffset=!0;if(this.polygonOffsetFactor!==0)Z.polygonOffsetFactor=this.polygonOffsetFactor;if(this.polygonOffsetUnits!==0)Z.polygonOffsetUnits=this.polygonOffsetUnits;if(this.linewidth!==void 0&&this.linewidth!==1)Z.linewidth=this.linewidth;if(this.dashSize!==void 0)Z.dashSize=this.dashSize;if(this.gapSize!==void 0)Z.gapSize=this.gapSize;if(this.scale!==void 0)Z.scale=this.scale;if(this.dithering===!0)Z.dithering=!0;if(this.alphaTest>0)Z.alphaTest=this.alphaTest;if(this.alphaHash===!0)Z.alphaHash=!0;if(this.alphaToCoverage===!0)Z.alphaToCoverage=!0;if(this.premultipliedAlpha===!0)Z.premultipliedAlpha=!0;if(this.forceSinglePass===!0)Z.forceSinglePass=!0;if(this.wireframe===!0)Z.wireframe=!0;if(this.wireframeLinewidth>1)Z.wireframeLinewidth=this.wireframeLinewidth;if(this.wireframeLinecap!=="round")Z.wireframeLinecap=this.wireframeLinecap;if(this.wireframeLinejoin!=="round")Z.wireframeLinejoin=this.wireframeLinejoin;if(this.flatShading===!0)Z.flatShading=!0;if(this.visible===!1)Z.visible=!1;if(this.toneMapped===!1)Z.toneMapped=!1;if(this.fog===!1)Z.fog=!1;if(Object.keys(this.userData).length>0)Z.userData=this.userData;function Q(W){const Y=[];for(let H in W){const X=W[H];delete X.metadata,Y.push(X)}return Y}if($){const W=Q(J.textures),Y=Q(J.images);if(W.length>0)Z.textures=W;if(Y.length>0)Z.images=Y}return Z}clone(){return new this.constructor().copy(this)}copy(J){this.name=J.name,this.blending=J.blending,this.side=J.side,this.vertexColors=J.vertexColors,this.opacity=J.opacity,this.transparent=J.transparent,this.blendSrc=J.blendSrc,this.blendDst=J.blendDst,this.blendEquation=J.blendEquation,this.blendSrcAlpha=J.blendSrcAlpha,this.blendDstAlpha=J.blendDstAlpha,this.blendEquationAlpha=J.blendEquationAlpha,this.depthFunc=J.depthFunc,this.depthTest=J.depthTest,this.depthWrite=J.depthWrite,this.stencilWriteMask=J.stencilWriteMask,this.stencilFunc=J.stencilFunc,this.stencilRef=J.stencilRef,this.stencilFuncMask=J.stencilFuncMask,this.stencilFail=J.stencilFail,this.stencilZFail=J.stencilZFail,this.stencilZPass=J.stencilZPass,this.stencilWrite=J.stencilWrite;const $=J.clippingPlanes;let Z=null;if($!==null){const Q=$.length;Z=new Array(Q);for(let W=0;W!==Q;++W)Z[W]=$[W].clone()}return this.clippingPlanes=Z,this.clipIntersection=J.clipIntersection,this.clipShadows=J.clipShadows,this.shadowSide=J.shadowSide,this.colorWrite=J.colorWrite,this.precision=J.precision,this.polygonOffset=J.polygonOffset,this.polygonOffsetFactor=J.polygonOffsetFactor,this.polygonOffsetUnits=J.polygonOffsetUnits,this.dithering=J.dithering,this.alphaTest=J.alphaTest,this.alphaHash=J.alphaHash,this.alphaToCoverage=J.alphaToCoverage,this.premultipliedAlpha=J.premultipliedAlpha,this.forceSinglePass=J.forceSinglePass,this.visible=J.visible,this.toneMapped=J.toneMapped,this.userData=JSON.parse(JSON.stringify(J.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(J){if(J===!0)this.version++}}var V9={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},uJ={h:0,s:0,l:0},t6={h:0,s:0,l:0};class g0{constructor(J,$,Z){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(J,$,Z)}set(J,$,Z){if($===void 0&&Z===void 0){const Q=J;if(Q&&Q.isColor)this.copy(Q);else if(typeof Q==="number")this.setHex(Q);else if(typeof Q==="string")this.setStyle(Q)}else this.setRGB(J,$,Z);return this}setScalar(J){return this.r=J,this.g=J,this.b=J,this}setHex(J,$="srgb"){return J=Math.floor(J),this.r=(J>>16&255)/255,this.g=(J>>8&255)/255,this.b=(J&255)/255,h0.toWorkingColorSpace(this,$),this}setRGB(J,$,Z,Q=h0.workingColorSpace){return this.r=J,this.g=$,this.b=Z,h0.toWorkingColorSpace(this,Q),this}setHSL(J,$,Z,Q=h0.workingColorSpace){if(J=s9(J,1),$=RJ($,0,1),Z=RJ(Z,0,1),$===0)this.r=this.g=this.b=Z;else{const W=Z<=0.5?Z*(1+$):Z+$-Z*$,Y=2*Z-W;this.r=m7(Y,W,J+0.3333333333333333),this.g=m7(Y,W,J),this.b=m7(Y,W,J-0.3333333333333333)}return h0.toWorkingColorSpace(this,Q),this}setStyle(J,$="srgb"){function Z(W){if(W===void 0)return;if(parseFloat(W)<1)console.warn("THREE.Color: Alpha component of "+J+" will be ignored.")}let Q;if(Q=/^(\w+)\(([^\)]*)\)/.exec(J)){let W;const Y=Q[1],H=Q[2];switch(Y){case"rgb":case"rgba":if(W=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(H))return Z(W[4]),this.setRGB(Math.min(255,parseInt(W[1],10))/255,Math.min(255,parseInt(W[2],10))/255,Math.min(255,parseInt(W[3],10))/255,$);if(W=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(H))return Z(W[4]),this.setRGB(Math.min(100,parseInt(W[1],10))/100,Math.min(100,parseInt(W[2],10))/100,Math.min(100,parseInt(W[3],10))/100,$);break;case"hsl":case"hsla":if(W=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(H))return Z(W[4]),this.setHSL(parseFloat(W[1])/360,parseFloat(W[2])/100,parseFloat(W[3])/100,$);break;default:console.warn("THREE.Color: Unknown color model "+J)}}else if(Q=/^\#([A-Fa-f\d]+)$/.exec(J)){const W=Q[1],Y=W.length;if(Y===3)return this.setRGB(parseInt(W.charAt(0),16)/15,parseInt(W.charAt(1),16)/15,parseInt(W.charAt(2),16)/15,$);else if(Y===6)return this.setHex(parseInt(W,16),$);else console.warn("THREE.Color: Invalid hex color "+J)}else if(J&&J.length>0)return this.setColorName(J,$);return this}setColorName(J,$="srgb"){const Z=V9[J.toLowerCase()];if(Z!==void 0)this.setHex(Z,$);else console.warn("THREE.Color: Unknown color "+J);return this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(J){return this.r=J.r,this.g=J.g,this.b=J.b,this}copySRGBToLinear(J){return this.r=z6(J.r),this.g=z6(J.g),this.b=z6(J.b),this}copyLinearToSRGB(J){return this.r=P7(J.r),this.g=P7(J.g),this.b=P7(J.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(J="srgb"){return h0.fromWorkingColorSpace(HJ.copy(this),J),Math.round(RJ(HJ.r*255,0,255))*65536+Math.round(RJ(HJ.g*255,0,255))*256+Math.round(RJ(HJ.b*255,0,255))}getHexString(J="srgb"){return("000000"+this.getHex(J).toString(16)).slice(-6)}getHSL(J,$=h0.workingColorSpace){h0.fromWorkingColorSpace(HJ.copy(this),$);const{r:Z,g:Q,b:W}=HJ,Y=Math.max(Z,Q,W),H=Math.min(Z,Q,W);let X,G;const K=(H+Y)/2;if(H===Y)X=0,G=0;else{const U=Y-H;switch(G=K<=0.5?U/(Y+H):U/(2-Y-H),Y){case Z:X=(Q-W)/U+(Q0)J.userData=this.userData;if(this.parameters!==void 0){const X=this.parameters;for(let G in X)if(X[G]!==void 0)J[G]=X[G];return J}J.data={attributes:{}};const $=this.index;if($!==null)J.data.index={type:$.array.constructor.name,array:Array.prototype.slice.call($.array)};const Z=this.attributes;for(let X in Z){const G=Z[X];J.data.attributes[X]=G.toJSON(J.data)}const Q={};let W=!1;for(let X in this.morphAttributes){const G=this.morphAttributes[X],K=[];for(let U=0,V=G.length;U0)Q[X]=K,W=!0}if(W)J.data.morphAttributes=Q,J.data.morphTargetsRelative=this.morphTargetsRelative;const Y=this.groups;if(Y.length>0)J.data.groups=JSON.parse(JSON.stringify(Y));const H=this.boundingSphere;if(H!==null)J.data.boundingSphere={center:H.center.toArray(),radius:H.radius};return J}clone(){return new this.constructor().copy(this)}copy(J){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const $={};this.name=J.name;const Z=J.index;if(Z!==null)this.setIndex(Z.clone($));const Q=J.attributes;for(let G in Q){const K=Q[G];this.setAttribute(G,K.clone($))}const W=J.morphAttributes;for(let G in W){const K=[],U=W[G];for(let V=0,R=U.length;V0){const Q=$[Z[0]];if(Q!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let W=0,Y=Q.length;W(J.far-J.near)**2)return}if(f8.copy(W).invert(),tJ.copy(J.ray).applyMatrix4(f8),Z.boundingBox!==null){if(tJ.intersectsBox(Z.boundingBox)===!1)return}this._computeIntersections(J,$,tJ)}_computeIntersections(J,$,Z){let Q;const W=this.geometry,Y=this.material,H=W.index,X=W.attributes.position,G=W.attributes.uv,K=W.attributes.uv1,U=W.attributes.normal,V=W.groups,R=W.drawRange;if(H!==null)if(Array.isArray(Y))for(let E=0,O=V.length;E0?1:-1,K.push(r.x,r.y,r.z),U.push(h/w),U.push(1-p/g),n+=1}}for(let p=0;p0)$.defines=this.defines;$.vertexShader=this.vertexShader,$.fragmentShader=this.fragmentShader,$.lights=this.lights,$.clipping=this.clipping;const Z={};for(let Q in this.extensions)if(this.extensions[Q]===!0)Z[Q]=!0;if(Object.keys(Z).length>0)$.extensions=Z;return $}}class H8 extends EJ{constructor(){super();this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ZJ,this.projectionMatrix=new ZJ,this.projectionMatrixInverse=new ZJ,this.coordinateSystem=2000}copy(J,$){return super.copy(J,$),this.matrixWorldInverse.copy(J.matrixWorldInverse),this.projectionMatrix.copy(J.projectionMatrix),this.projectionMatrixInverse.copy(J.projectionMatrixInverse),this.coordinateSystem=J.coordinateSystem,this}getWorldDirection(J){return super.getWorldDirection(J).negate()}updateMatrixWorld(J){super.updateMatrixWorld(J),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(J,$){super.updateWorldMatrix(J,$),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class DJ extends H8{constructor(J=50,$=1,Z=0.1,Q=2000){super();this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=J,this.zoom=1,this.near=Z,this.far=Q,this.focus=10,this.aspect=$,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(J,$){return super.copy(J,$),this.fov=J.fov,this.zoom=J.zoom,this.near=J.near,this.far=J.far,this.focus=J.focus,this.aspect=J.aspect,this.view=J.view===null?null:Object.assign({},J.view),this.filmGauge=J.filmGauge,this.filmOffset=J.filmOffset,this}setFocalLength(J){const $=0.5*this.getFilmHeight()/J;this.fov=o7*2*Math.atan($),this.updateProjectionMatrix()}getFocalLength(){const J=Math.tan(C7*0.5*this.fov);return 0.5*this.getFilmHeight()/J}getEffectiveFOV(){return o7*2*Math.atan(Math.tan(C7*0.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(J,$,Z,Q,W,Y){if(this.aspect=J/$,this.view===null)this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1};this.view.enabled=!0,this.view.fullWidth=J,this.view.fullHeight=$,this.view.offsetX=Z,this.view.offsetY=Q,this.view.width=W,this.view.height=Y,this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null)this.view.enabled=!1;this.updateProjectionMatrix()}updateProjectionMatrix(){const J=this.near;let $=J*Math.tan(C7*0.5*this.fov)/this.zoom,Z=2*$,Q=this.aspect*Z,W=-0.5*Q;const Y=this.view;if(this.view!==null&&this.view.enabled){const{fullWidth:X,fullHeight:G}=Y;W+=Y.offsetX*Q/X,$-=Y.offsetY*Z/G,Q*=Y.width/X,Z*=Y.height/G}const H=this.filmOffset;if(H!==0)W+=J*H/this.getFilmWidth();this.projectionMatrix.makePerspective(W,W+Q,$,$-Z,J,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(J){const $=super.toJSON(J);if($.object.fov=this.fov,$.object.zoom=this.zoom,$.object.near=this.near,$.object.far=this.far,$.object.focus=this.focus,$.object.aspect=this.aspect,this.view!==null)$.object.view=Object.assign({},this.view);return $.object.filmGauge=this.filmGauge,$.object.filmOffset=this.filmOffset,$}}var N6=-90,O6=1;class q9 extends EJ{constructor(J,$,Z){super();this.type="CubeCamera",this.renderTarget=Z,this.coordinateSystem=null,this.activeMipmapLevel=0;const Q=new DJ(N6,O6,J,$);Q.layers=this.layers,this.add(Q);const W=new DJ(N6,O6,J,$);W.layers=this.layers,this.add(W);const Y=new DJ(N6,O6,J,$);Y.layers=this.layers,this.add(Y);const H=new DJ(N6,O6,J,$);H.layers=this.layers,this.add(H);const X=new DJ(N6,O6,J,$);X.layers=this.layers,this.add(X);const G=new DJ(N6,O6,J,$);G.layers=this.layers,this.add(G)}updateCoordinateSystem(){const J=this.coordinateSystem,$=this.children.concat(),[Z,Q,W,Y,H,X]=$;for(let G of $)this.remove(G);if(J===2000)Z.up.set(0,1,0),Z.lookAt(1,0,0),Q.up.set(0,1,0),Q.lookAt(-1,0,0),W.up.set(0,0,-1),W.lookAt(0,1,0),Y.up.set(0,0,1),Y.lookAt(0,-1,0),H.up.set(0,1,0),H.lookAt(0,0,1),X.up.set(0,1,0),X.lookAt(0,0,-1);else if(J===2001)Z.up.set(0,-1,0),Z.lookAt(-1,0,0),Q.up.set(0,-1,0),Q.lookAt(1,0,0),W.up.set(0,0,1),W.lookAt(0,1,0),Y.up.set(0,0,-1),Y.lookAt(0,-1,0),H.up.set(0,-1,0),H.lookAt(0,0,1),X.up.set(0,-1,0),X.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+J);for(let G of $)this.add(G),G.updateMatrixWorld()}update(J,$){if(this.parent===null)this.updateMatrixWorld();const{renderTarget:Z,activeMipmapLevel:Q}=this;if(this.coordinateSystem!==J.coordinateSystem)this.coordinateSystem=J.coordinateSystem,this.updateCoordinateSystem();const[W,Y,H,X,G,K]=this.children,U=J.getRenderTarget(),V=J.getActiveCubeFace(),R=J.getActiveMipmapLevel(),E=J.xr.enabled;J.xr.enabled=!1;const O=Z.texture.generateMipmaps;Z.texture.generateMipmaps=!1,J.setRenderTarget(Z,0,Q),J.render($,W),J.setRenderTarget(Z,1,Q),J.render($,Y),J.setRenderTarget(Z,2,Q),J.render($,H),J.setRenderTarget(Z,3,Q),J.render($,X),J.setRenderTarget(Z,4,Q),J.render($,G),Z.texture.generateMipmaps=O,J.setRenderTarget(Z,5,Q),J.render($,K),J.setRenderTarget(U,V,R),J.xr.enabled=E,Z.texture.needsPMREMUpdate=!0}}class K8 extends MJ{constructor(J,$,Z,Q,W,Y,H,X,G,K){J=J!==void 0?J:[],$=$!==void 0?$:301;super(J,$,Z,Q,W,Y,H,X,G,K);this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(J){this.image=J}}class R9 extends nJ{constructor(J=1,$={}){super(J,J,$);this.isWebGLCubeRenderTarget=!0;const Z={width:J,height:J,depth:1},Q=[Z,Z,Z,Z,Z,Z];if($.encoding!==void 0)b6("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),$.colorSpace=$.encoding===3001?"srgb":"";this.texture=new K8(Q,$.mapping,$.wrapS,$.wrapT,$.magFilter,$.minFilter,$.format,$.type,$.anisotropy,$.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=$.generateMipmaps!==void 0?$.generateMipmaps:!1,this.texture.minFilter=$.minFilter!==void 0?$.minFilter:1006}fromEquirectangularTexture(J,$){this.texture.type=$.type,this.texture.colorSpace=$.colorSpace,this.texture.generateMipmaps=$.generateMipmaps,this.texture.minFilter=$.minFilter,this.texture.magFilter=$.magFilter;const Z={uniforms:{tEquirect:{value:null}},vertexShader:` + `},$Q=function(J){let $=new WeakMap,Z=null;function Q(X){if(X&&X.isTexture){const K=X.mapping,G=K===303||K===304,U=K===301||K===302;if(G||U)if(X.isRenderTargetTexture&&X.needsPMREMUpdate===!0){X.needsPMREMUpdate=!1;let V=$.get(X);if(Z===null)Z=new r7(J);return V=G?Z.fromEquirectangular(X,V):Z.fromCubemap(X,V),$.set(X,V),V.texture}else if($.has(X))return $.get(X).texture;else{const V=X.image;if(G&&V&&V.height>0||U&&V&&W(V)){if(Z===null)Z=new r7(J);const R=G?Z.fromEquirectangular(X):Z.fromCubemap(X);return $.set(X,R),X.addEventListener("dispose",Y),R.texture}else return null}}return X}function W(X){let K=0;const G=6;for(let U=0;U$.maxTextureSize)C=Math.ceil(N/$.maxTextureSize),N=$.maxTextureSize;const m=new Float32Array(N*C*4*M),e=new $8(m,N,C,M);e.type=1015,e.needsUpdate=!0;const W0=u*4;for(let l=0;l0)return J;const W=$*Z;let Y=d8[W];if(Y===void 0)Y=new Float32Array(W),d8[W]=Y;if($!==0){Q.toArray(Y,0);for(let H=1,X=0;H!==$;++H)X+=Z,J[H].toArray(Y,X)}return Y},e0=function(J,$){if(J.length!==$.length)return!1;for(let Z=0,Q=J.length;Z":" "} ${X}: ${Z[H]}`)}return Q.join("\n")},eQ=function(J){const $=h0.getPrimaries(h0.workingColorSpace),Z=h0.getPrimaries(J);let Q;if($===Z)Q="";else if($==="p3"&&Z==="rec709")Q="LinearDisplayP3ToLinearSRGB";else if($==="rec709"&&Z==="p3")Q="LinearSRGBToLinearDisplayP3";switch(J){case"srgb-linear":case"display-p3-linear":return[Q,"LinearTransferOETF"];case"srgb":case"display-p3":return[Q,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",J),[Q,"LinearTransferOETF"]}},a8=function(J,$,Z){const Q=J.getShaderParameter($,J.COMPILE_STATUS),W=J.getShaderInfoLog($).trim();if(Q&&W==="")return"";const Y=/ERROR: 0:(\d+)/.exec(W);if(Y){const H=parseInt(Y[1]);return Z.toUpperCase()+"\n\n"+W+"\n\n"+tQ(J.getShaderSource($),H)}else return W},JW=function(J,$){const Z=eQ($);return`vec4 ${J}( vec4 value ) { return ${Z[0]}( ${Z[1]}( value ) ); }`},$W=function(J,$){let Z;switch($){case 1:Z="Linear";break;case 2:Z="Reinhard";break;case 3:Z="OptimizedCineon";break;case 4:Z="ACESFilmic";break;case 5:Z="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",$),Z="Linear"}return"vec3 "+J+"( vec3 color ) { return "+Z+"ToneMapping( color ); }"},ZW=function(J){return[J.extensionDerivatives||!!J.envMapCubeUVHeight||J.bumpMap||J.normalMapTangentSpace||J.clearcoatNormalMap||J.flatShading||J.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(J.extensionFragDepth||J.logarithmicDepthBuffer)&&J.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",J.extensionDrawBuffers&&J.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(J.extensionShaderTextureLOD||J.envMap||J.transmission)&&J.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(v6).join("\n")},QW=function(J){const $=[];for(let Z in J){const Q=J[Z];if(Q===!1)continue;$.push("#define "+Z+" "+Q)}return $.join("\n")},WW=function(J,$){const Z={},Q=J.getProgramParameter($,J.ACTIVE_ATTRIBUTES);for(let W=0;W")}return a7(Z)},J9=function(J){return J.replace(KW,GW)},GW=function(J,$,Z,Q){let W="";for(let Y=parseInt($);Y0)E+="\n";if(q=[D,"#define SHADER_TYPE "+Z.shaderType,"#define SHADER_NAME "+Z.shaderName,M].filter(v6).join("\n"),q.length>0)q+="\n"}else E=[$9(Z),"#define SHADER_TYPE "+Z.shaderType,"#define SHADER_NAME "+Z.shaderName,M,Z.instancing?"#define USE_INSTANCING":"",Z.instancingColor?"#define USE_INSTANCING_COLOR":"",Z.useFog&&Z.fog?"#define USE_FOG":"",Z.useFog&&Z.fogExp2?"#define FOG_EXP2":"",Z.map?"#define USE_MAP":"",Z.envMap?"#define USE_ENVMAP":"",Z.envMap?"#define "+U:"",Z.lightMap?"#define USE_LIGHTMAP":"",Z.aoMap?"#define USE_AOMAP":"",Z.bumpMap?"#define USE_BUMPMAP":"",Z.normalMap?"#define USE_NORMALMAP":"",Z.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",Z.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",Z.displacementMap?"#define USE_DISPLACEMENTMAP":"",Z.emissiveMap?"#define USE_EMISSIVEMAP":"",Z.anisotropy?"#define USE_ANISOTROPY":"",Z.anisotropyMap?"#define USE_ANISOTROPYMAP":"",Z.clearcoatMap?"#define USE_CLEARCOATMAP":"",Z.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",Z.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",Z.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",Z.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",Z.specularMap?"#define USE_SPECULARMAP":"",Z.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",Z.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",Z.roughnessMap?"#define USE_ROUGHNESSMAP":"",Z.metalnessMap?"#define USE_METALNESSMAP":"",Z.alphaMap?"#define USE_ALPHAMAP":"",Z.alphaHash?"#define USE_ALPHAHASH":"",Z.transmission?"#define USE_TRANSMISSION":"",Z.transmissionMap?"#define USE_TRANSMISSIONMAP":"",Z.thicknessMap?"#define USE_THICKNESSMAP":"",Z.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",Z.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",Z.mapUv?"#define MAP_UV "+Z.mapUv:"",Z.alphaMapUv?"#define ALPHAMAP_UV "+Z.alphaMapUv:"",Z.lightMapUv?"#define LIGHTMAP_UV "+Z.lightMapUv:"",Z.aoMapUv?"#define AOMAP_UV "+Z.aoMapUv:"",Z.emissiveMapUv?"#define EMISSIVEMAP_UV "+Z.emissiveMapUv:"",Z.bumpMapUv?"#define BUMPMAP_UV "+Z.bumpMapUv:"",Z.normalMapUv?"#define NORMALMAP_UV "+Z.normalMapUv:"",Z.displacementMapUv?"#define DISPLACEMENTMAP_UV "+Z.displacementMapUv:"",Z.metalnessMapUv?"#define METALNESSMAP_UV "+Z.metalnessMapUv:"",Z.roughnessMapUv?"#define ROUGHNESSMAP_UV "+Z.roughnessMapUv:"",Z.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+Z.anisotropyMapUv:"",Z.clearcoatMapUv?"#define CLEARCOATMAP_UV "+Z.clearcoatMapUv:"",Z.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+Z.clearcoatNormalMapUv:"",Z.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+Z.clearcoatRoughnessMapUv:"",Z.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+Z.iridescenceMapUv:"",Z.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+Z.iridescenceThicknessMapUv:"",Z.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+Z.sheenColorMapUv:"",Z.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+Z.sheenRoughnessMapUv:"",Z.specularMapUv?"#define SPECULARMAP_UV "+Z.specularMapUv:"",Z.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+Z.specularColorMapUv:"",Z.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+Z.specularIntensityMapUv:"",Z.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+Z.transmissionMapUv:"",Z.thicknessMapUv?"#define THICKNESSMAP_UV "+Z.thicknessMapUv:"",Z.vertexTangents&&Z.flatShading===!1?"#define USE_TANGENT":"",Z.vertexColors?"#define USE_COLOR":"",Z.vertexAlphas?"#define USE_COLOR_ALPHA":"",Z.vertexUv1s?"#define USE_UV1":"",Z.vertexUv2s?"#define USE_UV2":"",Z.vertexUv3s?"#define USE_UV3":"",Z.pointsUvs?"#define USE_POINTS_UV":"",Z.flatShading?"#define FLAT_SHADED":"",Z.skinning?"#define USE_SKINNING":"",Z.morphTargets?"#define USE_MORPHTARGETS":"",Z.morphNormals&&Z.flatShading===!1?"#define USE_MORPHNORMALS":"",Z.morphColors&&Z.isWebGL2?"#define USE_MORPHCOLORS":"",Z.morphTargetsCount>0&&Z.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",Z.morphTargetsCount>0&&Z.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+Z.morphTextureStride:"",Z.morphTargetsCount>0&&Z.isWebGL2?"#define MORPHTARGETS_COUNT "+Z.morphTargetsCount:"",Z.doubleSided?"#define DOUBLE_SIDED":"",Z.flipSided?"#define FLIP_SIDED":"",Z.shadowMapEnabled?"#define USE_SHADOWMAP":"",Z.shadowMapEnabled?"#define "+K:"",Z.sizeAttenuation?"#define USE_SIZEATTENUATION":"",Z.numLightProbes>0?"#define USE_LIGHT_PROBES":"",Z.useLegacyLights?"#define LEGACY_LIGHTS":"",Z.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",Z.logarithmicDepthBuffer&&Z.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif","\n"].filter(v6).join("\n"),q=[D,$9(Z),"#define SHADER_TYPE "+Z.shaderType,"#define SHADER_NAME "+Z.shaderName,M,Z.useFog&&Z.fog?"#define USE_FOG":"",Z.useFog&&Z.fogExp2?"#define FOG_EXP2":"",Z.map?"#define USE_MAP":"",Z.matcap?"#define USE_MATCAP":"",Z.envMap?"#define USE_ENVMAP":"",Z.envMap?"#define "+G:"",Z.envMap?"#define "+U:"",Z.envMap?"#define "+V:"",R?"#define CUBEUV_TEXEL_WIDTH "+R.texelWidth:"",R?"#define CUBEUV_TEXEL_HEIGHT "+R.texelHeight:"",R?"#define CUBEUV_MAX_MIP "+R.maxMip+".0":"",Z.lightMap?"#define USE_LIGHTMAP":"",Z.aoMap?"#define USE_AOMAP":"",Z.bumpMap?"#define USE_BUMPMAP":"",Z.normalMap?"#define USE_NORMALMAP":"",Z.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",Z.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",Z.emissiveMap?"#define USE_EMISSIVEMAP":"",Z.anisotropy?"#define USE_ANISOTROPY":"",Z.anisotropyMap?"#define USE_ANISOTROPYMAP":"",Z.clearcoat?"#define USE_CLEARCOAT":"",Z.clearcoatMap?"#define USE_CLEARCOATMAP":"",Z.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",Z.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",Z.iridescence?"#define USE_IRIDESCENCE":"",Z.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",Z.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",Z.specularMap?"#define USE_SPECULARMAP":"",Z.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",Z.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",Z.roughnessMap?"#define USE_ROUGHNESSMAP":"",Z.metalnessMap?"#define USE_METALNESSMAP":"",Z.alphaMap?"#define USE_ALPHAMAP":"",Z.alphaTest?"#define USE_ALPHATEST":"",Z.alphaHash?"#define USE_ALPHAHASH":"",Z.sheen?"#define USE_SHEEN":"",Z.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",Z.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",Z.transmission?"#define USE_TRANSMISSION":"",Z.transmissionMap?"#define USE_TRANSMISSIONMAP":"",Z.thicknessMap?"#define USE_THICKNESSMAP":"",Z.vertexTangents&&Z.flatShading===!1?"#define USE_TANGENT":"",Z.vertexColors||Z.instancingColor?"#define USE_COLOR":"",Z.vertexAlphas?"#define USE_COLOR_ALPHA":"",Z.vertexUv1s?"#define USE_UV1":"",Z.vertexUv2s?"#define USE_UV2":"",Z.vertexUv3s?"#define USE_UV3":"",Z.pointsUvs?"#define USE_POINTS_UV":"",Z.gradientMap?"#define USE_GRADIENTMAP":"",Z.flatShading?"#define FLAT_SHADED":"",Z.doubleSided?"#define DOUBLE_SIDED":"",Z.flipSided?"#define FLIP_SIDED":"",Z.shadowMapEnabled?"#define USE_SHADOWMAP":"",Z.shadowMapEnabled?"#define "+K:"",Z.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",Z.numLightProbes>0?"#define USE_LIGHT_PROBES":"",Z.useLegacyLights?"#define LEGACY_LIGHTS":"",Z.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",Z.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",Z.logarithmicDepthBuffer&&Z.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",Z.toneMapping!==0?"#define TONE_MAPPING":"",Z.toneMapping!==0?k0.tonemapping_pars_fragment:"",Z.toneMapping!==0?$W("toneMapping",Z.toneMapping):"",Z.dithering?"#define DITHERING":"",Z.opaque?"#define OPAQUE":"",k0.colorspace_pars_fragment,JW("linearToOutputTexel",Z.outputColorSpace),Z.useDepthPacking?"#define DEPTH_PACKING "+Z.depthPacking:"","\n"].filter(v6).join("\n");if(H=a7(H),H=t8(H,Z),H=e8(H,Z),X=a7(X),X=t8(X,Z),X=e8(X,Z),H=J9(H),X=J9(X),Z.isWebGL2&&Z.isRawShaderMaterial!==!0)I="#version 300 es\n",E=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+E,q=["#define varying in",Z.glslVersion==="300 es"?"":"layout(location = 0) out highp vec4 pc_fragColor;",Z.glslVersion==="300 es"?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+q;const z=I+E+H,A=I+q+X,L=r8(W,W.VERTEX_SHADER,z),w=r8(W,W.FRAGMENT_SHADER,A);if(W.attachShader(O,L),W.attachShader(O,w),Z.index0AttributeName!==void 0)W.bindAttribLocation(O,0,Z.index0AttributeName);else if(Z.morphTargets===!0)W.bindAttribLocation(O,0,"position");if(W.linkProgram(O),J.debug.checkShaderErrors){const N=W.getProgramInfoLog(O).trim(),C=W.getShaderInfoLog(L).trim(),m=W.getShaderInfoLog(w).trim();let e=!0,W0=!0;if(W.getProgramParameter(O,W.LINK_STATUS)===!1)if(e=!1,typeof J.debug.onShaderError==="function")J.debug.onShaderError(W,O,L,w);else{const P=a8(W,L,"vertex"),l=a8(W,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+W.getError()+" - VALIDATE_STATUS "+W.getProgramParameter(O,W.VALIDATE_STATUS)+"\n\nProgram Info Log: "+N+"\n"+P+"\n"+l)}else if(N!=="")console.warn("THREE.WebGLProgram: Program Info Log:",N);else if(C===""||m==="")W0=!1;if(W0)this.diagnostics={runnable:e,programLog:N,vertexShader:{log:C,prefix:E},fragmentShader:{log:m,prefix:q}}}W.deleteShader(L),W.deleteShader(w);let g;this.getUniforms=function(){if(g===void 0)g=new x6(W,O);return g};let u;return this.getAttributes=function(){if(u===void 0)u=WW(W,O);return u},this.destroy=function(){Q.releaseStatesOfProgram(this),W.deleteProgram(O),this.program=void 0},this.type=Z.shaderType,this.name=Z.shaderName,this.id=aQ++,this.cacheKey=$,this.usedTimes=1,this.program=O,this.vertexShader=L,this.fragmentShader=w,this},NW=function(J,$,Z,Q,W,Y,H){const X=new Q8,K=new I9,G=[],U=W.isWebGL2,V=W.logarithmicDepthBuffer,R=W.vertexTextures;let D=W.precision;const M={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function O(N){if(N===0)return"uv";return`uv${N}`}function E(N,C,m,e,W0){const P=e.fog,l=W0.geometry,n=N.isMeshStandardMaterial?e.environment:null,d=(N.isMeshStandardMaterial?Z:$).get(N.envMap||n),r=!!d&&d.mapping===306?d.image.height:null,p=M[N.type];if(N.precision!==null){if(D=W.getMaxPrecision(N.precision),D!==N.precision)console.warn("THREE.WebGLProgram.getParameters:",N.precision,"not supported, using",D,"instead.")}const T=l.morphAttributes.position||l.morphAttributes.normal||l.morphAttributes.color,h=T!==void 0?T.length:0;let a=0;if(l.morphAttributes.position!==void 0)a=1;if(l.morphAttributes.normal!==void 0)a=2;if(l.morphAttributes.color!==void 0)a=3;let G0,X0,U0,j0;if(p){const u0=AJ[p];G0=u0.vertexShader,X0=u0.fragmentShader}else G0=N.vertexShader,X0=N.fragmentShader,K.update(N),U0=K.getVertexShaderID(N),j0=K.getFragmentShaderID(N);const F0=J.getRenderTarget(),y0=W0.isInstancedMesh===!0,n0=!!N.map,KJ=!!N.matcap,S=!!d,i0=!!N.aoMap,f0=!!N.lightMap,D0=!!N.bumpMap,B0=!!N.normalMap,d0=!!N.displacementMap,T0=!!N.emissiveMap,v0=!!N.metalnessMap,s0=!!N.roughnessMap,p0=N.anisotropy>0,WJ=N.clearcoat>0,_J=N.iridescence>0,B=N.sheen>0,F=N.transmission>0,j=p0&&!!N.anisotropyMap,t=WJ&&!!N.clearcoatMap,o=WJ&&!!N.clearcoatNormalMap,i=WJ&&!!N.clearcoatRoughnessMap,R0=_J&&!!N.iridescenceMap,Z0=_J&&!!N.iridescenceThicknessMap,q0=B&&!!N.sheenColorMap,M0=B&&!!N.sheenRoughnessMap,b0=!!N.specularMap,s=!!N.specularColorMap,l0=!!N.specularIntensityMap,C0=F&&!!N.transmissionMap,I0=F&&!!N.thicknessMap,V0=!!N.gradientMap,k=!!N.alphaMap,$0=N.alphaTest>0,J0=!!N.alphaHash,H0=!!N.extensions,Y0=!!l.attributes.uv1,c=!!l.attributes.uv2,E0=!!l.attributes.uv3;let L0=0;if(N.toneMapped){if(F0===null||F0.isXRRenderTarget===!0)L0=J.toneMapping}return{isWebGL2:U,shaderID:p,shaderType:N.type,shaderName:N.name,vertexShader:G0,fragmentShader:X0,defines:N.defines,customVertexShaderID:U0,customFragmentShaderID:j0,isRawShaderMaterial:N.isRawShaderMaterial===!0,glslVersion:N.glslVersion,precision:D,instancing:y0,instancingColor:y0&&W0.instanceColor!==null,supportsVertexTextures:R,outputColorSpace:F0===null?J.outputColorSpace:F0.isXRRenderTarget===!0?F0.texture.colorSpace:"srgb-linear",map:n0,matcap:KJ,envMap:S,envMapMode:S&&d.mapping,envMapCubeUVHeight:r,aoMap:i0,lightMap:f0,bumpMap:D0,normalMap:B0,displacementMap:R&&d0,emissiveMap:T0,normalMapObjectSpace:B0&&N.normalMapType===1,normalMapTangentSpace:B0&&N.normalMapType===0,metalnessMap:v0,roughnessMap:s0,anisotropy:p0,anisotropyMap:j,clearcoat:WJ,clearcoatMap:t,clearcoatNormalMap:o,clearcoatRoughnessMap:i,iridescence:_J,iridescenceMap:R0,iridescenceThicknessMap:Z0,sheen:B,sheenColorMap:q0,sheenRoughnessMap:M0,specularMap:b0,specularColorMap:s,specularIntensityMap:l0,transmission:F,transmissionMap:C0,thicknessMap:I0,gradientMap:V0,opaque:N.transparent===!1&&N.blending===1,alphaMap:k,alphaTest:$0,alphaHash:J0,combine:N.combine,mapUv:n0&&O(N.map.channel),aoMapUv:i0&&O(N.aoMap.channel),lightMapUv:f0&&O(N.lightMap.channel),bumpMapUv:D0&&O(N.bumpMap.channel),normalMapUv:B0&&O(N.normalMap.channel),displacementMapUv:d0&&O(N.displacementMap.channel),emissiveMapUv:T0&&O(N.emissiveMap.channel),metalnessMapUv:v0&&O(N.metalnessMap.channel),roughnessMapUv:s0&&O(N.roughnessMap.channel),anisotropyMapUv:j&&O(N.anisotropyMap.channel),clearcoatMapUv:t&&O(N.clearcoatMap.channel),clearcoatNormalMapUv:o&&O(N.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:i&&O(N.clearcoatRoughnessMap.channel),iridescenceMapUv:R0&&O(N.iridescenceMap.channel),iridescenceThicknessMapUv:Z0&&O(N.iridescenceThicknessMap.channel),sheenColorMapUv:q0&&O(N.sheenColorMap.channel),sheenRoughnessMapUv:M0&&O(N.sheenRoughnessMap.channel),specularMapUv:b0&&O(N.specularMap.channel),specularColorMapUv:s&&O(N.specularColorMap.channel),specularIntensityMapUv:l0&&O(N.specularIntensityMap.channel),transmissionMapUv:C0&&O(N.transmissionMap.channel),thicknessMapUv:I0&&O(N.thicknessMap.channel),alphaMapUv:k&&O(N.alphaMap.channel),vertexTangents:!!l.attributes.tangent&&(B0||p0),vertexColors:N.vertexColors,vertexAlphas:N.vertexColors===!0&&!!l.attributes.color&&l.attributes.color.itemSize===4,vertexUv1s:Y0,vertexUv2s:c,vertexUv3s:E0,pointsUvs:W0.isPoints===!0&&!!l.attributes.uv&&(n0||k),fog:!!P,useFog:N.fog===!0,fogExp2:P&&P.isFogExp2,flatShading:N.flatShading===!0,sizeAttenuation:N.sizeAttenuation===!0,logarithmicDepthBuffer:V,skinning:W0.isSkinnedMesh===!0,morphTargets:l.morphAttributes.position!==void 0,morphNormals:l.morphAttributes.normal!==void 0,morphColors:l.morphAttributes.color!==void 0,morphTargetsCount:h,morphTextureStride:a,numDirLights:C.directional.length,numPointLights:C.point.length,numSpotLights:C.spot.length,numSpotLightMaps:C.spotLightMap.length,numRectAreaLights:C.rectArea.length,numHemiLights:C.hemi.length,numDirLightShadows:C.directionalShadowMap.length,numPointLightShadows:C.pointShadowMap.length,numSpotLightShadows:C.spotShadowMap.length,numSpotLightShadowsWithMaps:C.numSpotLightShadowsWithMaps,numLightProbes:C.numLightProbes,numClippingPlanes:H.numPlanes,numClipIntersection:H.numIntersection,dithering:N.dithering,shadowMapEnabled:J.shadowMap.enabled&&m.length>0,shadowMapType:J.shadowMap.type,toneMapping:L0,useLegacyLights:J._useLegacyLights,decodeVideoTexture:n0&&N.map.isVideoTexture===!0&&h0.getTransfer(N.map.colorSpace)==="srgb",premultipliedAlpha:N.premultipliedAlpha,doubleSided:N.side===2,flipSided:N.side===1,useDepthPacking:N.depthPacking>=0,depthPacking:N.depthPacking||0,index0AttributeName:N.index0AttributeName,extensionDerivatives:H0&&N.extensions.derivatives===!0,extensionFragDepth:H0&&N.extensions.fragDepth===!0,extensionDrawBuffers:H0&&N.extensions.drawBuffers===!0,extensionShaderTextureLOD:H0&&N.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:U||Q.has("EXT_frag_depth"),rendererExtensionDrawBuffers:U||Q.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:U||Q.has("EXT_shader_texture_lod"),customProgramCacheKey:N.customProgramCacheKey()}}function q(N){const C=[];if(N.shaderID)C.push(N.shaderID);else C.push(N.customVertexShaderID),C.push(N.customFragmentShaderID);if(N.defines!==void 0)for(let m in N.defines)C.push(m),C.push(N.defines[m]);if(N.isRawShaderMaterial===!1)I(C,N),z(C,N),C.push(J.outputColorSpace);return C.push(N.customProgramCacheKey),C.join()}function I(N,C){N.push(C.precision),N.push(C.outputColorSpace),N.push(C.envMapMode),N.push(C.envMapCubeUVHeight),N.push(C.mapUv),N.push(C.alphaMapUv),N.push(C.lightMapUv),N.push(C.aoMapUv),N.push(C.bumpMapUv),N.push(C.normalMapUv),N.push(C.displacementMapUv),N.push(C.emissiveMapUv),N.push(C.metalnessMapUv),N.push(C.roughnessMapUv),N.push(C.anisotropyMapUv),N.push(C.clearcoatMapUv),N.push(C.clearcoatNormalMapUv),N.push(C.clearcoatRoughnessMapUv),N.push(C.iridescenceMapUv),N.push(C.iridescenceThicknessMapUv),N.push(C.sheenColorMapUv),N.push(C.sheenRoughnessMapUv),N.push(C.specularMapUv),N.push(C.specularColorMapUv),N.push(C.specularIntensityMapUv),N.push(C.transmissionMapUv),N.push(C.thicknessMapUv),N.push(C.combine),N.push(C.fogExp2),N.push(C.sizeAttenuation),N.push(C.morphTargetsCount),N.push(C.morphAttributeCount),N.push(C.numDirLights),N.push(C.numPointLights),N.push(C.numSpotLights),N.push(C.numSpotLightMaps),N.push(C.numHemiLights),N.push(C.numRectAreaLights),N.push(C.numDirLightShadows),N.push(C.numPointLightShadows),N.push(C.numSpotLightShadows),N.push(C.numSpotLightShadowsWithMaps),N.push(C.numLightProbes),N.push(C.shadowMapType),N.push(C.toneMapping),N.push(C.numClippingPlanes),N.push(C.numClipIntersection),N.push(C.depthPacking)}function z(N,C){if(X.disableAll(),C.isWebGL2)X.enable(0);if(C.supportsVertexTextures)X.enable(1);if(C.instancing)X.enable(2);if(C.instancingColor)X.enable(3);if(C.matcap)X.enable(4);if(C.envMap)X.enable(5);if(C.normalMapObjectSpace)X.enable(6);if(C.normalMapTangentSpace)X.enable(7);if(C.clearcoat)X.enable(8);if(C.iridescence)X.enable(9);if(C.alphaTest)X.enable(10);if(C.vertexColors)X.enable(11);if(C.vertexAlphas)X.enable(12);if(C.vertexUv1s)X.enable(13);if(C.vertexUv2s)X.enable(14);if(C.vertexUv3s)X.enable(15);if(C.vertexTangents)X.enable(16);if(C.anisotropy)X.enable(17);if(N.push(X.mask),X.disableAll(),C.fog)X.enable(0);if(C.useFog)X.enable(1);if(C.flatShading)X.enable(2);if(C.logarithmicDepthBuffer)X.enable(3);if(C.skinning)X.enable(4);if(C.morphTargets)X.enable(5);if(C.morphNormals)X.enable(6);if(C.morphColors)X.enable(7);if(C.premultipliedAlpha)X.enable(8);if(C.shadowMapEnabled)X.enable(9);if(C.useLegacyLights)X.enable(10);if(C.doubleSided)X.enable(11);if(C.flipSided)X.enable(12);if(C.useDepthPacking)X.enable(13);if(C.dithering)X.enable(14);if(C.transmission)X.enable(15);if(C.sheen)X.enable(16);if(C.opaque)X.enable(17);if(C.pointsUvs)X.enable(18);if(C.decodeVideoTexture)X.enable(19);N.push(X.mask)}function A(N){const C=M[N.type];let m;if(C){const e=AJ[C];m=V$.clone(e.uniforms)}else m=N.uniforms;return m}function L(N,C){let m;for(let e=0,W0=G.length;e0)Q.push(q);else if(D.transparent===!0)W.push(q);else Z.push(q)}function K(V,R,D,M,O,E){const q=H(V,R,D,M,O,E);if(D.transmission>0)Q.unshift(q);else if(D.transparent===!0)W.unshift(q);else Z.unshift(q)}function G(V,R){if(Z.length>1)Z.sort(V||MW);if(Q.length>1)Q.sort(R||Z9);if(W.length>1)W.sort(R||Z9)}function U(){for(let V=$,R=J.length;V=Y.length)H=new Q9,Y.push(H);else H=Y[W];return H}function Z(){J=new WeakMap}return{get:$,dispose:Z}},zW=function(){const J={};return{get:function($){if(J[$.id]!==void 0)return J[$.id];let Z;switch($.type){case"DirectionalLight":Z={direction:new v,color:new g0};break;case"SpotLight":Z={position:new v,direction:new v,color:new g0,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":Z={position:new v,color:new g0,distance:0,decay:0};break;case"HemisphereLight":Z={direction:new v,skyColor:new g0,groundColor:new g0};break;case"RectAreaLight":Z={color:new g0,position:new v,halfWidth:new v,halfHeight:new v};break}return J[$.id]=Z,Z}}},BW=function(){const J={};return{get:function($){if(J[$.id]!==void 0)return J[$.id];let Z;switch($.type){case"DirectionalLight":Z={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new m0};break;case"SpotLight":Z={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new m0};break;case"PointLight":Z={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new m0,shadowCameraNear:1,shadowCameraFar:1000};break}return J[$.id]=Z,Z}}},wW=function(J,$){return($.castShadow?2:0)-(J.castShadow?2:0)+($.map?1:0)-(J.map?1:0)},kW=function(J,$){const Z=new zW,Q=BW(),W={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let U=0;U<9;U++)W.probe.push(new v);const Y=new v,H=new ZJ,X=new ZJ;function K(U,V){let R=0,D=0,M=0;for(let e=0;e<9;e++)W.probe[e].set(0,0,0);let O=0,E=0,q=0,I=0,z=0,A=0,L=0,w=0,g=0,u=0,N=0;U.sort(wW);const C=V===!0?Math.PI:1;for(let e=0,W0=U.length;e0)if($.isWebGL2)W.rectAreaLTC1=Q0.LTC_FLOAT_1,W.rectAreaLTC2=Q0.LTC_FLOAT_2;else if(J.has("OES_texture_float_linear")===!0)W.rectAreaLTC1=Q0.LTC_FLOAT_1,W.rectAreaLTC2=Q0.LTC_FLOAT_2;else if(J.has("OES_texture_half_float_linear")===!0)W.rectAreaLTC1=Q0.LTC_HALF_1,W.rectAreaLTC2=Q0.LTC_HALF_2;else console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.");W.ambient[0]=R,W.ambient[1]=D,W.ambient[2]=M;const m=W.hash;if(m.directionalLength!==O||m.pointLength!==E||m.spotLength!==q||m.rectAreaLength!==I||m.hemiLength!==z||m.numDirectionalShadows!==A||m.numPointShadows!==L||m.numSpotShadows!==w||m.numSpotMaps!==g||m.numLightProbes!==N)W.directional.length=O,W.spot.length=q,W.rectArea.length=I,W.point.length=E,W.hemi.length=z,W.directionalShadow.length=A,W.directionalShadowMap.length=A,W.pointShadow.length=L,W.pointShadowMap.length=L,W.spotShadow.length=w,W.spotShadowMap.length=w,W.directionalShadowMatrix.length=A,W.pointShadowMatrix.length=L,W.spotLightMatrix.length=w+g-u,W.spotLightMap.length=g,W.numSpotLightShadowsWithMaps=u,W.numLightProbes=N,m.directionalLength=O,m.pointLength=E,m.spotLength=q,m.rectAreaLength=I,m.hemiLength=z,m.numDirectionalShadows=A,m.numPointShadows=L,m.numSpotShadows=w,m.numSpotMaps=g,m.numLightProbes=N,W.version=IW++}function G(U,V){let R=0,D=0,M=0,O=0,E=0;const q=V.matrixWorldInverse;for(let I=0,z=U.length;I=X.length)K=new W9(J,$),X.push(K);else K=X[H];return K}function W(){Z=new WeakMap}return{get:Q,dispose:W}},PW=function(J,$,Z){let Q=new G8;const W=new m0,Y=new m0,H=new QJ,X=new k9({depthPacking:3201}),K=new C9,G={},U=Z.maxTextureSize,V={[0]:1,[1]:0,[2]:2},R=new sJ({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new m0},radius:{value:4}},vertexShader:LW,fragmentShader:AW}),D=R.clone();D.defines.HORIZONTAL_PASS=1;const M=new PJ;M.setAttribute("position",new CJ(new Float32Array([-1,-1,0.5,3,-1,0.5,-1,3,0.5]),3));const O=new hJ(M,R),E=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let q=this.type;this.render=function(L,w,g){if(E.enabled===!1)return;if(E.autoUpdate===!1&&E.needsUpdate===!1)return;if(L.length===0)return;const u=J.getRenderTarget(),N=J.getActiveCubeFace(),C=J.getActiveMipmapLevel(),m=J.state;m.setBlending(0),m.buffers.color.setClear(1,1,1,1),m.buffers.depth.setTest(!0),m.setScissorTest(!1);const e=q!==3&&this.type===3,W0=q===3&&this.type!==3;for(let P=0,l=L.length;PU||W.y>U){if(W.x>U)Y.x=Math.floor(U/r.x),W.x=Y.x*r.x,d.mapSize.x=Y.x;if(W.y>U)Y.y=Math.floor(U/r.y),W.y=Y.y*r.y,d.mapSize.y=Y.y}if(d.map===null||e===!0||W0===!0){const T=this.type!==3?{minFilter:1003,magFilter:1003}:{};if(d.map!==null)d.map.dispose();d.map=new nJ(W.x,W.y,T),d.map.texture.name=n.name+".shadowMap",d.camera.updateProjectionMatrix()}J.setRenderTarget(d.map),J.clear();const p=d.getViewportCount();for(let T=0;T0||w.map&&w.alphaTest>0){const m=N.uuid,e=w.uuid;let W0=G[m];if(W0===void 0)W0={},G[m]=W0;let P=W0[e];if(P===void 0)P=N.clone(),W0[e]=P;N=P}if(N.visible=w.visible,N.wireframe=w.wireframe,u===3)N.side=w.shadowSide!==null?w.shadowSide:w.side;else N.side=w.shadowSide!==null?w.shadowSide:V[w.side];if(N.alphaMap=w.alphaMap,N.alphaTest=w.alphaTest,N.map=w.map,N.clipShadows=w.clipShadows,N.clippingPlanes=w.clippingPlanes,N.clipIntersection=w.clipIntersection,N.displacementMap=w.displacementMap,N.displacementScale=w.displacementScale,N.displacementBias=w.displacementBias,N.wireframeLinewidth=w.wireframeLinewidth,N.linewidth=w.linewidth,g.isPointLight===!0&&N.isMeshDistanceMaterial===!0){const m=J.properties.get(N);m.light=g}return N}function A(L,w,g,u,N){if(L.visible===!1)return;if(L.layers.test(w.layers)&&(L.isMesh||L.isLine||L.isPoints)){if((L.castShadow||L.receiveShadow&&N===3)&&(!L.frustumCulled||Q.intersectsObject(L))){L.modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,L.matrixWorld);const e=$.update(L),W0=L.material;if(Array.isArray(W0)){const P=e.groups;for(let l=0,n=P.length;l=1;else if(r.indexOf("OpenGL ES")!==-1)d=parseFloat(/^OpenGL ES (\d)/.exec(r)[1]),n=d>=2;let p=null,T={};const h=J.getParameter(J.SCISSOR_BOX),a=J.getParameter(J.VIEWPORT),G0=new QJ().fromArray(h),X0=new QJ().fromArray(a);function U0(k,$0,J0,H0){const Y0=new Uint8Array(4),c=J.createTexture();J.bindTexture(k,c),J.texParameteri(k,J.TEXTURE_MIN_FILTER,J.NEAREST),J.texParameteri(k,J.TEXTURE_MAG_FILTER,J.NEAREST);for(let E0=0;E0t||B.height>t)o=t/Math.max(B.width,B.height);if(o<1||F===!0)if(typeof HTMLImageElement!=="undefined"&&B instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&B instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&B instanceof ImageBitmap){const i=F?i7:Math.floor,R0=i(o*B.width),Z0=i(o*B.height);if(O===void 0)O=I(R0,Z0);const q0=j?I(R0,Z0):O;return q0.width=R0,q0.height=Z0,q0.getContext("2d").drawImage(B,0,0,R0,Z0),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+B.width+"x"+B.height+") to ("+R0+"x"+Z0+")."),q0}else{if("data"in B)console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+B.width+"x"+B.height+").");return B}return B}function A(B){return z8(B.width)&&z8(B.height)}function L(B){if(X)return!1;return B.wrapS!==1001||B.wrapT!==1001||B.minFilter!==1003&&B.minFilter!==1006}function w(B,F){return B.generateMipmaps&&F&&B.minFilter!==1003&&B.minFilter!==1006}function g(B){J.generateMipmap(B)}function u(B,F,j,t,o=!1){if(X===!1)return F;if(B!==null){if(J[B]!==void 0)return J[B];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \'"+B+"\'")}let i=F;if(F===J.RED){if(j===J.FLOAT)i=J.R32F;if(j===J.HALF_FLOAT)i=J.R16F;if(j===J.UNSIGNED_BYTE)i=J.R8}if(F===J.RED_INTEGER){if(j===J.UNSIGNED_BYTE)i=J.R8UI;if(j===J.UNSIGNED_SHORT)i=J.R16UI;if(j===J.UNSIGNED_INT)i=J.R32UI;if(j===J.BYTE)i=J.R8I;if(j===J.SHORT)i=J.R16I;if(j===J.INT)i=J.R32I}if(F===J.RG){if(j===J.FLOAT)i=J.RG32F;if(j===J.HALF_FLOAT)i=J.RG16F;if(j===J.UNSIGNED_BYTE)i=J.RG8}if(F===J.RGBA){const R0=o?"linear":h0.getTransfer(t);if(j===J.FLOAT)i=J.RGBA32F;if(j===J.HALF_FLOAT)i=J.RGBA16F;if(j===J.UNSIGNED_BYTE)i=R0==="srgb"?J.SRGB8_ALPHA8:J.RGBA8;if(j===J.UNSIGNED_SHORT_4_4_4_4)i=J.RGBA4;if(j===J.UNSIGNED_SHORT_5_5_5_1)i=J.RGB5_A1}if(i===J.R16F||i===J.R32F||i===J.RG16F||i===J.RG32F||i===J.RGBA16F||i===J.RGBA32F)$.get("EXT_color_buffer_float");return i}function N(B,F,j){if(w(B,j)===!0||B.isFramebufferTexture&&B.minFilter!==1003&&B.minFilter!==1006)return Math.log2(Math.max(F.width,F.height))+1;else if(B.mipmaps!==void 0&&B.mipmaps.length>0)return B.mipmaps.length;else if(B.isCompressedTexture&&Array.isArray(B.image))return F.mipmaps.length;else return 1}function C(B){if(B===1003||B===1004||B===1005)return J.NEAREST;return J.LINEAR}function m(B){const F=B.target;if(F.removeEventListener("dispose",m),W0(F),F.isVideoTexture)M.delete(F)}function e(B){const F=B.target;F.removeEventListener("dispose",e),l(F)}function W0(B){const F=Q.get(B);if(F.__webglInit===void 0)return;const j=B.source,t=E.get(j);if(t){const o=t[F.__cacheKey];if(o.usedTimes--,o.usedTimes===0)P(B);if(Object.keys(t).length===0)E.delete(j)}Q.remove(B)}function P(B){const F=Q.get(B);J.deleteTexture(F.__webglTexture);const j=B.source,t=E.get(j);delete t[F.__cacheKey],H.memory.textures--}function l(B){const F=B.texture,j=Q.get(B),t=Q.get(F);if(t.__webglTexture!==void 0)J.deleteTexture(t.__webglTexture),H.memory.textures--;if(B.depthTexture)B.depthTexture.dispose();if(B.isWebGLCubeRenderTarget)for(let o=0;o<6;o++){if(Array.isArray(j.__webglFramebuffer[o]))for(let i=0;i=K)console.warn("THREE.WebGLTextures: Trying to use "+B+" texture units while this GPU supports only "+K);return n+=1,B}function p(B){const F=[];return F.push(B.wrapS),F.push(B.wrapT),F.push(B.wrapR||0),F.push(B.magFilter),F.push(B.minFilter),F.push(B.anisotropy),F.push(B.internalFormat),F.push(B.format),F.push(B.type),F.push(B.generateMipmaps),F.push(B.premultiplyAlpha),F.push(B.flipY),F.push(B.unpackAlignment),F.push(B.colorSpace),F.join()}function T(B,F){const j=Q.get(B);if(B.isVideoTexture)WJ(B);if(B.isRenderTargetTexture===!1&&B.version>0&&j.__version!==B.version){const t=B.image;if(t===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(t.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{n0(j,B,F);return}}Z.bindTexture(J.TEXTURE_2D,j.__webglTexture,J.TEXTURE0+F)}function h(B,F){const j=Q.get(B);if(B.version>0&&j.__version!==B.version){n0(j,B,F);return}Z.bindTexture(J.TEXTURE_2D_ARRAY,j.__webglTexture,J.TEXTURE0+F)}function a(B,F){const j=Q.get(B);if(B.version>0&&j.__version!==B.version){n0(j,B,F);return}Z.bindTexture(J.TEXTURE_3D,j.__webglTexture,J.TEXTURE0+F)}function G0(B,F){const j=Q.get(B);if(B.version>0&&j.__version!==B.version){KJ(j,B,F);return}Z.bindTexture(J.TEXTURE_CUBE_MAP,j.__webglTexture,J.TEXTURE0+F)}const X0={[1000]:J.REPEAT,[1001]:J.CLAMP_TO_EDGE,[1002]:J.MIRRORED_REPEAT},U0={[1003]:J.NEAREST,[1004]:J.NEAREST_MIPMAP_NEAREST,[1005]:J.NEAREST_MIPMAP_LINEAR,[1006]:J.LINEAR,[1007]:J.LINEAR_MIPMAP_NEAREST,[1008]:J.LINEAR_MIPMAP_LINEAR},j0={[512]:J.NEVER,[519]:J.ALWAYS,[513]:J.LESS,[515]:J.LEQUAL,[514]:J.EQUAL,[518]:J.GEQUAL,[516]:J.GREATER,[517]:J.NOTEQUAL};function F0(B,F,j){if(j){if(J.texParameteri(B,J.TEXTURE_WRAP_S,X0[F.wrapS]),J.texParameteri(B,J.TEXTURE_WRAP_T,X0[F.wrapT]),B===J.TEXTURE_3D||B===J.TEXTURE_2D_ARRAY)J.texParameteri(B,J.TEXTURE_WRAP_R,X0[F.wrapR]);J.texParameteri(B,J.TEXTURE_MAG_FILTER,U0[F.magFilter]),J.texParameteri(B,J.TEXTURE_MIN_FILTER,U0[F.minFilter])}else{if(J.texParameteri(B,J.TEXTURE_WRAP_S,J.CLAMP_TO_EDGE),J.texParameteri(B,J.TEXTURE_WRAP_T,J.CLAMP_TO_EDGE),B===J.TEXTURE_3D||B===J.TEXTURE_2D_ARRAY)J.texParameteri(B,J.TEXTURE_WRAP_R,J.CLAMP_TO_EDGE);if(F.wrapS!==1001||F.wrapT!==1001)console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.");if(J.texParameteri(B,J.TEXTURE_MAG_FILTER,C(F.magFilter)),J.texParameteri(B,J.TEXTURE_MIN_FILTER,C(F.minFilter)),F.minFilter!==1003&&F.minFilter!==1006)console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")}if(F.compareFunction)J.texParameteri(B,J.TEXTURE_COMPARE_MODE,J.COMPARE_REF_TO_TEXTURE),J.texParameteri(B,J.TEXTURE_COMPARE_FUNC,j0[F.compareFunction]);if($.has("EXT_texture_filter_anisotropic")===!0){const t=$.get("EXT_texture_filter_anisotropic");if(F.magFilter===1003)return;if(F.minFilter!==1005&&F.minFilter!==1008)return;if(F.type===1015&&$.has("OES_texture_float_linear")===!1)return;if(X===!1&&(F.type===1016&&$.has("OES_texture_half_float_linear")===!1))return;if(F.anisotropy>1||Q.get(F).__currentAnisotropy)J.texParameterf(B,t.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(F.anisotropy,W.getMaxAnisotropy())),Q.get(F).__currentAnisotropy=F.anisotropy}}function y0(B,F){let j=!1;if(B.__webglInit===void 0)B.__webglInit=!0,F.addEventListener("dispose",m);const t=F.source;let o=E.get(t);if(o===void 0)o={},E.set(t,o);const i=p(F);if(i!==B.__cacheKey){if(o[i]===void 0)o[i]={texture:J.createTexture(),usedTimes:0},H.memory.textures++,j=!0;o[i].usedTimes++;const R0=o[B.__cacheKey];if(R0!==void 0){if(o[B.__cacheKey].usedTimes--,R0.usedTimes===0)P(F)}B.__cacheKey=i,B.__webglTexture=o[i].texture}return j}function n0(B,F,j){let t=J.TEXTURE_2D;if(F.isDataArrayTexture||F.isCompressedArrayTexture)t=J.TEXTURE_2D_ARRAY;if(F.isData3DTexture)t=J.TEXTURE_3D;const o=y0(B,F),i=F.source;Z.bindTexture(t,B.__webglTexture,J.TEXTURE0+j);const R0=Q.get(i);if(i.version!==R0.__version||o===!0){Z.activeTexture(J.TEXTURE0+j);const Z0=h0.getPrimaries(h0.workingColorSpace),q0=F.colorSpace===""?null:h0.getPrimaries(F.colorSpace),M0=F.colorSpace===""||Z0===q0?J.NONE:J.BROWSER_DEFAULT_WEBGL;J.pixelStorei(J.UNPACK_FLIP_Y_WEBGL,F.flipY),J.pixelStorei(J.UNPACK_PREMULTIPLY_ALPHA_WEBGL,F.premultiplyAlpha),J.pixelStorei(J.UNPACK_ALIGNMENT,F.unpackAlignment),J.pixelStorei(J.UNPACK_COLORSPACE_CONVERSION_WEBGL,M0);const b0=L(F)&&A(F.image)===!1;let s=z(F.image,b0,!1,U);s=_J(F,s);const l0=A(s)||X,C0=Y.convert(F.format,F.colorSpace);let I0=Y.convert(F.type),V0=u(F.internalFormat,C0,I0,F.colorSpace,F.isVideoTexture);F0(t,F,l0);let k;const $0=F.mipmaps,J0=X&&F.isVideoTexture!==!0,H0=R0.__version===void 0||o===!0,Y0=N(F,s,l0);if(F.isDepthTexture){if(V0=J.DEPTH_COMPONENT,X)if(F.type===1015)V0=J.DEPTH_COMPONENT32F;else if(F.type===1014)V0=J.DEPTH_COMPONENT24;else if(F.type===1020)V0=J.DEPTH24_STENCIL8;else V0=J.DEPTH_COMPONENT16;else if(F.type===1015)console.error("WebGLRenderer: Floating point depth texture requires WebGL2.");if(F.format===1026&&V0===J.DEPTH_COMPONENT){if(F.type!==1012&&F.type!==1014)console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),F.type=1014,I0=Y.convert(F.type)}if(F.format===1027&&V0===J.DEPTH_COMPONENT){if(V0=J.DEPTH_STENCIL,F.type!==1020)console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),F.type=1020,I0=Y.convert(F.type)}if(H0)if(J0)Z.texStorage2D(J.TEXTURE_2D,1,V0,s.width,s.height);else Z.texImage2D(J.TEXTURE_2D,0,V0,s.width,s.height,0,C0,I0,null)}else if(F.isDataTexture)if($0.length>0&&l0){if(J0&&H0)Z.texStorage2D(J.TEXTURE_2D,Y0,V0,$0[0].width,$0[0].height);for(let c=0,E0=$0.length;c>=1,E0>>=1}}else if($0.length>0&&l0){if(J0&&H0)Z.texStorage2D(J.TEXTURE_2D,Y0,V0,$0[0].width,$0[0].height);for(let c=0,E0=$0.length;c0)H0++;Z.texStorage2D(J.TEXTURE_CUBE_MAP,H0,k,s[0].width,s[0].height)}for(let c=0;c<6;c++)if(b0){if($0)Z.texSubImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+c,0,0,0,s[c].width,s[c].height,I0,V0,s[c].data);else Z.texImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+c,0,k,s[c].width,s[c].height,0,I0,V0,s[c].data);for(let E0=0;E0>i),s=Math.max(1,F.height>>i);if(o===J.TEXTURE_3D||o===J.TEXTURE_2D_ARRAY)Z.texImage3D(o,i,q0,b0,s,F.depth,0,R0,Z0,null);else Z.texImage2D(o,i,q0,b0,s,0,R0,Z0,null)}if(Z.bindFramebuffer(J.FRAMEBUFFER,B),p0(F))R.framebufferTexture2DMultisampleEXT(J.FRAMEBUFFER,t,o,Q.get(j).__webglTexture,0,s0(F));else if(o===J.TEXTURE_2D||o>=J.TEXTURE_CUBE_MAP_POSITIVE_X&&o<=J.TEXTURE_CUBE_MAP_NEGATIVE_Z)J.framebufferTexture2D(J.FRAMEBUFFER,t,o,Q.get(j).__webglTexture,i);Z.bindFramebuffer(J.FRAMEBUFFER,null)}function i0(B,F,j){if(J.bindRenderbuffer(J.RENDERBUFFER,B),F.depthBuffer&&!F.stencilBuffer){let t=X===!0?J.DEPTH_COMPONENT24:J.DEPTH_COMPONENT16;if(j||p0(F)){const o=F.depthTexture;if(o&&o.isDepthTexture){if(o.type===1015)t=J.DEPTH_COMPONENT32F;else if(o.type===1014)t=J.DEPTH_COMPONENT24}const i=s0(F);if(p0(F))R.renderbufferStorageMultisampleEXT(J.RENDERBUFFER,i,t,F.width,F.height);else J.renderbufferStorageMultisample(J.RENDERBUFFER,i,t,F.width,F.height)}else J.renderbufferStorage(J.RENDERBUFFER,t,F.width,F.height);J.framebufferRenderbuffer(J.FRAMEBUFFER,J.DEPTH_ATTACHMENT,J.RENDERBUFFER,B)}else if(F.depthBuffer&&F.stencilBuffer){const t=s0(F);if(j&&p0(F)===!1)J.renderbufferStorageMultisample(J.RENDERBUFFER,t,J.DEPTH24_STENCIL8,F.width,F.height);else if(p0(F))R.renderbufferStorageMultisampleEXT(J.RENDERBUFFER,t,J.DEPTH24_STENCIL8,F.width,F.height);else J.renderbufferStorage(J.RENDERBUFFER,J.DEPTH_STENCIL,F.width,F.height);J.framebufferRenderbuffer(J.FRAMEBUFFER,J.DEPTH_STENCIL_ATTACHMENT,J.RENDERBUFFER,B)}else{const t=F.isWebGLMultipleRenderTargets===!0?F.texture:[F.texture];for(let o=0;o0){j.__webglFramebuffer[Z0]=[];for(let q0=0;q00){j.__webglFramebuffer=[];for(let Z0=0;Z00&&p0(B)===!1){const Z0=i?F:[F];j.__webglMultisampledFramebuffer=J.createFramebuffer(),j.__webglColorRenderbuffer=[],Z.bindFramebuffer(J.FRAMEBUFFER,j.__webglMultisampledFramebuffer);for(let q0=0;q00)for(let q0=0;q00)for(let q0=0;q00&&p0(B)===!1){const F=B.isWebGLMultipleRenderTargets?B.texture:[B.texture],j=B.width,t=B.height;let o=J.COLOR_BUFFER_BIT;const i=[],R0=B.stencilBuffer?J.DEPTH_STENCIL_ATTACHMENT:J.DEPTH_ATTACHMENT,Z0=Q.get(B),q0=B.isWebGLMultipleRenderTargets===!0;if(q0)for(let M0=0;M00&&$.has("WEBGL_multisampled_render_to_texture")===!0&&F.__useRenderToTexture!==!1}function WJ(B){const F=H.render.frame;if(M.get(B)!==F)M.set(B,F),B.update()}function _J(B,F){const{colorSpace:j,format:t,type:o}=B;if(B.isCompressedTexture===!0||B.isVideoTexture===!0||B.format===1035)return F;if(j!=="srgb-linear"&&j!=="")if(h0.getTransfer(j)==="srgb"){if(X===!1)if($.has("EXT_sRGB")===!0&&t===1023)B.format=1035,B.minFilter=1006,B.generateMipmaps=!1;else F=e7.sRGBToLinear(F);else if(t!==1023||o!==1009)console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.")}else console.error("THREE.WebGLTextures: Unsupported texture color space:",j);return F}this.allocateTextureUnit=r,this.resetTextureUnits=d,this.setTexture2D=T,this.setTexture2DArray=h,this.setTexture3D=a,this.setTextureCube=G0,this.rebindTextures=B0,this.setupRenderTarget=d0,this.updateRenderTargetMipmap=T0,this.updateMultisampleRenderTarget=v0,this.setupDepthRenderbuffer=D0,this.setupFrameBufferTexture=S,this.useMultisampledRTT=p0},yW=function(J,$,Z){const Q=Z.isWebGL2;function W(Y,H=""){let X;const K=h0.getTransfer(H);if(Y===1009)return J.UNSIGNED_BYTE;if(Y===1017)return J.UNSIGNED_SHORT_4_4_4_4;if(Y===1018)return J.UNSIGNED_SHORT_5_5_5_1;if(Y===1010)return J.BYTE;if(Y===1011)return J.SHORT;if(Y===1012)return J.UNSIGNED_SHORT;if(Y===1013)return J.INT;if(Y===1014)return J.UNSIGNED_INT;if(Y===1015)return J.FLOAT;if(Y===1016){if(Q)return J.HALF_FLOAT;if(X=$.get("OES_texture_half_float"),X!==null)return X.HALF_FLOAT_OES;else return null}if(Y===1021)return J.ALPHA;if(Y===1023)return J.RGBA;if(Y===1024)return J.LUMINANCE;if(Y===1025)return J.LUMINANCE_ALPHA;if(Y===1026)return J.DEPTH_COMPONENT;if(Y===1027)return J.DEPTH_STENCIL;if(Y===1035)if(X=$.get("EXT_sRGB"),X!==null)return X.SRGB_ALPHA_EXT;else return null;if(Y===1028)return J.RED;if(Y===1029)return J.RED_INTEGER;if(Y===1030)return J.RG;if(Y===1031)return J.RG_INTEGER;if(Y===1033)return J.RGBA_INTEGER;if(Y===33776||Y===33777||Y===33778||Y===33779)if(K==="srgb")if(X=$.get("WEBGL_compressed_texture_s3tc_srgb"),X!==null){if(Y===33776)return X.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(Y===33777)return X.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(Y===33778)return X.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(Y===33779)return X.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(X=$.get("WEBGL_compressed_texture_s3tc"),X!==null){if(Y===33776)return X.COMPRESSED_RGB_S3TC_DXT1_EXT;if(Y===33777)return X.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(Y===33778)return X.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(Y===33779)return X.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(Y===35840||Y===35841||Y===35842||Y===35843)if(X=$.get("WEBGL_compressed_texture_pvrtc"),X!==null){if(Y===35840)return X.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(Y===35841)return X.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(Y===35842)return X.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(Y===35843)return X.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(Y===36196)if(X=$.get("WEBGL_compressed_texture_etc1"),X!==null)return X.COMPRESSED_RGB_ETC1_WEBGL;else return null;if(Y===37492||Y===37496)if(X=$.get("WEBGL_compressed_texture_etc"),X!==null){if(Y===37492)return K==="srgb"?X.COMPRESSED_SRGB8_ETC2:X.COMPRESSED_RGB8_ETC2;if(Y===37496)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:X.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(Y===37808||Y===37809||Y===37810||Y===37811||Y===37812||Y===37813||Y===37814||Y===37815||Y===37816||Y===37817||Y===37818||Y===37819||Y===37820||Y===37821)if(X=$.get("WEBGL_compressed_texture_astc"),X!==null){if(Y===37808)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:X.COMPRESSED_RGBA_ASTC_4x4_KHR;if(Y===37809)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:X.COMPRESSED_RGBA_ASTC_5x4_KHR;if(Y===37810)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:X.COMPRESSED_RGBA_ASTC_5x5_KHR;if(Y===37811)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:X.COMPRESSED_RGBA_ASTC_6x5_KHR;if(Y===37812)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:X.COMPRESSED_RGBA_ASTC_6x6_KHR;if(Y===37813)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:X.COMPRESSED_RGBA_ASTC_8x5_KHR;if(Y===37814)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:X.COMPRESSED_RGBA_ASTC_8x6_KHR;if(Y===37815)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:X.COMPRESSED_RGBA_ASTC_8x8_KHR;if(Y===37816)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:X.COMPRESSED_RGBA_ASTC_10x5_KHR;if(Y===37817)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:X.COMPRESSED_RGBA_ASTC_10x6_KHR;if(Y===37818)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:X.COMPRESSED_RGBA_ASTC_10x8_KHR;if(Y===37819)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:X.COMPRESSED_RGBA_ASTC_10x10_KHR;if(Y===37820)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:X.COMPRESSED_RGBA_ASTC_12x10_KHR;if(Y===37821)return K==="srgb"?X.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:X.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(Y===36492||Y===36494||Y===36495)if(X=$.get("EXT_texture_compression_bptc"),X!==null){if(Y===36492)return K==="srgb"?X.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:X.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(Y===36494)return X.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(Y===36495)return X.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(Y===36283||Y===36284||Y===36285||Y===36286)if(X=$.get("EXT_texture_compression_rgtc"),X!==null){if(Y===36492)return X.COMPRESSED_RED_RGTC1_EXT;if(Y===36284)return X.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(Y===36285)return X.COMPRESSED_RED_GREEN_RGTC2_EXT;if(Y===36286)return X.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;if(Y===1020){if(Q)return J.UNSIGNED_INT_24_8;if(X=$.get("WEBGL_depth_texture"),X!==null)return X.UNSIGNED_INT_24_8_WEBGL;else return null}return J[Y]!==void 0?J[Y]:null}return{convert:W}},vW=function(J,$){function Z(E,q){if(E.matrixAutoUpdate===!0)E.updateMatrix();q.value.copy(E.matrix)}function Q(E,q){if(q.color.getRGB(E.fogColor.value,U9(J)),q.isFog)E.fogNear.value=q.near,E.fogFar.value=q.far;else if(q.isFogExp2)E.fogDensity.value=q.density}function W(E,q,I,z,A){if(q.isMeshBasicMaterial)Y(E,q);else if(q.isMeshLambertMaterial)Y(E,q);else if(q.isMeshToonMaterial)Y(E,q),V(E,q);else if(q.isMeshPhongMaterial)Y(E,q),U(E,q);else if(q.isMeshStandardMaterial){if(Y(E,q),R(E,q),q.isMeshPhysicalMaterial)D(E,q,A)}else if(q.isMeshMatcapMaterial)Y(E,q),M(E,q);else if(q.isMeshDepthMaterial)Y(E,q);else if(q.isMeshDistanceMaterial)Y(E,q),O(E,q);else if(q.isMeshNormalMaterial)Y(E,q);else if(q.isLineBasicMaterial){if(H(E,q),q.isLineDashedMaterial)X(E,q)}else if(q.isPointsMaterial)K(E,q,I,z);else if(q.isSpriteMaterial)G(E,q);else if(q.isShadowMaterial)E.color.value.copy(q.color),E.opacity.value=q.opacity;else if(q.isShaderMaterial)q.uniformsNeedUpdate=!1}function Y(E,q){if(E.opacity.value=q.opacity,q.color)E.diffuse.value.copy(q.color);if(q.emissive)E.emissive.value.copy(q.emissive).multiplyScalar(q.emissiveIntensity);if(q.map)E.map.value=q.map,Z(q.map,E.mapTransform);if(q.alphaMap)E.alphaMap.value=q.alphaMap,Z(q.alphaMap,E.alphaMapTransform);if(q.bumpMap){if(E.bumpMap.value=q.bumpMap,Z(q.bumpMap,E.bumpMapTransform),E.bumpScale.value=q.bumpScale,q.side===1)E.bumpScale.value*=-1}if(q.normalMap){if(E.normalMap.value=q.normalMap,Z(q.normalMap,E.normalMapTransform),E.normalScale.value.copy(q.normalScale),q.side===1)E.normalScale.value.negate()}if(q.displacementMap)E.displacementMap.value=q.displacementMap,Z(q.displacementMap,E.displacementMapTransform),E.displacementScale.value=q.displacementScale,E.displacementBias.value=q.displacementBias;if(q.emissiveMap)E.emissiveMap.value=q.emissiveMap,Z(q.emissiveMap,E.emissiveMapTransform);if(q.specularMap)E.specularMap.value=q.specularMap,Z(q.specularMap,E.specularMapTransform);if(q.alphaTest>0)E.alphaTest.value=q.alphaTest;const I=$.get(q).envMap;if(I)E.envMap.value=I,E.flipEnvMap.value=I.isCubeTexture&&I.isRenderTargetTexture===!1?-1:1,E.reflectivity.value=q.reflectivity,E.ior.value=q.ior,E.refractionRatio.value=q.refractionRatio;if(q.lightMap){E.lightMap.value=q.lightMap;const z=J._useLegacyLights===!0?Math.PI:1;E.lightMapIntensity.value=q.lightMapIntensity*z,Z(q.lightMap,E.lightMapTransform)}if(q.aoMap)E.aoMap.value=q.aoMap,E.aoMapIntensity.value=q.aoMapIntensity,Z(q.aoMap,E.aoMapTransform)}function H(E,q){if(E.diffuse.value.copy(q.color),E.opacity.value=q.opacity,q.map)E.map.value=q.map,Z(q.map,E.mapTransform)}function X(E,q){E.dashSize.value=q.dashSize,E.totalSize.value=q.dashSize+q.gapSize,E.scale.value=q.scale}function K(E,q,I,z){if(E.diffuse.value.copy(q.color),E.opacity.value=q.opacity,E.size.value=q.size*I,E.scale.value=z*0.5,q.map)E.map.value=q.map,Z(q.map,E.uvTransform);if(q.alphaMap)E.alphaMap.value=q.alphaMap,Z(q.alphaMap,E.alphaMapTransform);if(q.alphaTest>0)E.alphaTest.value=q.alphaTest}function G(E,q){if(E.diffuse.value.copy(q.color),E.opacity.value=q.opacity,E.rotation.value=q.rotation,q.map)E.map.value=q.map,Z(q.map,E.mapTransform);if(q.alphaMap)E.alphaMap.value=q.alphaMap,Z(q.alphaMap,E.alphaMapTransform);if(q.alphaTest>0)E.alphaTest.value=q.alphaTest}function U(E,q){E.specular.value.copy(q.specular),E.shininess.value=Math.max(q.shininess,0.0001)}function V(E,q){if(q.gradientMap)E.gradientMap.value=q.gradientMap}function R(E,q){if(E.metalness.value=q.metalness,q.metalnessMap)E.metalnessMap.value=q.metalnessMap,Z(q.metalnessMap,E.metalnessMapTransform);if(E.roughness.value=q.roughness,q.roughnessMap)E.roughnessMap.value=q.roughnessMap,Z(q.roughnessMap,E.roughnessMapTransform);if($.get(q).envMap)E.envMapIntensity.value=q.envMapIntensity}function D(E,q,I){if(E.ior.value=q.ior,q.sheen>0){if(E.sheenColor.value.copy(q.sheenColor).multiplyScalar(q.sheen),E.sheenRoughness.value=q.sheenRoughness,q.sheenColorMap)E.sheenColorMap.value=q.sheenColorMap,Z(q.sheenColorMap,E.sheenColorMapTransform);if(q.sheenRoughnessMap)E.sheenRoughnessMap.value=q.sheenRoughnessMap,Z(q.sheenRoughnessMap,E.sheenRoughnessMapTransform)}if(q.clearcoat>0){if(E.clearcoat.value=q.clearcoat,E.clearcoatRoughness.value=q.clearcoatRoughness,q.clearcoatMap)E.clearcoatMap.value=q.clearcoatMap,Z(q.clearcoatMap,E.clearcoatMapTransform);if(q.clearcoatRoughnessMap)E.clearcoatRoughnessMap.value=q.clearcoatRoughnessMap,Z(q.clearcoatRoughnessMap,E.clearcoatRoughnessMapTransform);if(q.clearcoatNormalMap){if(E.clearcoatNormalMap.value=q.clearcoatNormalMap,Z(q.clearcoatNormalMap,E.clearcoatNormalMapTransform),E.clearcoatNormalScale.value.copy(q.clearcoatNormalScale),q.side===1)E.clearcoatNormalScale.value.negate()}}if(q.iridescence>0){if(E.iridescence.value=q.iridescence,E.iridescenceIOR.value=q.iridescenceIOR,E.iridescenceThicknessMinimum.value=q.iridescenceThicknessRange[0],E.iridescenceThicknessMaximum.value=q.iridescenceThicknessRange[1],q.iridescenceMap)E.iridescenceMap.value=q.iridescenceMap,Z(q.iridescenceMap,E.iridescenceMapTransform);if(q.iridescenceThicknessMap)E.iridescenceThicknessMap.value=q.iridescenceThicknessMap,Z(q.iridescenceThicknessMap,E.iridescenceThicknessMapTransform)}if(q.transmission>0){if(E.transmission.value=q.transmission,E.transmissionSamplerMap.value=I.texture,E.transmissionSamplerSize.value.set(I.width,I.height),q.transmissionMap)E.transmissionMap.value=q.transmissionMap,Z(q.transmissionMap,E.transmissionMapTransform);if(E.thickness.value=q.thickness,q.thicknessMap)E.thicknessMap.value=q.thicknessMap,Z(q.thicknessMap,E.thicknessMapTransform);E.attenuationDistance.value=q.attenuationDistance,E.attenuationColor.value.copy(q.attenuationColor)}if(q.anisotropy>0){if(E.anisotropyVector.value.set(q.anisotropy*Math.cos(q.anisotropyRotation),q.anisotropy*Math.sin(q.anisotropyRotation)),q.anisotropyMap)E.anisotropyMap.value=q.anisotropyMap,Z(q.anisotropyMap,E.anisotropyMapTransform)}if(E.specularIntensity.value=q.specularIntensity,E.specularColor.value.copy(q.specularColor),q.specularColorMap)E.specularColorMap.value=q.specularColorMap,Z(q.specularColorMap,E.specularColorMapTransform);if(q.specularIntensityMap)E.specularIntensityMap.value=q.specularIntensityMap,Z(q.specularIntensityMap,E.specularIntensityMapTransform)}function M(E,q){if(q.matcap)E.matcap.value=q.matcap}function O(E,q){const I=$.get(q).light;E.referencePosition.value.setFromMatrixPosition(I.matrixWorld),E.nearDistance.value=I.shadow.camera.near,E.farDistance.value=I.shadow.camera.far}return{refreshFogUniforms:Q,refreshMaterialUniforms:W}},jW=function(J,$,Z,Q){let W={},Y={},H=[];const X=Z.isWebGL2?J.getParameter(J.MAX_UNIFORM_BUFFER_BINDINGS):0;function K(I,z){const A=z.program;Q.uniformBlockBinding(I,A)}function G(I,z){let A=W[I.id];if(A===void 0)M(I),A=U(I),W[I.id]=A,I.addEventListener("dispose",E);const L=z.program;Q.updateUBOMapping(I,L);const w=$.render.frame;if(Y[I.id]!==w)R(I),Y[I.id]=w}function U(I){const z=V();I.__bindingPointIndex=z;const A=J.createBuffer(),L=I.__size,w=I.usage;return J.bindBuffer(J.UNIFORM_BUFFER,A),J.bufferData(J.UNIFORM_BUFFER,L,w),J.bindBuffer(J.UNIFORM_BUFFER,null),J.bindBufferBase(J.UNIFORM_BUFFER,z,A),A}function V(){for(let I=0;I0){w=A%L;const e=L-w;if(w!==0&&e-C.boundary<0)A+=L-w,N.__offset=A}A+=C.storage}if(w=A%L,w>0)A+=L-w;return I.__size=A,I.__cache={},this}function O(I){const z={boundary:0,storage:0};if(typeof I==="number")z.boundary=4,z.storage=4;else if(I.isVector2)z.boundary=8,z.storage=8;else if(I.isVector3||I.isColor)z.boundary=16,z.storage=12;else if(I.isVector4)z.boundary=16,z.storage=16;else if(I.isMatrix3)z.boundary=48,z.storage=48;else if(I.isMatrix4)z.boundary=64,z.storage=64;else if(I.isTexture)console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.");else console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",I);return z}function E(I){const z=I.target;z.removeEventListener("dispose",E);const A=H.indexOf(z.__bindingPointIndex);H.splice(A,1),J.deleteBuffer(W[z.id]),delete W[z.id],delete Y[z.id]}function q(){for(let I in W)J.deleteBuffer(W[I]);H=[],W={},Y={}}return{bind:K,update:G,dispose:q}};var X9=function(J,$,Z,Q,W,Y,H){const X=t7.distanceSqToPoint(J);if(XW.far)return;Y.push({distance:G,distanceToRay:Math.sqrt(X),point:K,index:$,face:null,object:H})}};var R7=function(J,$,Z){if(!J||!Z&&J.constructor===$)return J;if(typeof $.BYTES_PER_ELEMENT==="number")return new $(J);return Array.prototype.slice.call(J)},bW=function(J){return ArrayBuffer.isView(J)&&!(J instanceof DataView)};class Z6{addEventListener(J,$){if(this._listeners===void 0)this._listeners={};const Z=this._listeners;if(Z[J]===void 0)Z[J]=[];if(Z[J].indexOf($)===-1)Z[J].push($)}hasEventListener(J,$){if(this._listeners===void 0)return!1;const Z=this._listeners;return Z[J]!==void 0&&Z[J].indexOf($)!==-1}removeEventListener(J,$){if(this._listeners===void 0)return;const Q=this._listeners[J];if(Q!==void 0){const W=Q.indexOf($);if(W!==-1)Q.splice(W,1)}}dispatchEvent(J){if(this._listeners===void 0)return;const Z=this._listeners[J.type];if(Z!==void 0){J.target=this;const Q=Z.slice(0);for(let W=0,Y=Q.length;WJ,fromReference:(J)=>J},["srgb"]:{transfer:"srgb",primaries:"rec709",toReference:(J)=>J.convertSRGBToLinear(),fromReference:(J)=>J.convertLinearToSRGB()},["display-p3-linear"]:{transfer:"linear",primaries:"p3",toReference:(J)=>J.applyMatrix3(w8),fromReference:(J)=>J.applyMatrix3(I8)},["display-p3"]:{transfer:"srgb",primaries:"p3",toReference:(J)=>J.convertSRGBToLinear().applyMatrix3(w8),fromReference:(J)=>J.applyMatrix3(I8).convertLinearToSRGB()}},i9=new Set(["srgb-linear","display-p3-linear"]),h0={enabled:!0,_workingColorSpace:"srgb-linear",get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(J){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!J},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(J){if(!i9.has(J))throw new Error(`Unsupported working color space, "${J}".`);this._workingColorSpace=J},convert:function(J,$,Z){if(this.enabled===!1||$===Z||!$||!Z)return J;const Q=d6[$].toReference,W=d6[Z].fromReference;return W(Q(J))},fromWorkingColorSpace:function(J,$){return this.convert(J,this._workingColorSpace,$)},toWorkingColorSpace:function(J,$){return this.convert(J,$,this._workingColorSpace)},getPrimaries:function(J){return d6[J].primaries},getTransfer:function(J){if(J==="")return"linear";return d6[J].transfer}},W6;class e7{static getDataURL(J){if(/^data:/i.test(J.src))return J.src;if(typeof HTMLCanvasElement==="undefined")return J.src;let $;if(J instanceof HTMLCanvasElement)$=J;else{if(W6===void 0)W6=D7("canvas");W6.width=J.width,W6.height=J.height;const Z=W6.getContext("2d");if(J instanceof ImageData)Z.putImageData(J,0,0);else Z.drawImage(J,0,0,J.width,J.height);$=W6}if($.width>2048||$.height>2048)return console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",J),$.toDataURL("image/jpeg",0.6);else return $.toDataURL("image/png")}static sRGBToLinear(J){if(typeof HTMLImageElement!=="undefined"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&J instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&J instanceof ImageBitmap){const $=D7("canvas");$.width=J.width,$.height=J.height;const Z=$.getContext("2d");Z.drawImage(J,0,0,J.width,J.height);const Q=Z.getImageData(0,0,J.width,J.height),W=Q.data;for(let Y=0;Y0)Z.userData=this.userData;if(!$)J.textures[this.uuid]=Z;return Z}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(J){if(this.mapping!==300)return J;if(J.applyMatrix3(this.matrix),J.x<0||J.x>1)switch(this.wrapS){case 1000:J.x=J.x-Math.floor(J.x);break;case 1001:J.x=J.x<0?0:1;break;case 1002:if(Math.abs(Math.floor(J.x)%2)===1)J.x=Math.ceil(J.x)-J.x;else J.x=J.x-Math.floor(J.x);break}if(J.y<0||J.y>1)switch(this.wrapT){case 1000:J.y=J.y-Math.floor(J.y);break;case 1001:J.y=J.y<0?0:1;break;case 1002:if(Math.abs(Math.floor(J.y)%2)===1)J.y=Math.ceil(J.y)-J.y;else J.y=J.y-Math.floor(J.y);break}if(this.flipY)J.y=1-J.y;return J}set needsUpdate(J){if(J===!0)this.version++,this.source.needsUpdate=!0}get encoding(){return b6("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace==="srgb"?3001:3000}set encoding(J){b6("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=J===3001?"srgb":""}}MJ.DEFAULT_IMAGE=null;MJ.DEFAULT_MAPPING=300;MJ.DEFAULT_ANISOTROPY=1;class QJ{constructor(J=0,$=0,Z=0,Q=1){QJ.prototype.isVector4=!0,this.x=J,this.y=$,this.z=Z,this.w=Q}get width(){return this.z}set width(J){this.z=J}get height(){return this.w}set height(J){this.w=J}set(J,$,Z,Q){return this.x=J,this.y=$,this.z=Z,this.w=Q,this}setScalar(J){return this.x=J,this.y=J,this.z=J,this.w=J,this}setX(J){return this.x=J,this}setY(J){return this.y=J,this}setZ(J){return this.z=J,this}setW(J){return this.w=J,this}setComponent(J,$){switch(J){case 0:this.x=$;break;case 1:this.y=$;break;case 2:this.z=$;break;case 3:this.w=$;break;default:throw new Error("index is out of range: "+J)}return this}getComponent(J){switch(J){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+J)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(J){return this.x=J.x,this.y=J.y,this.z=J.z,this.w=J.w!==void 0?J.w:1,this}add(J){return this.x+=J.x,this.y+=J.y,this.z+=J.z,this.w+=J.w,this}addScalar(J){return this.x+=J,this.y+=J,this.z+=J,this.w+=J,this}addVectors(J,$){return this.x=J.x+$.x,this.y=J.y+$.y,this.z=J.z+$.z,this.w=J.w+$.w,this}addScaledVector(J,$){return this.x+=J.x*$,this.y+=J.y*$,this.z+=J.z*$,this.w+=J.w*$,this}sub(J){return this.x-=J.x,this.y-=J.y,this.z-=J.z,this.w-=J.w,this}subScalar(J){return this.x-=J,this.y-=J,this.z-=J,this.w-=J,this}subVectors(J,$){return this.x=J.x-$.x,this.y=J.y-$.y,this.z=J.z-$.z,this.w=J.w-$.w,this}multiply(J){return this.x*=J.x,this.y*=J.y,this.z*=J.z,this.w*=J.w,this}multiplyScalar(J){return this.x*=J,this.y*=J,this.z*=J,this.w*=J,this}applyMatrix4(J){const $=this.x,Z=this.y,Q=this.z,W=this.w,Y=J.elements;return this.x=Y[0]*$+Y[4]*Z+Y[8]*Q+Y[12]*W,this.y=Y[1]*$+Y[5]*Z+Y[9]*Q+Y[13]*W,this.z=Y[2]*$+Y[6]*Z+Y[10]*Q+Y[14]*W,this.w=Y[3]*$+Y[7]*Z+Y[11]*Q+Y[15]*W,this}divideScalar(J){return this.multiplyScalar(1/J)}setAxisAngleFromQuaternion(J){this.w=2*Math.acos(J.w);const $=Math.sqrt(1-J.w*J.w);if($<0.0001)this.x=1,this.y=0,this.z=0;else this.x=J.x/$,this.y=J.y/$,this.z=J.z/$;return this}setAxisAngleFromRotationMatrix(J){let $,Z,Q,W;const Y=0.01,H=0.1,X=J.elements,K=X[0],G=X[4],U=X[8],V=X[1],R=X[5],D=X[9],M=X[2],O=X[6],E=X[10];if(Math.abs(G-V)<0.01&&Math.abs(U-M)<0.01&&Math.abs(D-O)<0.01){if(Math.abs(G+V)<0.1&&Math.abs(U+M)<0.1&&Math.abs(D+O)<0.1&&Math.abs(K+R+E-3)<0.1)return this.set(1,0,0,0),this;$=Math.PI;const I=(K+1)/2,z=(R+1)/2,A=(E+1)/2,L=(G+V)/4,w=(U+M)/4,g=(D+O)/4;if(I>z&&I>A)if(I<0.01)Z=0,Q=0.707106781,W=0.707106781;else Z=Math.sqrt(I),Q=L/Z,W=w/Z;else if(z>A)if(z<0.01)Z=0.707106781,Q=0,W=0.707106781;else Q=Math.sqrt(z),Z=L/Q,W=g/Q;else if(A<0.01)Z=0.707106781,Q=0.707106781,W=0;else W=Math.sqrt(A),Z=w/W,Q=g/W;return this.set(Z,Q,W,$),this}let q=Math.sqrt((O-D)*(O-D)+(U-M)*(U-M)+(V-G)*(V-G));if(Math.abs(q)<0.001)q=1;return this.x=(O-D)/q,this.y=(U-M)/q,this.z=(V-G)/q,this.w=Math.acos((K+R+E-1)/2),this}min(J){return this.x=Math.min(this.x,J.x),this.y=Math.min(this.y,J.y),this.z=Math.min(this.z,J.z),this.w=Math.min(this.w,J.w),this}max(J){return this.x=Math.max(this.x,J.x),this.y=Math.max(this.y,J.y),this.z=Math.max(this.z,J.z),this.w=Math.max(this.w,J.w),this}clamp(J,$){return this.x=Math.max(J.x,Math.min($.x,this.x)),this.y=Math.max(J.y,Math.min($.y,this.y)),this.z=Math.max(J.z,Math.min($.z,this.z)),this.w=Math.max(J.w,Math.min($.w,this.w)),this}clampScalar(J,$){return this.x=Math.max(J,Math.min($,this.x)),this.y=Math.max(J,Math.min($,this.y)),this.z=Math.max(J,Math.min($,this.z)),this.w=Math.max(J,Math.min($,this.w)),this}clampLength(J,$){const Z=this.length();return this.divideScalar(Z||1).multiplyScalar(Math.max(J,Math.min($,Z)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(J){return this.x*J.x+this.y*J.y+this.z*J.z+this.w*J.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(J){return this.normalize().multiplyScalar(J)}lerp(J,$){return this.x+=(J.x-this.x)*$,this.y+=(J.y-this.y)*$,this.z+=(J.z-this.z)*$,this.w+=(J.w-this.w)*$,this}lerpVectors(J,$,Z){return this.x=J.x+($.x-J.x)*Z,this.y=J.y+($.y-J.y)*Z,this.z=J.z+($.z-J.z)*Z,this.w=J.w+($.w-J.w)*Z,this}equals(J){return J.x===this.x&&J.y===this.y&&J.z===this.z&&J.w===this.w}fromArray(J,$=0){return this.x=J[$],this.y=J[$+1],this.z=J[$+2],this.w=J[$+3],this}toArray(J=[],$=0){return J[$]=this.x,J[$+1]=this.y,J[$+2]=this.z,J[$+3]=this.w,J}fromBufferAttribute(J,$){return this.x=J.getX($),this.y=J.getY($),this.z=J.getZ($),this.w=J.getW($),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class K9 extends Z6{constructor(J=1,$=1,Z={}){super();this.isRenderTarget=!0,this.width=J,this.height=$,this.depth=1,this.scissor=new QJ(0,0,J,$),this.scissorTest=!1,this.viewport=new QJ(0,0,J,$);const Q={width:J,height:$,depth:1};if(Z.encoding!==void 0)b6("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),Z.colorSpace=Z.encoding===3001?"srgb":"";Z=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:1006,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},Z),this.texture=new MJ(Q,Z.mapping,Z.wrapS,Z.wrapT,Z.magFilter,Z.minFilter,Z.format,Z.type,Z.anisotropy,Z.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=Z.generateMipmaps,this.texture.internalFormat=Z.internalFormat,this.depthBuffer=Z.depthBuffer,this.stencilBuffer=Z.stencilBuffer,this.depthTexture=Z.depthTexture,this.samples=Z.samples}setSize(J,$,Z=1){if(this.width!==J||this.height!==$||this.depth!==Z)this.width=J,this.height=$,this.depth=Z,this.texture.image.width=J,this.texture.image.height=$,this.texture.image.depth=Z,this.dispose();this.viewport.set(0,0,J,$),this.scissor.set(0,0,J,$)}clone(){return new this.constructor().copy(this)}copy(J){this.width=J.width,this.height=J.height,this.depth=J.depth,this.scissor.copy(J.scissor),this.scissorTest=J.scissorTest,this.viewport.copy(J.viewport),this.texture=J.texture.clone(),this.texture.isRenderTargetTexture=!0;const $=Object.assign({},J.texture.image);if(this.texture.source=new J8($),this.depthBuffer=J.depthBuffer,this.stencilBuffer=J.stencilBuffer,J.depthTexture!==null)this.depthTexture=J.depthTexture.clone();return this.samples=J.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class nJ extends K9{constructor(J=1,$=1,Z={}){super(J,$,Z);this.isWebGLRenderTarget=!0}}class $8 extends MJ{constructor(J=null,$=1,Z=1,Q=1){super(null);this.isDataArrayTexture=!0,this.image={data:J,width:$,height:Z,depth:Q},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class G9 extends MJ{constructor(J=null,$=1,Z=1,Q=1){super(null);this.isData3DTexture=!0,this.image={data:J,width:$,height:Z,depth:Q},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Q6{constructor(J=0,$=0,Z=0,Q=1){this.isQuaternion=!0,this._x=J,this._y=$,this._z=Z,this._w=Q}static slerpFlat(J,$,Z,Q,W,Y,H){let X=Z[Q+0],K=Z[Q+1],G=Z[Q+2],U=Z[Q+3];const V=W[Y+0],R=W[Y+1],D=W[Y+2],M=W[Y+3];if(H===0){J[$+0]=X,J[$+1]=K,J[$+2]=G,J[$+3]=U;return}if(H===1){J[$+0]=V,J[$+1]=R,J[$+2]=D,J[$+3]=M;return}if(U!==M||X!==V||K!==R||G!==D){let O=1-H;const E=X*V+K*R+G*D+U*M,q=E>=0?1:-1,I=1-E*E;if(I>Number.EPSILON){const A=Math.sqrt(I),L=Math.atan2(A,E*q);O=Math.sin(O*L)/A,H=Math.sin(H*L)/A}const z=H*q;if(X=X*O+V*z,K=K*O+R*z,G=G*O+D*z,U=U*O+M*z,O===1-H){const A=1/Math.sqrt(X*X+K*K+G*G+U*U);X*=A,K*=A,G*=A,U*=A}}J[$]=X,J[$+1]=K,J[$+2]=G,J[$+3]=U}static multiplyQuaternionsFlat(J,$,Z,Q,W,Y){const H=Z[Q],X=Z[Q+1],K=Z[Q+2],G=Z[Q+3],U=W[Y],V=W[Y+1],R=W[Y+2],D=W[Y+3];return J[$]=H*D+G*U+X*R-K*V,J[$+1]=X*D+G*V+K*U-H*R,J[$+2]=K*D+G*R+H*V-X*U,J[$+3]=G*D-H*U-X*V-K*R,J}get x(){return this._x}set x(J){this._x=J,this._onChangeCallback()}get y(){return this._y}set y(J){this._y=J,this._onChangeCallback()}get z(){return this._z}set z(J){this._z=J,this._onChangeCallback()}get w(){return this._w}set w(J){this._w=J,this._onChangeCallback()}set(J,$,Z,Q){return this._x=J,this._y=$,this._z=Z,this._w=Q,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(J){return this._x=J.x,this._y=J.y,this._z=J.z,this._w=J.w,this._onChangeCallback(),this}setFromEuler(J,$){const{_x:Z,_y:Q,_z:W,_order:Y}=J,H=Math.cos,X=Math.sin,K=H(Z/2),G=H(Q/2),U=H(W/2),V=X(Z/2),R=X(Q/2),D=X(W/2);switch(Y){case"XYZ":this._x=V*G*U+K*R*D,this._y=K*R*U-V*G*D,this._z=K*G*D+V*R*U,this._w=K*G*U-V*R*D;break;case"YXZ":this._x=V*G*U+K*R*D,this._y=K*R*U-V*G*D,this._z=K*G*D-V*R*U,this._w=K*G*U+V*R*D;break;case"ZXY":this._x=V*G*U-K*R*D,this._y=K*R*U+V*G*D,this._z=K*G*D+V*R*U,this._w=K*G*U-V*R*D;break;case"ZYX":this._x=V*G*U-K*R*D,this._y=K*R*U+V*G*D,this._z=K*G*D-V*R*U,this._w=K*G*U+V*R*D;break;case"YZX":this._x=V*G*U+K*R*D,this._y=K*R*U+V*G*D,this._z=K*G*D-V*R*U,this._w=K*G*U-V*R*D;break;case"XZY":this._x=V*G*U-K*R*D,this._y=K*R*U-V*G*D,this._z=K*G*D+V*R*U,this._w=K*G*U+V*R*D;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+Y)}if($!==!1)this._onChangeCallback();return this}setFromAxisAngle(J,$){const Z=$/2,Q=Math.sin(Z);return this._x=J.x*Q,this._y=J.y*Q,this._z=J.z*Q,this._w=Math.cos(Z),this._onChangeCallback(),this}setFromRotationMatrix(J){const $=J.elements,Z=$[0],Q=$[4],W=$[8],Y=$[1],H=$[5],X=$[9],K=$[2],G=$[6],U=$[10],V=Z+H+U;if(V>0){const R=0.5/Math.sqrt(V+1);this._w=0.25/R,this._x=(G-X)*R,this._y=(W-K)*R,this._z=(Y-Q)*R}else if(Z>H&&Z>U){const R=2*Math.sqrt(1+Z-H-U);this._w=(G-X)/R,this._x=0.25*R,this._y=(Q+Y)/R,this._z=(W+K)/R}else if(H>U){const R=2*Math.sqrt(1+H-Z-U);this._w=(W-K)/R,this._x=(Q+Y)/R,this._y=0.25*R,this._z=(X+G)/R}else{const R=2*Math.sqrt(1+U-Z-H);this._w=(Y-Q)/R,this._x=(W+K)/R,this._y=(X+G)/R,this._z=0.25*R}return this._onChangeCallback(),this}setFromUnitVectors(J,$){let Z=J.dot($)+1;if(ZMath.abs(J.z))this._x=-J.y,this._y=J.x,this._z=0,this._w=Z;else this._x=0,this._y=-J.z,this._z=J.y,this._w=Z;else this._x=J.y*$.z-J.z*$.y,this._y=J.z*$.x-J.x*$.z,this._z=J.x*$.y-J.y*$.x,this._w=Z;return this.normalize()}angleTo(J){return 2*Math.acos(Math.abs(RJ(this.dot(J),-1,1)))}rotateTowards(J,$){const Z=this.angleTo(J);if(Z===0)return this;const Q=Math.min(1,$/Z);return this.slerp(J,Q),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(J){return this._x*J._x+this._y*J._y+this._z*J._z+this._w*J._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let J=this.length();if(J===0)this._x=0,this._y=0,this._z=0,this._w=1;else J=1/J,this._x=this._x*J,this._y=this._y*J,this._z=this._z*J,this._w=this._w*J;return this._onChangeCallback(),this}multiply(J){return this.multiplyQuaternions(this,J)}premultiply(J){return this.multiplyQuaternions(J,this)}multiplyQuaternions(J,$){const{_x:Z,_y:Q,_z:W,_w:Y}=J,H=$._x,X=$._y,K=$._z,G=$._w;return this._x=Z*G+Y*H+Q*K-W*X,this._y=Q*G+Y*X+W*H-Z*K,this._z=W*G+Y*K+Z*X-Q*H,this._w=Y*G-Z*H-Q*X-W*K,this._onChangeCallback(),this}slerp(J,$){if($===0)return this;if($===1)return this.copy(J);const Z=this._x,Q=this._y,W=this._z,Y=this._w;let H=Y*J._w+Z*J._x+Q*J._y+W*J._z;if(H<0)this._w=-J._w,this._x=-J._x,this._y=-J._y,this._z=-J._z,H=-H;else this.copy(J);if(H>=1)return this._w=Y,this._x=Z,this._y=Q,this._z=W,this;const X=1-H*H;if(X<=Number.EPSILON){const R=1-$;return this._w=R*Y+$*this._w,this._x=R*Z+$*this._x,this._y=R*Q+$*this._y,this._z=R*W+$*this._z,this.normalize(),this._onChangeCallback(),this}const K=Math.sqrt(X),G=Math.atan2(K,H),U=Math.sin((1-$)*G)/K,V=Math.sin($*G)/K;return this._w=Y*U+this._w*V,this._x=Z*U+this._x*V,this._y=Q*U+this._y*V,this._z=W*U+this._z*V,this._onChangeCallback(),this}slerpQuaternions(J,$,Z){return this.copy(J).slerp($,Z)}random(){const J=Math.random(),$=Math.sqrt(1-J),Z=Math.sqrt(J),Q=2*Math.PI*Math.random(),W=2*Math.PI*Math.random();return this.set($*Math.cos(Q),Z*Math.sin(W),Z*Math.cos(W),$*Math.sin(Q))}equals(J){return J._x===this._x&&J._y===this._y&&J._z===this._z&&J._w===this._w}fromArray(J,$=0){return this._x=J[$],this._y=J[$+1],this._z=J[$+2],this._w=J[$+3],this._onChangeCallback(),this}toArray(J=[],$=0){return J[$]=this._x,J[$+1]=this._y,J[$+2]=this._z,J[$+3]=this._w,J}fromBufferAttribute(J,$){return this._x=J.getX($),this._y=J.getY($),this._z=J.getZ($),this._w=J.getW($),this}toJSON(){return this.toArray()}_onChange(J){return this._onChangeCallback=J,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class v{constructor(J=0,$=0,Z=0){v.prototype.isVector3=!0,this.x=J,this.y=$,this.z=Z}set(J,$,Z){if(Z===void 0)Z=this.z;return this.x=J,this.y=$,this.z=Z,this}setScalar(J){return this.x=J,this.y=J,this.z=J,this}setX(J){return this.x=J,this}setY(J){return this.y=J,this}setZ(J){return this.z=J,this}setComponent(J,$){switch(J){case 0:this.x=$;break;case 1:this.y=$;break;case 2:this.z=$;break;default:throw new Error("index is out of range: "+J)}return this}getComponent(J){switch(J){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+J)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(J){return this.x=J.x,this.y=J.y,this.z=J.z,this}add(J){return this.x+=J.x,this.y+=J.y,this.z+=J.z,this}addScalar(J){return this.x+=J,this.y+=J,this.z+=J,this}addVectors(J,$){return this.x=J.x+$.x,this.y=J.y+$.y,this.z=J.z+$.z,this}addScaledVector(J,$){return this.x+=J.x*$,this.y+=J.y*$,this.z+=J.z*$,this}sub(J){return this.x-=J.x,this.y-=J.y,this.z-=J.z,this}subScalar(J){return this.x-=J,this.y-=J,this.z-=J,this}subVectors(J,$){return this.x=J.x-$.x,this.y=J.y-$.y,this.z=J.z-$.z,this}multiply(J){return this.x*=J.x,this.y*=J.y,this.z*=J.z,this}multiplyScalar(J){return this.x*=J,this.y*=J,this.z*=J,this}multiplyVectors(J,$){return this.x=J.x*$.x,this.y=J.y*$.y,this.z=J.z*$.z,this}applyEuler(J){return this.applyQuaternion(k8.setFromEuler(J))}applyAxisAngle(J,$){return this.applyQuaternion(k8.setFromAxisAngle(J,$))}applyMatrix3(J){const $=this.x,Z=this.y,Q=this.z,W=J.elements;return this.x=W[0]*$+W[3]*Z+W[6]*Q,this.y=W[1]*$+W[4]*Z+W[7]*Q,this.z=W[2]*$+W[5]*Z+W[8]*Q,this}applyNormalMatrix(J){return this.applyMatrix3(J).normalize()}applyMatrix4(J){const $=this.x,Z=this.y,Q=this.z,W=J.elements,Y=1/(W[3]*$+W[7]*Z+W[11]*Q+W[15]);return this.x=(W[0]*$+W[4]*Z+W[8]*Q+W[12])*Y,this.y=(W[1]*$+W[5]*Z+W[9]*Q+W[13])*Y,this.z=(W[2]*$+W[6]*Z+W[10]*Q+W[14])*Y,this}applyQuaternion(J){const $=this.x,Z=this.y,Q=this.z,W=J.x,Y=J.y,H=J.z,X=J.w,K=X*$+Y*Q-H*Z,G=X*Z+H*$-W*Q,U=X*Q+W*Z-Y*$,V=-W*$-Y*Z-H*Q;return this.x=K*X+V*-W+G*-H-U*-Y,this.y=G*X+V*-Y+U*-W-K*-H,this.z=U*X+V*-H+K*-Y-G*-W,this}project(J){return this.applyMatrix4(J.matrixWorldInverse).applyMatrix4(J.projectionMatrix)}unproject(J){return this.applyMatrix4(J.projectionMatrixInverse).applyMatrix4(J.matrixWorld)}transformDirection(J){const $=this.x,Z=this.y,Q=this.z,W=J.elements;return this.x=W[0]*$+W[4]*Z+W[8]*Q,this.y=W[1]*$+W[5]*Z+W[9]*Q,this.z=W[2]*$+W[6]*Z+W[10]*Q,this.normalize()}divide(J){return this.x/=J.x,this.y/=J.y,this.z/=J.z,this}divideScalar(J){return this.multiplyScalar(1/J)}min(J){return this.x=Math.min(this.x,J.x),this.y=Math.min(this.y,J.y),this.z=Math.min(this.z,J.z),this}max(J){return this.x=Math.max(this.x,J.x),this.y=Math.max(this.y,J.y),this.z=Math.max(this.z,J.z),this}clamp(J,$){return this.x=Math.max(J.x,Math.min($.x,this.x)),this.y=Math.max(J.y,Math.min($.y,this.y)),this.z=Math.max(J.z,Math.min($.z,this.z)),this}clampScalar(J,$){return this.x=Math.max(J,Math.min($,this.x)),this.y=Math.max(J,Math.min($,this.y)),this.z=Math.max(J,Math.min($,this.z)),this}clampLength(J,$){const Z=this.length();return this.divideScalar(Z||1).multiplyScalar(Math.max(J,Math.min($,Z)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(J){return this.x*J.x+this.y*J.y+this.z*J.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(J){return this.normalize().multiplyScalar(J)}lerp(J,$){return this.x+=(J.x-this.x)*$,this.y+=(J.y-this.y)*$,this.z+=(J.z-this.z)*$,this}lerpVectors(J,$,Z){return this.x=J.x+($.x-J.x)*Z,this.y=J.y+($.y-J.y)*Z,this.z=J.z+($.z-J.z)*Z,this}cross(J){return this.crossVectors(this,J)}crossVectors(J,$){const{x:Z,y:Q,z:W}=J,Y=$.x,H=$.y,X=$.z;return this.x=Q*X-W*H,this.y=W*Y-Z*X,this.z=Z*H-Q*Y,this}projectOnVector(J){const $=J.lengthSq();if($===0)return this.set(0,0,0);const Z=J.dot(this)/$;return this.copy(J).multiplyScalar(Z)}projectOnPlane(J){return S7.copy(this).projectOnVector(J),this.sub(S7)}reflect(J){return this.sub(S7.copy(J).multiplyScalar(2*this.dot(J)))}angleTo(J){const $=Math.sqrt(this.lengthSq()*J.lengthSq());if($===0)return Math.PI/2;const Z=this.dot(J)/$;return Math.acos(RJ(Z,-1,1))}distanceTo(J){return Math.sqrt(this.distanceToSquared(J))}distanceToSquared(J){const $=this.x-J.x,Z=this.y-J.y,Q=this.z-J.z;return $*$+Z*Z+Q*Q}manhattanDistanceTo(J){return Math.abs(this.x-J.x)+Math.abs(this.y-J.y)+Math.abs(this.z-J.z)}setFromSpherical(J){return this.setFromSphericalCoords(J.radius,J.phi,J.theta)}setFromSphericalCoords(J,$,Z){const Q=Math.sin($)*J;return this.x=Q*Math.sin(Z),this.y=Math.cos($)*J,this.z=Q*Math.cos(Z),this}setFromCylindrical(J){return this.setFromCylindricalCoords(J.radius,J.theta,J.y)}setFromCylindricalCoords(J,$,Z){return this.x=J*Math.sin($),this.y=Z,this.z=J*Math.cos($),this}setFromMatrixPosition(J){const $=J.elements;return this.x=$[12],this.y=$[13],this.z=$[14],this}setFromMatrixScale(J){const $=this.setFromMatrixColumn(J,0).length(),Z=this.setFromMatrixColumn(J,1).length(),Q=this.setFromMatrixColumn(J,2).length();return this.x=$,this.y=Z,this.z=Q,this}setFromMatrixColumn(J,$){return this.fromArray(J.elements,$*4)}setFromMatrix3Column(J,$){return this.fromArray(J.elements,$*3)}setFromEuler(J){return this.x=J._x,this.y=J._y,this.z=J._z,this}setFromColor(J){return this.x=J.r,this.y=J.g,this.z=J.b,this}equals(J){return J.x===this.x&&J.y===this.y&&J.z===this.z}fromArray(J,$=0){return this.x=J[$],this.y=J[$+1],this.z=J[$+2],this}toArray(J=[],$=0){return J[$]=this.x,J[$+1]=this.y,J[$+2]=this.z,J}fromBufferAttribute(J,$){return this.x=J.getX($),this.y=J.getY($),this.z=J.getZ($),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const J=(Math.random()-0.5)*2,$=Math.random()*Math.PI*2,Z=Math.sqrt(1-J**2);return this.x=Z*Math.cos($),this.y=Z*Math.sin($),this.z=J,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}var S7=new v,k8=new Q6;class I6{constructor(J=new v(Infinity,Infinity,Infinity),$=new v((-Infinity),(-Infinity),(-Infinity))){this.isBox3=!0,this.min=J,this.max=$}set(J,$){return this.min.copy(J),this.max.copy($),this}setFromArray(J){this.makeEmpty();for(let $=0,Z=J.length;$this.max.x||J.ythis.max.y||J.zthis.max.z?!1:!0}containsBox(J){return this.min.x<=J.min.x&&J.max.x<=this.max.x&&this.min.y<=J.min.y&&J.max.y<=this.max.y&&this.min.z<=J.min.z&&J.max.z<=this.max.z}getParameter(J,$){return $.set((J.x-this.min.x)/(this.max.x-this.min.x),(J.y-this.min.y)/(this.max.y-this.min.y),(J.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(J){return J.max.xthis.max.x||J.max.ythis.max.y||J.max.zthis.max.z?!1:!0}intersectsSphere(J){return this.clampPoint(J.center,fJ),fJ.distanceToSquared(J.center)<=J.radius*J.radius}intersectsPlane(J){let $,Z;if(J.normal.x>0)$=J.normal.x*this.min.x,Z=J.normal.x*this.max.x;else $=J.normal.x*this.max.x,Z=J.normal.x*this.min.x;if(J.normal.y>0)$+=J.normal.y*this.min.y,Z+=J.normal.y*this.max.y;else $+=J.normal.y*this.max.y,Z+=J.normal.y*this.min.y;if(J.normal.z>0)$+=J.normal.z*this.min.z,Z+=J.normal.z*this.max.z;else $+=J.normal.z*this.max.z,Z+=J.normal.z*this.min.z;return $<=-J.constant&&Z>=-J.constant}intersectsTriangle(J){if(this.isEmpty())return!1;this.getCenter(T6),c6.subVectors(this.max,T6),X6.subVectors(J.a,T6),H6.subVectors(J.b,T6),K6.subVectors(J.c,T6),gJ.subVectors(H6,X6),pJ.subVectors(K6,H6),rJ.subVectors(X6,K6);let $=[0,-gJ.z,gJ.y,0,-pJ.z,pJ.y,0,-rJ.z,rJ.y,gJ.z,0,-gJ.x,pJ.z,0,-pJ.x,rJ.z,0,-rJ.x,-gJ.y,gJ.x,0,-pJ.y,pJ.x,0,-rJ.y,rJ.x,0];if(!y7($,X6,H6,K6,c6))return!1;if($=[1,0,0,0,1,0,0,0,1],!y7($,X6,H6,K6,c6))return!1;return n6.crossVectors(gJ,pJ),$=[n6.x,n6.y,n6.z],y7($,X6,H6,K6,c6)}clampPoint(J,$){return $.copy(J).clamp(this.min,this.max)}distanceToPoint(J){return this.clampPoint(J,fJ).distanceTo(J)}getBoundingSphere(J){if(this.isEmpty())J.makeEmpty();else this.getCenter(J.center),J.radius=this.getSize(fJ).length()*0.5;return J}intersect(J){if(this.min.max(J.min),this.max.min(J.max),this.isEmpty())this.makeEmpty();return this}union(J){return this.min.min(J.min),this.max.max(J.max),this}applyMatrix4(J){if(this.isEmpty())return this;return yJ[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(J),yJ[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(J),yJ[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(J),yJ[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(J),yJ[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(J),yJ[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(J),yJ[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(J),yJ[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(J),this.setFromPoints(yJ),this}translate(J){return this.min.add(J),this.max.add(J),this}equals(J){return J.min.equals(this.min)&&J.max.equals(this.max)}}var yJ=[new v,new v,new v,new v,new v,new v,new v,new v],fJ=new v,Y6=new I6,X6=new v,H6=new v,K6=new v,gJ=new v,pJ=new v,rJ=new v,T6=new v,c6=new v,n6=new v,aJ=new v,t9=new I6,S6=new v,f7=new v;class g6{constructor(J=new v,$=-1){this.center=J,this.radius=$}set(J,$){return this.center.copy(J),this.radius=$,this}setFromPoints(J,$){const Z=this.center;if($!==void 0)Z.copy($);else t9.setFromPoints(J).getCenter(Z);let Q=0;for(let W=0,Y=J.length;Wthis.radius*this.radius)$.sub(this.center).normalize(),$.multiplyScalar(this.radius).add(this.center);return $}getBoundingBox(J){if(this.isEmpty())return J.makeEmpty(),J;return J.set(this.center,this.center),J.expandByScalar(this.radius),J}applyMatrix4(J){return this.center.applyMatrix4(J),this.radius=this.radius*J.getMaxScaleOnAxis(),this}translate(J){return this.center.add(J),this}expandByPoint(J){if(this.isEmpty())return this.center.copy(J),this.radius=0,this;S6.subVectors(J,this.center);const $=S6.lengthSq();if($>this.radius*this.radius){const Z=Math.sqrt($),Q=(Z-this.radius)*0.5;this.center.addScaledVector(S6,Q/Z),this.radius+=Q}return this}union(J){if(J.isEmpty())return this;if(this.isEmpty())return this.copy(J),this;if(this.center.equals(J.center)===!0)this.radius=Math.max(this.radius,J.radius);else f7.subVectors(J.center,this.center).setLength(J.radius),this.expandByPoint(S6.copy(J.center).add(f7)),this.expandByPoint(S6.copy(J.center).sub(f7));return this}equals(J){return J.center.equals(this.center)&&J.radius===this.radius}clone(){return new this.constructor().copy(this)}}var vJ=new v,v7=new v,s6=new v,mJ=new v,j7=new v,o6=new v,b7=new v;class Z8{constructor(J=new v,$=new v(0,0,-1)){this.origin=J,this.direction=$}set(J,$){return this.origin.copy(J),this.direction.copy($),this}copy(J){return this.origin.copy(J.origin),this.direction.copy(J.direction),this}at(J,$){return $.copy(this.origin).addScaledVector(this.direction,J)}lookAt(J){return this.direction.copy(J).sub(this.origin).normalize(),this}recast(J){return this.origin.copy(this.at(J,vJ)),this}closestPointToPoint(J,$){$.subVectors(J,this.origin);const Z=$.dot(this.direction);if(Z<0)return $.copy(this.origin);return $.copy(this.origin).addScaledVector(this.direction,Z)}distanceToPoint(J){return Math.sqrt(this.distanceSqToPoint(J))}distanceSqToPoint(J){const $=vJ.subVectors(J,this.origin).dot(this.direction);if($<0)return this.origin.distanceToSquared(J);return vJ.copy(this.origin).addScaledVector(this.direction,$),vJ.distanceToSquared(J)}distanceSqToSegment(J,$,Z,Q){v7.copy(J).add($).multiplyScalar(0.5),s6.copy($).sub(J).normalize(),mJ.copy(this.origin).sub(v7);const W=J.distanceTo($)*0.5,Y=-this.direction.dot(s6),H=mJ.dot(this.direction),X=-mJ.dot(s6),K=mJ.lengthSq(),G=Math.abs(1-Y*Y);let U,V,R,D;if(G>0)if(U=Y*X-H,V=Y*H-X,D=W*G,U>=0)if(V>=-D)if(V<=D){const M=1/G;U*=M,V*=M,R=U*(U+Y*V+2*H)+V*(Y*U+V+2*X)+K}else V=W,U=Math.max(0,-(Y*V+H)),R=-U*U+V*(V+2*X)+K;else V=-W,U=Math.max(0,-(Y*V+H)),R=-U*U+V*(V+2*X)+K;else if(V<=-D)U=Math.max(0,-(-Y*W+H)),V=U>0?-W:Math.min(Math.max(-W,-X),W),R=-U*U+V*(V+2*X)+K;else if(V<=D)U=0,V=Math.min(Math.max(-W,-X),W),R=V*(V+2*X)+K;else U=Math.max(0,-(Y*W+H)),V=U>0?W:Math.min(Math.max(-W,-X),W),R=-U*U+V*(V+2*X)+K;else V=Y>0?-W:W,U=Math.max(0,-(Y*V+H)),R=-U*U+V*(V+2*X)+K;if(Z)Z.copy(this.origin).addScaledVector(this.direction,U);if(Q)Q.copy(v7).addScaledVector(s6,V);return R}intersectSphere(J,$){vJ.subVectors(J.center,this.origin);const Z=vJ.dot(this.direction),Q=vJ.dot(vJ)-Z*Z,W=J.radius*J.radius;if(Q>W)return null;const Y=Math.sqrt(W-Q),H=Z-Y,X=Z+Y;if(X<0)return null;if(H<0)return this.at(X,$);return this.at(H,$)}intersectsSphere(J){return this.distanceSqToPoint(J.center)<=J.radius*J.radius}distanceToPlane(J){const $=J.normal.dot(this.direction);if($===0){if(J.distanceToPoint(this.origin)===0)return 0;return null}const Z=-(this.origin.dot(J.normal)+J.constant)/$;return Z>=0?Z:null}intersectPlane(J,$){const Z=this.distanceToPlane(J);if(Z===null)return null;return this.at(Z,$)}intersectsPlane(J){const $=J.distanceToPoint(this.origin);if($===0)return!0;if(J.normal.dot(this.direction)*$<0)return!0;return!1}intersectBox(J,$){let Z,Q,W,Y,H,X;const K=1/this.direction.x,G=1/this.direction.y,U=1/this.direction.z,V=this.origin;if(K>=0)Z=(J.min.x-V.x)*K,Q=(J.max.x-V.x)*K;else Z=(J.max.x-V.x)*K,Q=(J.min.x-V.x)*K;if(G>=0)W=(J.min.y-V.y)*G,Y=(J.max.y-V.y)*G;else W=(J.max.y-V.y)*G,Y=(J.min.y-V.y)*G;if(Z>Y||W>Q)return null;if(W>Z||isNaN(Z))Z=W;if(Y=0)H=(J.min.z-V.z)*U,X=(J.max.z-V.z)*U;else H=(J.max.z-V.z)*U,X=(J.min.z-V.z)*U;if(Z>X||H>Q)return null;if(H>Z||Z!==Z)Z=H;if(X=0?Z:Q,$)}intersectsBox(J){return this.intersectBox(J,vJ)!==null}intersectTriangle(J,$,Z,Q,W){j7.subVectors($,J),o6.subVectors(Z,J),b7.crossVectors(j7,o6);let Y=this.direction.dot(b7),H;if(Y>0){if(Q)return null;H=1}else if(Y<0)H=-1,Y=-Y;else return null;mJ.subVectors(this.origin,J);const X=H*this.direction.dot(o6.crossVectors(mJ,o6));if(X<0)return null;const K=H*this.direction.dot(j7.cross(mJ));if(K<0)return null;if(X+K>Y)return null;const G=-H*mJ.dot(b7);if(G<0)return null;return this.at(G/Y,W)}applyMatrix4(J){return this.origin.applyMatrix4(J),this.direction.transformDirection(J),this}equals(J){return J.origin.equals(this.origin)&&J.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ZJ{constructor(J,$,Z,Q,W,Y,H,X,K,G,U,V,R,D,M,O){if(ZJ.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],J!==void 0)this.set(J,$,Z,Q,W,Y,H,X,K,G,U,V,R,D,M,O)}set(J,$,Z,Q,W,Y,H,X,K,G,U,V,R,D,M,O){const E=this.elements;return E[0]=J,E[4]=$,E[8]=Z,E[12]=Q,E[1]=W,E[5]=Y,E[9]=H,E[13]=X,E[2]=K,E[6]=G,E[10]=U,E[14]=V,E[3]=R,E[7]=D,E[11]=M,E[15]=O,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new ZJ().fromArray(this.elements)}copy(J){const $=this.elements,Z=J.elements;return $[0]=Z[0],$[1]=Z[1],$[2]=Z[2],$[3]=Z[3],$[4]=Z[4],$[5]=Z[5],$[6]=Z[6],$[7]=Z[7],$[8]=Z[8],$[9]=Z[9],$[10]=Z[10],$[11]=Z[11],$[12]=Z[12],$[13]=Z[13],$[14]=Z[14],$[15]=Z[15],this}copyPosition(J){const $=this.elements,Z=J.elements;return $[12]=Z[12],$[13]=Z[13],$[14]=Z[14],this}setFromMatrix3(J){const $=J.elements;return this.set($[0],$[3],$[6],0,$[1],$[4],$[7],0,$[2],$[5],$[8],0,0,0,0,1),this}extractBasis(J,$,Z){return J.setFromMatrixColumn(this,0),$.setFromMatrixColumn(this,1),Z.setFromMatrixColumn(this,2),this}makeBasis(J,$,Z){return this.set(J.x,$.x,Z.x,0,J.y,$.y,Z.y,0,J.z,$.z,Z.z,0,0,0,0,1),this}extractRotation(J){const $=this.elements,Z=J.elements,Q=1/G6.setFromMatrixColumn(J,0).length(),W=1/G6.setFromMatrixColumn(J,1).length(),Y=1/G6.setFromMatrixColumn(J,2).length();return $[0]=Z[0]*Q,$[1]=Z[1]*Q,$[2]=Z[2]*Q,$[3]=0,$[4]=Z[4]*W,$[5]=Z[5]*W,$[6]=Z[6]*W,$[7]=0,$[8]=Z[8]*Y,$[9]=Z[9]*Y,$[10]=Z[10]*Y,$[11]=0,$[12]=0,$[13]=0,$[14]=0,$[15]=1,this}makeRotationFromEuler(J){const $=this.elements,Z=J.x,Q=J.y,W=J.z,Y=Math.cos(Z),H=Math.sin(Z),X=Math.cos(Q),K=Math.sin(Q),G=Math.cos(W),U=Math.sin(W);if(J.order==="XYZ"){const V=Y*G,R=Y*U,D=H*G,M=H*U;$[0]=X*G,$[4]=-X*U,$[8]=K,$[1]=R+D*K,$[5]=V-M*K,$[9]=-H*X,$[2]=M-V*K,$[6]=D+R*K,$[10]=Y*X}else if(J.order==="YXZ"){const V=X*G,R=X*U,D=K*G,M=K*U;$[0]=V+M*H,$[4]=D*H-R,$[8]=Y*K,$[1]=Y*U,$[5]=Y*G,$[9]=-H,$[2]=R*H-D,$[6]=M+V*H,$[10]=Y*X}else if(J.order==="ZXY"){const V=X*G,R=X*U,D=K*G,M=K*U;$[0]=V-M*H,$[4]=-Y*U,$[8]=D+R*H,$[1]=R+D*H,$[5]=Y*G,$[9]=M-V*H,$[2]=-Y*K,$[6]=H,$[10]=Y*X}else if(J.order==="ZYX"){const V=Y*G,R=Y*U,D=H*G,M=H*U;$[0]=X*G,$[4]=D*K-R,$[8]=V*K+M,$[1]=X*U,$[5]=M*K+V,$[9]=R*K-D,$[2]=-K,$[6]=H*X,$[10]=Y*X}else if(J.order==="YZX"){const V=Y*X,R=Y*K,D=H*X,M=H*K;$[0]=X*G,$[4]=M-V*U,$[8]=D*U+R,$[1]=U,$[5]=Y*G,$[9]=-H*G,$[2]=-K*G,$[6]=R*U+D,$[10]=V-M*U}else if(J.order==="XZY"){const V=Y*X,R=Y*K,D=H*X,M=H*K;$[0]=X*G,$[4]=-U,$[8]=K*G,$[1]=V*U+M,$[5]=Y*G,$[9]=R*U-D,$[2]=D*U-R,$[6]=H*G,$[10]=M*U+V}return $[3]=0,$[7]=0,$[11]=0,$[12]=0,$[13]=0,$[14]=0,$[15]=1,this}makeRotationFromQuaternion(J){return this.compose(e9,J,J$)}lookAt(J,$,Z){const Q=this.elements;if(NJ.subVectors(J,$),NJ.lengthSq()===0)NJ.z=1;if(NJ.normalize(),lJ.crossVectors(Z,NJ),lJ.lengthSq()===0){if(Math.abs(Z.z)===1)NJ.x+=0.0001;else NJ.z+=0.0001;NJ.normalize(),lJ.crossVectors(Z,NJ)}return lJ.normalize(),i6.crossVectors(NJ,lJ),Q[0]=lJ.x,Q[4]=i6.x,Q[8]=NJ.x,Q[1]=lJ.y,Q[5]=i6.y,Q[9]=NJ.y,Q[2]=lJ.z,Q[6]=i6.z,Q[10]=NJ.z,this}multiply(J){return this.multiplyMatrices(this,J)}premultiply(J){return this.multiplyMatrices(J,this)}multiplyMatrices(J,$){const Z=J.elements,Q=$.elements,W=this.elements,Y=Z[0],H=Z[4],X=Z[8],K=Z[12],G=Z[1],U=Z[5],V=Z[9],R=Z[13],D=Z[2],M=Z[6],O=Z[10],E=Z[14],q=Z[3],I=Z[7],z=Z[11],A=Z[15],L=Q[0],w=Q[4],g=Q[8],u=Q[12],N=Q[1],C=Q[5],m=Q[9],e=Q[13],W0=Q[2],P=Q[6],l=Q[10],n=Q[14],d=Q[3],r=Q[7],p=Q[11],T=Q[15];return W[0]=Y*L+H*N+X*W0+K*d,W[4]=Y*w+H*C+X*P+K*r,W[8]=Y*g+H*m+X*l+K*p,W[12]=Y*u+H*e+X*n+K*T,W[1]=G*L+U*N+V*W0+R*d,W[5]=G*w+U*C+V*P+R*r,W[9]=G*g+U*m+V*l+R*p,W[13]=G*u+U*e+V*n+R*T,W[2]=D*L+M*N+O*W0+E*d,W[6]=D*w+M*C+O*P+E*r,W[10]=D*g+M*m+O*l+E*p,W[14]=D*u+M*e+O*n+E*T,W[3]=q*L+I*N+z*W0+A*d,W[7]=q*w+I*C+z*P+A*r,W[11]=q*g+I*m+z*l+A*p,W[15]=q*u+I*e+z*n+A*T,this}multiplyScalar(J){const $=this.elements;return $[0]*=J,$[4]*=J,$[8]*=J,$[12]*=J,$[1]*=J,$[5]*=J,$[9]*=J,$[13]*=J,$[2]*=J,$[6]*=J,$[10]*=J,$[14]*=J,$[3]*=J,$[7]*=J,$[11]*=J,$[15]*=J,this}determinant(){const J=this.elements,$=J[0],Z=J[4],Q=J[8],W=J[12],Y=J[1],H=J[5],X=J[9],K=J[13],G=J[2],U=J[6],V=J[10],R=J[14],D=J[3],M=J[7],O=J[11],E=J[15];return D*(+W*X*U-Q*K*U-W*H*V+Z*K*V+Q*H*R-Z*X*R)+M*(+$*X*R-$*K*V+W*Y*V-Q*Y*R+Q*K*G-W*X*G)+O*(+$*K*U-$*H*R-W*Y*U+Z*Y*R+W*H*G-Z*K*G)+E*(-Q*H*G-$*X*U+$*H*V+Q*Y*U-Z*Y*V+Z*X*G)}transpose(){const J=this.elements;let $;return $=J[1],J[1]=J[4],J[4]=$,$=J[2],J[2]=J[8],J[8]=$,$=J[6],J[6]=J[9],J[9]=$,$=J[3],J[3]=J[12],J[12]=$,$=J[7],J[7]=J[13],J[13]=$,$=J[11],J[11]=J[14],J[14]=$,this}setPosition(J,$,Z){const Q=this.elements;if(J.isVector3)Q[12]=J.x,Q[13]=J.y,Q[14]=J.z;else Q[12]=J,Q[13]=$,Q[14]=Z;return this}invert(){const J=this.elements,$=J[0],Z=J[1],Q=J[2],W=J[3],Y=J[4],H=J[5],X=J[6],K=J[7],G=J[8],U=J[9],V=J[10],R=J[11],D=J[12],M=J[13],O=J[14],E=J[15],q=U*O*K-M*V*K+M*X*R-H*O*R-U*X*E+H*V*E,I=D*V*K-G*O*K-D*X*R+Y*O*R+G*X*E-Y*V*E,z=G*M*K-D*U*K+D*H*R-Y*M*R-G*H*E+Y*U*E,A=D*U*X-G*M*X-D*H*V+Y*M*V+G*H*O-Y*U*O,L=$*q+Z*I+Q*z+W*A;if(L===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/L;return J[0]=q*w,J[1]=(M*V*W-U*O*W-M*Q*R+Z*O*R+U*Q*E-Z*V*E)*w,J[2]=(H*O*W-M*X*W+M*Q*K-Z*O*K-H*Q*E+Z*X*E)*w,J[3]=(U*X*W-H*V*W-U*Q*K+Z*V*K+H*Q*R-Z*X*R)*w,J[4]=I*w,J[5]=(G*O*W-D*V*W+D*Q*R-$*O*R-G*Q*E+$*V*E)*w,J[6]=(D*X*W-Y*O*W-D*Q*K+$*O*K+Y*Q*E-$*X*E)*w,J[7]=(Y*V*W-G*X*W+G*Q*K-$*V*K-Y*Q*R+$*X*R)*w,J[8]=z*w,J[9]=(D*U*W-G*M*W-D*Z*R+$*M*R+G*Z*E-$*U*E)*w,J[10]=(Y*M*W-D*H*W+D*Z*K-$*M*K-Y*Z*E+$*H*E)*w,J[11]=(G*H*W-Y*U*W-G*Z*K+$*U*K+Y*Z*R-$*H*R)*w,J[12]=A*w,J[13]=(G*M*Q-D*U*Q+D*Z*V-$*M*V-G*Z*O+$*U*O)*w,J[14]=(D*H*Q-Y*M*Q-D*Z*X+$*M*X+Y*Z*O-$*H*O)*w,J[15]=(Y*U*Q-G*H*Q+G*Z*X-$*U*X-Y*Z*V+$*H*V)*w,this}scale(J){const $=this.elements,Z=J.x,Q=J.y,W=J.z;return $[0]*=Z,$[4]*=Q,$[8]*=W,$[1]*=Z,$[5]*=Q,$[9]*=W,$[2]*=Z,$[6]*=Q,$[10]*=W,$[3]*=Z,$[7]*=Q,$[11]*=W,this}getMaxScaleOnAxis(){const J=this.elements,$=J[0]*J[0]+J[1]*J[1]+J[2]*J[2],Z=J[4]*J[4]+J[5]*J[5]+J[6]*J[6],Q=J[8]*J[8]+J[9]*J[9]+J[10]*J[10];return Math.sqrt(Math.max($,Z,Q))}makeTranslation(J,$,Z){if(J.isVector3)this.set(1,0,0,J.x,0,1,0,J.y,0,0,1,J.z,0,0,0,1);else this.set(1,0,0,J,0,1,0,$,0,0,1,Z,0,0,0,1);return this}makeRotationX(J){const $=Math.cos(J),Z=Math.sin(J);return this.set(1,0,0,0,0,$,-Z,0,0,Z,$,0,0,0,0,1),this}makeRotationY(J){const $=Math.cos(J),Z=Math.sin(J);return this.set($,0,Z,0,0,1,0,0,-Z,0,$,0,0,0,0,1),this}makeRotationZ(J){const $=Math.cos(J),Z=Math.sin(J);return this.set($,-Z,0,0,Z,$,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(J,$){const Z=Math.cos($),Q=Math.sin($),W=1-Z,Y=J.x,H=J.y,X=J.z,K=W*Y,G=W*H;return this.set(K*Y+Z,K*H-Q*X,K*X+Q*H,0,K*H+Q*X,G*H+Z,G*X-Q*Y,0,K*X-Q*H,G*X+Q*Y,W*X*X+Z,0,0,0,0,1),this}makeScale(J,$,Z){return this.set(J,0,0,0,0,$,0,0,0,0,Z,0,0,0,0,1),this}makeShear(J,$,Z,Q,W,Y){return this.set(1,Z,W,0,J,1,Y,0,$,Q,1,0,0,0,0,1),this}compose(J,$,Z){const Q=this.elements,W=$._x,Y=$._y,H=$._z,X=$._w,K=W+W,G=Y+Y,U=H+H,V=W*K,R=W*G,D=W*U,M=Y*G,O=Y*U,E=H*U,q=X*K,I=X*G,z=X*U,A=Z.x,L=Z.y,w=Z.z;return Q[0]=(1-(M+E))*A,Q[1]=(R+z)*A,Q[2]=(D-I)*A,Q[3]=0,Q[4]=(R-z)*L,Q[5]=(1-(V+E))*L,Q[6]=(O+q)*L,Q[7]=0,Q[8]=(D+I)*w,Q[9]=(O-q)*w,Q[10]=(1-(V+M))*w,Q[11]=0,Q[12]=J.x,Q[13]=J.y,Q[14]=J.z,Q[15]=1,this}decompose(J,$,Z){const Q=this.elements;let W=G6.set(Q[0],Q[1],Q[2]).length();const Y=G6.set(Q[4],Q[5],Q[6]).length(),H=G6.set(Q[8],Q[9],Q[10]).length();if(this.determinant()<0)W=-W;J.x=Q[12],J.y=Q[13],J.z=Q[14],IJ.copy(this);const K=1/W,G=1/Y,U=1/H;return IJ.elements[0]*=K,IJ.elements[1]*=K,IJ.elements[2]*=K,IJ.elements[4]*=G,IJ.elements[5]*=G,IJ.elements[6]*=G,IJ.elements[8]*=U,IJ.elements[9]*=U,IJ.elements[10]*=U,$.setFromRotationMatrix(IJ),Z.x=W,Z.y=Y,Z.z=H,this}makePerspective(J,$,Z,Q,W,Y,H=2000){const X=this.elements,K=2*W/($-J),G=2*W/(Z-Q),U=($+J)/($-J),V=(Z+Q)/(Z-Q);let R,D;if(H===2000)R=-(Y+W)/(Y-W),D=-2*Y*W/(Y-W);else if(H===2001)R=-Y/(Y-W),D=-Y*W/(Y-W);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+H);return X[0]=K,X[4]=0,X[8]=U,X[12]=0,X[1]=0,X[5]=G,X[9]=V,X[13]=0,X[2]=0,X[6]=0,X[10]=R,X[14]=D,X[3]=0,X[7]=0,X[11]=-1,X[15]=0,this}makeOrthographic(J,$,Z,Q,W,Y,H=2000){const X=this.elements,K=1/($-J),G=1/(Z-Q),U=1/(Y-W),V=($+J)*K,R=(Z+Q)*G;let D,M;if(H===2000)D=(Y+W)*U,M=-2*U;else if(H===2001)D=W*U,M=-1*U;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+H);return X[0]=2*K,X[4]=0,X[8]=0,X[12]=-V,X[1]=0,X[5]=2*G,X[9]=0,X[13]=-R,X[2]=0,X[6]=0,X[10]=M,X[14]=-D,X[3]=0,X[7]=0,X[11]=0,X[15]=1,this}equals(J){const $=this.elements,Z=J.elements;for(let Q=0;Q<16;Q++)if($[Q]!==Z[Q])return!1;return!0}fromArray(J,$=0){for(let Z=0;Z<16;Z++)this.elements[Z]=J[Z+$];return this}toArray(J=[],$=0){const Z=this.elements;return J[$]=Z[0],J[$+1]=Z[1],J[$+2]=Z[2],J[$+3]=Z[3],J[$+4]=Z[4],J[$+5]=Z[5],J[$+6]=Z[6],J[$+7]=Z[7],J[$+8]=Z[8],J[$+9]=Z[9],J[$+10]=Z[10],J[$+11]=Z[11],J[$+12]=Z[12],J[$+13]=Z[13],J[$+14]=Z[14],J[$+15]=Z[15],J}}var G6=new v,IJ=new ZJ,e9=new v(0,0,0),J$=new v(1,1,1),lJ=new v,i6=new v,NJ=new v,C8=new ZJ,L8=new Q6;class F7{constructor(J=0,$=0,Z=0,Q=F7.DEFAULT_ORDER){this.isEuler=!0,this._x=J,this._y=$,this._z=Z,this._order=Q}get x(){return this._x}set x(J){this._x=J,this._onChangeCallback()}get y(){return this._y}set y(J){this._y=J,this._onChangeCallback()}get z(){return this._z}set z(J){this._z=J,this._onChangeCallback()}get order(){return this._order}set order(J){this._order=J,this._onChangeCallback()}set(J,$,Z,Q=this._order){return this._x=J,this._y=$,this._z=Z,this._order=Q,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(J){return this._x=J._x,this._y=J._y,this._z=J._z,this._order=J._order,this._onChangeCallback(),this}setFromRotationMatrix(J,$=this._order,Z=!0){const Q=J.elements,W=Q[0],Y=Q[4],H=Q[8],X=Q[1],K=Q[5],G=Q[9],U=Q[2],V=Q[6],R=Q[10];switch($){case"XYZ":if(this._y=Math.asin(RJ(H,-1,1)),Math.abs(H)<0.9999999)this._x=Math.atan2(-G,R),this._z=Math.atan2(-Y,W);else this._x=Math.atan2(V,K),this._z=0;break;case"YXZ":if(this._x=Math.asin(-RJ(G,-1,1)),Math.abs(G)<0.9999999)this._y=Math.atan2(H,R),this._z=Math.atan2(X,K);else this._y=Math.atan2(-U,W),this._z=0;break;case"ZXY":if(this._x=Math.asin(RJ(V,-1,1)),Math.abs(V)<0.9999999)this._y=Math.atan2(-U,R),this._z=Math.atan2(-Y,K);else this._y=0,this._z=Math.atan2(X,W);break;case"ZYX":if(this._y=Math.asin(-RJ(U,-1,1)),Math.abs(U)<0.9999999)this._x=Math.atan2(V,R),this._z=Math.atan2(X,W);else this._x=0,this._z=Math.atan2(-Y,K);break;case"YZX":if(this._z=Math.asin(RJ(X,-1,1)),Math.abs(X)<0.9999999)this._x=Math.atan2(-G,K),this._y=Math.atan2(-U,W);else this._x=0,this._y=Math.atan2(H,R);break;case"XZY":if(this._z=Math.asin(-RJ(Y,-1,1)),Math.abs(Y)<0.9999999)this._x=Math.atan2(V,K),this._y=Math.atan2(H,W);else this._x=Math.atan2(-G,R),this._y=0;break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+$)}if(this._order=$,Z===!0)this._onChangeCallback();return this}setFromQuaternion(J,$,Z){return C8.makeRotationFromQuaternion(J),this.setFromRotationMatrix(C8,$,Z)}setFromVector3(J,$=this._order){return this.set(J.x,J.y,J.z,$)}reorder(J){return L8.setFromEuler(this),this.setFromQuaternion(L8,J)}equals(J){return J._x===this._x&&J._y===this._y&&J._z===this._z&&J._order===this._order}fromArray(J){if(this._x=J[0],this._y=J[1],this._z=J[2],J[3]!==void 0)this._order=J[3];return this._onChangeCallback(),this}toArray(J=[],$=0){return J[$]=this._x,J[$+1]=this._y,J[$+2]=this._z,J[$+3]=this._order,J}_onChange(J){return this._onChangeCallback=J,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}F7.DEFAULT_ORDER="XYZ";class Q8{constructor(){this.mask=1|0}set(J){this.mask=(1<>>0}enable(J){this.mask|=1<1){for(let $=0;$1){for(let Z=0;Z0)Z=Z.concat(Y)}return Z}getWorldPosition(J){return this.updateWorldMatrix(!0,!1),J.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(J){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(y6,J,Z$),J}getWorldScale(J){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(y6,Q$,J),J}getWorldDirection(J){this.updateWorldMatrix(!0,!1);const $=this.matrixWorld.elements;return J.set($[8],$[9],$[10]).normalize()}raycast(){}traverse(J){J(this);const $=this.children;for(let Z=0,Q=$.length;Z0)Q.userData=this.userData;if(Q.layers=this.layers.mask,Q.matrix=this.matrix.toArray(),Q.up=this.up.toArray(),this.matrixAutoUpdate===!1)Q.matrixAutoUpdate=!1;if(this.isInstancedMesh){if(Q.type="InstancedMesh",Q.count=this.count,Q.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null)Q.instanceColor=this.instanceColor.toJSON()}function W(H,X){if(H[X.uuid]===void 0)H[X.uuid]=X.toJSON(J);return X.uuid}if(this.isScene){if(this.background){if(this.background.isColor)Q.background=this.background.toJSON();else if(this.background.isTexture)Q.background=this.background.toJSON(J).uuid}if(this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0)Q.environment=this.environment.toJSON(J).uuid}else if(this.isMesh||this.isLine||this.isPoints){Q.geometry=W(J.geometries,this.geometry);const H=this.geometry.parameters;if(H!==void 0&&H.shapes!==void 0){const X=H.shapes;if(Array.isArray(X))for(let K=0,G=X.length;K0){Q.children=[];for(let H=0;H0){Q.animations=[];for(let H=0;H0)Z.geometries=H;if(X.length>0)Z.materials=X;if(K.length>0)Z.textures=K;if(G.length>0)Z.images=G;if(U.length>0)Z.shapes=U;if(V.length>0)Z.skeletons=V;if(R.length>0)Z.animations=R;if(D.length>0)Z.nodes=D}return Z.object=Q,Z;function Y(H){const X=[];for(let K in H){const G=H[K];delete G.metadata,X.push(G)}return X}}clone(J){return new this.constructor().copy(this,J)}copy(J,$=!0){if(this.name=J.name,this.up.copy(J.up),this.position.copy(J.position),this.rotation.order=J.rotation.order,this.quaternion.copy(J.quaternion),this.scale.copy(J.scale),this.matrix.copy(J.matrix),this.matrixWorld.copy(J.matrixWorld),this.matrixAutoUpdate=J.matrixAutoUpdate,this.matrixWorldNeedsUpdate=J.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=J.matrixWorldAutoUpdate,this.layers.mask=J.layers.mask,this.visible=J.visible,this.castShadow=J.castShadow,this.receiveShadow=J.receiveShadow,this.frustumCulled=J.frustumCulled,this.renderOrder=J.renderOrder,this.animations=J.animations.slice(),this.userData=JSON.parse(JSON.stringify(J.userData)),$===!0)for(let Z=0;Z0)return Q.multiplyScalar(1/Math.sqrt(W));return Q.set(0,0,0)}static getBarycoord(J,$,Z,Q,W){wJ.subVectors(Q,$),bJ.subVectors(Z,$),x7.subVectors(J,$);const Y=wJ.dot(wJ),H=wJ.dot(bJ),X=wJ.dot(x7),K=bJ.dot(bJ),G=bJ.dot(x7),U=Y*K-H*H;if(U===0)return W.set(-2,-1,-1);const V=1/U,R=(K*X-H*G)*V,D=(Y*G-H*X)*V;return W.set(1-R-D,D,R)}static containsPoint(J,$,Z,Q){return this.getBarycoord(J,$,Z,Q,xJ),xJ.x>=0&&xJ.y>=0&&xJ.x+xJ.y<=1}static getUV(J,$,Z,Q,W,Y,H,X){if(a6===!1)console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),a6=!0;return this.getInterpolation(J,$,Z,Q,W,Y,H,X)}static getInterpolation(J,$,Z,Q,W,Y,H,X){return this.getBarycoord(J,$,Z,Q,xJ),X.setScalar(0),X.addScaledVector(W,xJ.x),X.addScaledVector(Y,xJ.y),X.addScaledVector(H,xJ.z),X}static isFrontFacing(J,$,Z,Q){return wJ.subVectors(Z,$),bJ.subVectors(J,$),wJ.cross(bJ).dot(Q)<0?!0:!1}set(J,$,Z){return this.a.copy(J),this.b.copy($),this.c.copy(Z),this}setFromPointsAndIndices(J,$,Z,Q){return this.a.copy(J[$]),this.b.copy(J[Z]),this.c.copy(J[Q]),this}setFromAttributeAndIndices(J,$,Z,Q){return this.a.fromBufferAttribute(J,$),this.b.fromBufferAttribute(J,Z),this.c.fromBufferAttribute(J,Q),this}clone(){return new this.constructor().copy(this)}copy(J){return this.a.copy(J.a),this.b.copy(J.b),this.c.copy(J.c),this}getArea(){return wJ.subVectors(this.c,this.b),bJ.subVectors(this.a,this.b),wJ.cross(bJ).length()*0.5}getMidpoint(J){return J.addVectors(this.a,this.b).add(this.c).multiplyScalar(0.3333333333333333)}getNormal(J){return kJ.getNormal(this.a,this.b,this.c,J)}getPlane(J){return J.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(J,$){return kJ.getBarycoord(J,this.a,this.b,this.c,$)}getUV(J,$,Z,Q,W){if(a6===!1)console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),a6=!0;return kJ.getInterpolation(J,this.a,this.b,this.c,$,Z,Q,W)}getInterpolation(J,$,Z,Q,W){return kJ.getInterpolation(J,this.a,this.b,this.c,$,Z,Q,W)}containsPoint(J){return kJ.containsPoint(J,this.a,this.b,this.c)}isFrontFacing(J){return kJ.isFrontFacing(this.a,this.b,this.c,J)}intersectsBox(J){return J.intersectsTriangle(this)}closestPointToPoint(J,$){const Z=this.a,Q=this.b,W=this.c;let Y,H;U6.subVectors(Q,Z),q6.subVectors(W,Z),h7.subVectors(J,Z);const X=U6.dot(h7),K=q6.dot(h7);if(X<=0&&K<=0)return $.copy(Z);g7.subVectors(J,Q);const G=U6.dot(g7),U=q6.dot(g7);if(G>=0&&U<=G)return $.copy(Q);const V=X*U-G*K;if(V<=0&&X>=0&&G<=0)return Y=X/(X-G),$.copy(Z).addScaledVector(U6,Y);p7.subVectors(J,W);const R=U6.dot(p7),D=q6.dot(p7);if(D>=0&&R<=D)return $.copy(W);const M=R*K-X*D;if(M<=0&&K>=0&&D<=0)return H=K/(K-D),$.copy(Z).addScaledVector(q6,H);const O=G*D-R*U;if(O<=0&&U-G>=0&&R-D>=0)return y8.subVectors(W,Q),H=(U-G)/(U-G+(R-D)),$.copy(Q).addScaledVector(y8,H);const E=1/(O+M+V);return Y=M*E,H=V*E,$.copy(Z).addScaledVector(U6,Y).addScaledVector(q6,H)}equals(J){return J.a.equals(this.a)&&J.b.equals(this.b)&&J.c.equals(this.c)}}var X$=0;class w6 extends Z6{constructor(){super();this.isMaterial=!0,Object.defineProperty(this,"id",{value:X$++}),this.uuid=h6(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(J){if(this._alphaTest>0!==J>0)this.version++;this._alphaTest=J}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(J){if(J===void 0)return;for(let $ in J){const Z=J[$];if(Z===void 0){console.warn(`THREE.Material: parameter '${$}' has value of undefined.`);continue}const Q=this[$];if(Q===void 0){console.warn(`THREE.Material: '${$}' is not a property of THREE.${this.type}.`);continue}if(Q&&Q.isColor)Q.set(Z);else if(Q&&Q.isVector3&&(Z&&Z.isVector3))Q.copy(Z);else this[$]=Z}}toJSON(J){const $=J===void 0||typeof J==="string";if($)J={textures:{},images:{}};const Z={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};if(Z.uuid=this.uuid,Z.type=this.type,this.name!=="")Z.name=this.name;if(this.color&&this.color.isColor)Z.color=this.color.getHex();if(this.roughness!==void 0)Z.roughness=this.roughness;if(this.metalness!==void 0)Z.metalness=this.metalness;if(this.sheen!==void 0)Z.sheen=this.sheen;if(this.sheenColor&&this.sheenColor.isColor)Z.sheenColor=this.sheenColor.getHex();if(this.sheenRoughness!==void 0)Z.sheenRoughness=this.sheenRoughness;if(this.emissive&&this.emissive.isColor)Z.emissive=this.emissive.getHex();if(this.emissiveIntensity&&this.emissiveIntensity!==1)Z.emissiveIntensity=this.emissiveIntensity;if(this.specular&&this.specular.isColor)Z.specular=this.specular.getHex();if(this.specularIntensity!==void 0)Z.specularIntensity=this.specularIntensity;if(this.specularColor&&this.specularColor.isColor)Z.specularColor=this.specularColor.getHex();if(this.shininess!==void 0)Z.shininess=this.shininess;if(this.clearcoat!==void 0)Z.clearcoat=this.clearcoat;if(this.clearcoatRoughness!==void 0)Z.clearcoatRoughness=this.clearcoatRoughness;if(this.clearcoatMap&&this.clearcoatMap.isTexture)Z.clearcoatMap=this.clearcoatMap.toJSON(J).uuid;if(this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture)Z.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(J).uuid;if(this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture)Z.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(J).uuid,Z.clearcoatNormalScale=this.clearcoatNormalScale.toArray();if(this.iridescence!==void 0)Z.iridescence=this.iridescence;if(this.iridescenceIOR!==void 0)Z.iridescenceIOR=this.iridescenceIOR;if(this.iridescenceThicknessRange!==void 0)Z.iridescenceThicknessRange=this.iridescenceThicknessRange;if(this.iridescenceMap&&this.iridescenceMap.isTexture)Z.iridescenceMap=this.iridescenceMap.toJSON(J).uuid;if(this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture)Z.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(J).uuid;if(this.anisotropy!==void 0)Z.anisotropy=this.anisotropy;if(this.anisotropyRotation!==void 0)Z.anisotropyRotation=this.anisotropyRotation;if(this.anisotropyMap&&this.anisotropyMap.isTexture)Z.anisotropyMap=this.anisotropyMap.toJSON(J).uuid;if(this.map&&this.map.isTexture)Z.map=this.map.toJSON(J).uuid;if(this.matcap&&this.matcap.isTexture)Z.matcap=this.matcap.toJSON(J).uuid;if(this.alphaMap&&this.alphaMap.isTexture)Z.alphaMap=this.alphaMap.toJSON(J).uuid;if(this.lightMap&&this.lightMap.isTexture)Z.lightMap=this.lightMap.toJSON(J).uuid,Z.lightMapIntensity=this.lightMapIntensity;if(this.aoMap&&this.aoMap.isTexture)Z.aoMap=this.aoMap.toJSON(J).uuid,Z.aoMapIntensity=this.aoMapIntensity;if(this.bumpMap&&this.bumpMap.isTexture)Z.bumpMap=this.bumpMap.toJSON(J).uuid,Z.bumpScale=this.bumpScale;if(this.normalMap&&this.normalMap.isTexture)Z.normalMap=this.normalMap.toJSON(J).uuid,Z.normalMapType=this.normalMapType,Z.normalScale=this.normalScale.toArray();if(this.displacementMap&&this.displacementMap.isTexture)Z.displacementMap=this.displacementMap.toJSON(J).uuid,Z.displacementScale=this.displacementScale,Z.displacementBias=this.displacementBias;if(this.roughnessMap&&this.roughnessMap.isTexture)Z.roughnessMap=this.roughnessMap.toJSON(J).uuid;if(this.metalnessMap&&this.metalnessMap.isTexture)Z.metalnessMap=this.metalnessMap.toJSON(J).uuid;if(this.emissiveMap&&this.emissiveMap.isTexture)Z.emissiveMap=this.emissiveMap.toJSON(J).uuid;if(this.specularMap&&this.specularMap.isTexture)Z.specularMap=this.specularMap.toJSON(J).uuid;if(this.specularIntensityMap&&this.specularIntensityMap.isTexture)Z.specularIntensityMap=this.specularIntensityMap.toJSON(J).uuid;if(this.specularColorMap&&this.specularColorMap.isTexture)Z.specularColorMap=this.specularColorMap.toJSON(J).uuid;if(this.envMap&&this.envMap.isTexture){if(Z.envMap=this.envMap.toJSON(J).uuid,this.combine!==void 0)Z.combine=this.combine}if(this.envMapIntensity!==void 0)Z.envMapIntensity=this.envMapIntensity;if(this.reflectivity!==void 0)Z.reflectivity=this.reflectivity;if(this.refractionRatio!==void 0)Z.refractionRatio=this.refractionRatio;if(this.gradientMap&&this.gradientMap.isTexture)Z.gradientMap=this.gradientMap.toJSON(J).uuid;if(this.transmission!==void 0)Z.transmission=this.transmission;if(this.transmissionMap&&this.transmissionMap.isTexture)Z.transmissionMap=this.transmissionMap.toJSON(J).uuid;if(this.thickness!==void 0)Z.thickness=this.thickness;if(this.thicknessMap&&this.thicknessMap.isTexture)Z.thicknessMap=this.thicknessMap.toJSON(J).uuid;if(this.attenuationDistance!==void 0&&this.attenuationDistance!==Infinity)Z.attenuationDistance=this.attenuationDistance;if(this.attenuationColor!==void 0)Z.attenuationColor=this.attenuationColor.getHex();if(this.size!==void 0)Z.size=this.size;if(this.shadowSide!==null)Z.shadowSide=this.shadowSide;if(this.sizeAttenuation!==void 0)Z.sizeAttenuation=this.sizeAttenuation;if(this.blending!==1)Z.blending=this.blending;if(this.side!==0)Z.side=this.side;if(this.vertexColors===!0)Z.vertexColors=!0;if(this.opacity<1)Z.opacity=this.opacity;if(this.transparent===!0)Z.transparent=!0;if(Z.depthFunc=this.depthFunc,Z.depthTest=this.depthTest,Z.depthWrite=this.depthWrite,Z.colorWrite=this.colorWrite,Z.stencilWrite=this.stencilWrite,Z.stencilWriteMask=this.stencilWriteMask,Z.stencilFunc=this.stencilFunc,Z.stencilRef=this.stencilRef,Z.stencilFuncMask=this.stencilFuncMask,Z.stencilFail=this.stencilFail,Z.stencilZFail=this.stencilZFail,Z.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0)Z.rotation=this.rotation;if(this.polygonOffset===!0)Z.polygonOffset=!0;if(this.polygonOffsetFactor!==0)Z.polygonOffsetFactor=this.polygonOffsetFactor;if(this.polygonOffsetUnits!==0)Z.polygonOffsetUnits=this.polygonOffsetUnits;if(this.linewidth!==void 0&&this.linewidth!==1)Z.linewidth=this.linewidth;if(this.dashSize!==void 0)Z.dashSize=this.dashSize;if(this.gapSize!==void 0)Z.gapSize=this.gapSize;if(this.scale!==void 0)Z.scale=this.scale;if(this.dithering===!0)Z.dithering=!0;if(this.alphaTest>0)Z.alphaTest=this.alphaTest;if(this.alphaHash===!0)Z.alphaHash=!0;if(this.alphaToCoverage===!0)Z.alphaToCoverage=!0;if(this.premultipliedAlpha===!0)Z.premultipliedAlpha=!0;if(this.forceSinglePass===!0)Z.forceSinglePass=!0;if(this.wireframe===!0)Z.wireframe=!0;if(this.wireframeLinewidth>1)Z.wireframeLinewidth=this.wireframeLinewidth;if(this.wireframeLinecap!=="round")Z.wireframeLinecap=this.wireframeLinecap;if(this.wireframeLinejoin!=="round")Z.wireframeLinejoin=this.wireframeLinejoin;if(this.flatShading===!0)Z.flatShading=!0;if(this.visible===!1)Z.visible=!1;if(this.toneMapped===!1)Z.toneMapped=!1;if(this.fog===!1)Z.fog=!1;if(Object.keys(this.userData).length>0)Z.userData=this.userData;function Q(W){const Y=[];for(let H in W){const X=W[H];delete X.metadata,Y.push(X)}return Y}if($){const W=Q(J.textures),Y=Q(J.images);if(W.length>0)Z.textures=W;if(Y.length>0)Z.images=Y}return Z}clone(){return new this.constructor().copy(this)}copy(J){this.name=J.name,this.blending=J.blending,this.side=J.side,this.vertexColors=J.vertexColors,this.opacity=J.opacity,this.transparent=J.transparent,this.blendSrc=J.blendSrc,this.blendDst=J.blendDst,this.blendEquation=J.blendEquation,this.blendSrcAlpha=J.blendSrcAlpha,this.blendDstAlpha=J.blendDstAlpha,this.blendEquationAlpha=J.blendEquationAlpha,this.depthFunc=J.depthFunc,this.depthTest=J.depthTest,this.depthWrite=J.depthWrite,this.stencilWriteMask=J.stencilWriteMask,this.stencilFunc=J.stencilFunc,this.stencilRef=J.stencilRef,this.stencilFuncMask=J.stencilFuncMask,this.stencilFail=J.stencilFail,this.stencilZFail=J.stencilZFail,this.stencilZPass=J.stencilZPass,this.stencilWrite=J.stencilWrite;const $=J.clippingPlanes;let Z=null;if($!==null){const Q=$.length;Z=new Array(Q);for(let W=0;W!==Q;++W)Z[W]=$[W].clone()}return this.clippingPlanes=Z,this.clipIntersection=J.clipIntersection,this.clipShadows=J.clipShadows,this.shadowSide=J.shadowSide,this.colorWrite=J.colorWrite,this.precision=J.precision,this.polygonOffset=J.polygonOffset,this.polygonOffsetFactor=J.polygonOffsetFactor,this.polygonOffsetUnits=J.polygonOffsetUnits,this.dithering=J.dithering,this.alphaTest=J.alphaTest,this.alphaHash=J.alphaHash,this.alphaToCoverage=J.alphaToCoverage,this.premultipliedAlpha=J.premultipliedAlpha,this.forceSinglePass=J.forceSinglePass,this.visible=J.visible,this.toneMapped=J.toneMapped,this.userData=JSON.parse(JSON.stringify(J.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(J){if(J===!0)this.version++}}var V9={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},uJ={h:0,s:0,l:0},t6={h:0,s:0,l:0};class g0{constructor(J,$,Z){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(J,$,Z)}set(J,$,Z){if($===void 0&&Z===void 0){const Q=J;if(Q&&Q.isColor)this.copy(Q);else if(typeof Q==="number")this.setHex(Q);else if(typeof Q==="string")this.setStyle(Q)}else this.setRGB(J,$,Z);return this}setScalar(J){return this.r=J,this.g=J,this.b=J,this}setHex(J,$="srgb"){return J=Math.floor(J),this.r=(J>>16&255)/255,this.g=(J>>8&255)/255,this.b=(J&255)/255,h0.toWorkingColorSpace(this,$),this}setRGB(J,$,Z,Q=h0.workingColorSpace){return this.r=J,this.g=$,this.b=Z,h0.toWorkingColorSpace(this,Q),this}setHSL(J,$,Z,Q=h0.workingColorSpace){if(J=s9(J,1),$=RJ($,0,1),Z=RJ(Z,0,1),$===0)this.r=this.g=this.b=Z;else{const W=Z<=0.5?Z*(1+$):Z+$-Z*$,Y=2*Z-W;this.r=m7(Y,W,J+0.3333333333333333),this.g=m7(Y,W,J),this.b=m7(Y,W,J-0.3333333333333333)}return h0.toWorkingColorSpace(this,Q),this}setStyle(J,$="srgb"){function Z(W){if(W===void 0)return;if(parseFloat(W)<1)console.warn("THREE.Color: Alpha component of "+J+" will be ignored.")}let Q;if(Q=/^(\w+)\(([^\)]*)\)/.exec(J)){let W;const Y=Q[1],H=Q[2];switch(Y){case"rgb":case"rgba":if(W=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(H))return Z(W[4]),this.setRGB(Math.min(255,parseInt(W[1],10))/255,Math.min(255,parseInt(W[2],10))/255,Math.min(255,parseInt(W[3],10))/255,$);if(W=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(H))return Z(W[4]),this.setRGB(Math.min(100,parseInt(W[1],10))/100,Math.min(100,parseInt(W[2],10))/100,Math.min(100,parseInt(W[3],10))/100,$);break;case"hsl":case"hsla":if(W=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(H))return Z(W[4]),this.setHSL(parseFloat(W[1])/360,parseFloat(W[2])/100,parseFloat(W[3])/100,$);break;default:console.warn("THREE.Color: Unknown color model "+J)}}else if(Q=/^\#([A-Fa-f\d]+)$/.exec(J)){const W=Q[1],Y=W.length;if(Y===3)return this.setRGB(parseInt(W.charAt(0),16)/15,parseInt(W.charAt(1),16)/15,parseInt(W.charAt(2),16)/15,$);else if(Y===6)return this.setHex(parseInt(W,16),$);else console.warn("THREE.Color: Invalid hex color "+J)}else if(J&&J.length>0)return this.setColorName(J,$);return this}setColorName(J,$="srgb"){const Z=V9[J.toLowerCase()];if(Z!==void 0)this.setHex(Z,$);else console.warn("THREE.Color: Unknown color "+J);return this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(J){return this.r=J.r,this.g=J.g,this.b=J.b,this}copySRGBToLinear(J){return this.r=z6(J.r),this.g=z6(J.g),this.b=z6(J.b),this}copyLinearToSRGB(J){return this.r=P7(J.r),this.g=P7(J.g),this.b=P7(J.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(J="srgb"){return h0.fromWorkingColorSpace(HJ.copy(this),J),Math.round(RJ(HJ.r*255,0,255))*65536+Math.round(RJ(HJ.g*255,0,255))*256+Math.round(RJ(HJ.b*255,0,255))}getHexString(J="srgb"){return("000000"+this.getHex(J).toString(16)).slice(-6)}getHSL(J,$=h0.workingColorSpace){h0.fromWorkingColorSpace(HJ.copy(this),$);const{r:Z,g:Q,b:W}=HJ,Y=Math.max(Z,Q,W),H=Math.min(Z,Q,W);let X,K;const G=(H+Y)/2;if(H===Y)X=0,K=0;else{const U=Y-H;switch(K=G<=0.5?U/(Y+H):U/(2-Y-H),Y){case Z:X=(Q-W)/U+(Q0)J.userData=this.userData;if(this.parameters!==void 0){const X=this.parameters;for(let K in X)if(X[K]!==void 0)J[K]=X[K];return J}J.data={attributes:{}};const $=this.index;if($!==null)J.data.index={type:$.array.constructor.name,array:Array.prototype.slice.call($.array)};const Z=this.attributes;for(let X in Z){const K=Z[X];J.data.attributes[X]=K.toJSON(J.data)}const Q={};let W=!1;for(let X in this.morphAttributes){const K=this.morphAttributes[X],G=[];for(let U=0,V=K.length;U0)Q[X]=G,W=!0}if(W)J.data.morphAttributes=Q,J.data.morphTargetsRelative=this.morphTargetsRelative;const Y=this.groups;if(Y.length>0)J.data.groups=JSON.parse(JSON.stringify(Y));const H=this.boundingSphere;if(H!==null)J.data.boundingSphere={center:H.center.toArray(),radius:H.radius};return J}clone(){return new this.constructor().copy(this)}copy(J){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const $={};this.name=J.name;const Z=J.index;if(Z!==null)this.setIndex(Z.clone($));const Q=J.attributes;for(let K in Q){const G=Q[K];this.setAttribute(K,G.clone($))}const W=J.morphAttributes;for(let K in W){const G=[],U=W[K];for(let V=0,R=U.length;V0){const Q=$[Z[0]];if(Q!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let W=0,Y=Q.length;W(J.far-J.near)**2)return}if(f8.copy(W).invert(),tJ.copy(J.ray).applyMatrix4(f8),Z.boundingBox!==null){if(tJ.intersectsBox(Z.boundingBox)===!1)return}this._computeIntersections(J,$,tJ)}_computeIntersections(J,$,Z){let Q;const W=this.geometry,Y=this.material,H=W.index,X=W.attributes.position,K=W.attributes.uv,G=W.attributes.uv1,U=W.attributes.normal,V=W.groups,R=W.drawRange;if(H!==null)if(Array.isArray(Y))for(let D=0,M=V.length;D0?1:-1,G.push(r.x,r.y,r.z),U.push(h/w),U.push(1-p/g),n+=1}}for(let p=0;p0)$.defines=this.defines;$.vertexShader=this.vertexShader,$.fragmentShader=this.fragmentShader,$.lights=this.lights,$.clipping=this.clipping;const Z={};for(let Q in this.extensions)if(this.extensions[Q]===!0)Z[Q]=!0;if(Object.keys(Z).length>0)$.extensions=Z;return $}}class H8 extends DJ{constructor(){super();this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ZJ,this.projectionMatrix=new ZJ,this.projectionMatrixInverse=new ZJ,this.coordinateSystem=2000}copy(J,$){return super.copy(J,$),this.matrixWorldInverse.copy(J.matrixWorldInverse),this.projectionMatrix.copy(J.projectionMatrix),this.projectionMatrixInverse.copy(J.projectionMatrixInverse),this.coordinateSystem=J.coordinateSystem,this}getWorldDirection(J){return super.getWorldDirection(J).negate()}updateMatrixWorld(J){super.updateMatrixWorld(J),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(J,$){super.updateWorldMatrix(J,$),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class EJ extends H8{constructor(J=50,$=1,Z=0.1,Q=2000){super();this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=J,this.zoom=1,this.near=Z,this.far=Q,this.focus=10,this.aspect=$,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(J,$){return super.copy(J,$),this.fov=J.fov,this.zoom=J.zoom,this.near=J.near,this.far=J.far,this.focus=J.focus,this.aspect=J.aspect,this.view=J.view===null?null:Object.assign({},J.view),this.filmGauge=J.filmGauge,this.filmOffset=J.filmOffset,this}setFocalLength(J){const $=0.5*this.getFilmHeight()/J;this.fov=o7*2*Math.atan($),this.updateProjectionMatrix()}getFocalLength(){const J=Math.tan(C7*0.5*this.fov);return 0.5*this.getFilmHeight()/J}getEffectiveFOV(){return o7*2*Math.atan(Math.tan(C7*0.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(J,$,Z,Q,W,Y){if(this.aspect=J/$,this.view===null)this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1};this.view.enabled=!0,this.view.fullWidth=J,this.view.fullHeight=$,this.view.offsetX=Z,this.view.offsetY=Q,this.view.width=W,this.view.height=Y,this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null)this.view.enabled=!1;this.updateProjectionMatrix()}updateProjectionMatrix(){const J=this.near;let $=J*Math.tan(C7*0.5*this.fov)/this.zoom,Z=2*$,Q=this.aspect*Z,W=-0.5*Q;const Y=this.view;if(this.view!==null&&this.view.enabled){const{fullWidth:X,fullHeight:K}=Y;W+=Y.offsetX*Q/X,$-=Y.offsetY*Z/K,Q*=Y.width/X,Z*=Y.height/K}const H=this.filmOffset;if(H!==0)W+=J*H/this.getFilmWidth();this.projectionMatrix.makePerspective(W,W+Q,$,$-Z,J,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(J){const $=super.toJSON(J);if($.object.fov=this.fov,$.object.zoom=this.zoom,$.object.near=this.near,$.object.far=this.far,$.object.focus=this.focus,$.object.aspect=this.aspect,this.view!==null)$.object.view=Object.assign({},this.view);return $.object.filmGauge=this.filmGauge,$.object.filmOffset=this.filmOffset,$}}var N6=-90,O6=1;class q9 extends DJ{constructor(J,$,Z){super();this.type="CubeCamera",this.renderTarget=Z,this.coordinateSystem=null,this.activeMipmapLevel=0;const Q=new EJ(N6,O6,J,$);Q.layers=this.layers,this.add(Q);const W=new EJ(N6,O6,J,$);W.layers=this.layers,this.add(W);const Y=new EJ(N6,O6,J,$);Y.layers=this.layers,this.add(Y);const H=new EJ(N6,O6,J,$);H.layers=this.layers,this.add(H);const X=new EJ(N6,O6,J,$);X.layers=this.layers,this.add(X);const K=new EJ(N6,O6,J,$);K.layers=this.layers,this.add(K)}updateCoordinateSystem(){const J=this.coordinateSystem,$=this.children.concat(),[Z,Q,W,Y,H,X]=$;for(let K of $)this.remove(K);if(J===2000)Z.up.set(0,1,0),Z.lookAt(1,0,0),Q.up.set(0,1,0),Q.lookAt(-1,0,0),W.up.set(0,0,-1),W.lookAt(0,1,0),Y.up.set(0,0,1),Y.lookAt(0,-1,0),H.up.set(0,1,0),H.lookAt(0,0,1),X.up.set(0,1,0),X.lookAt(0,0,-1);else if(J===2001)Z.up.set(0,-1,0),Z.lookAt(-1,0,0),Q.up.set(0,-1,0),Q.lookAt(1,0,0),W.up.set(0,0,1),W.lookAt(0,1,0),Y.up.set(0,0,-1),Y.lookAt(0,-1,0),H.up.set(0,-1,0),H.lookAt(0,0,1),X.up.set(0,-1,0),X.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+J);for(let K of $)this.add(K),K.updateMatrixWorld()}update(J,$){if(this.parent===null)this.updateMatrixWorld();const{renderTarget:Z,activeMipmapLevel:Q}=this;if(this.coordinateSystem!==J.coordinateSystem)this.coordinateSystem=J.coordinateSystem,this.updateCoordinateSystem();const[W,Y,H,X,K,G]=this.children,U=J.getRenderTarget(),V=J.getActiveCubeFace(),R=J.getActiveMipmapLevel(),D=J.xr.enabled;J.xr.enabled=!1;const M=Z.texture.generateMipmaps;Z.texture.generateMipmaps=!1,J.setRenderTarget(Z,0,Q),J.render($,W),J.setRenderTarget(Z,1,Q),J.render($,Y),J.setRenderTarget(Z,2,Q),J.render($,H),J.setRenderTarget(Z,3,Q),J.render($,X),J.setRenderTarget(Z,4,Q),J.render($,K),Z.texture.generateMipmaps=M,J.setRenderTarget(Z,5,Q),J.render($,G),J.setRenderTarget(U,V,R),J.xr.enabled=D,Z.texture.needsPMREMUpdate=!0}}class K8 extends MJ{constructor(J,$,Z,Q,W,Y,H,X,K,G){J=J!==void 0?J:[],$=$!==void 0?$:301;super(J,$,Z,Q,W,Y,H,X,K,G);this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(J){this.image=J}}class R9 extends nJ{constructor(J=1,$={}){super(J,J,$);this.isWebGLCubeRenderTarget=!0;const Z={width:J,height:J,depth:1},Q=[Z,Z,Z,Z,Z,Z];if($.encoding!==void 0)b6("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),$.colorSpace=$.encoding===3001?"srgb":"";this.texture=new K8(Q,$.mapping,$.wrapS,$.wrapT,$.magFilter,$.minFilter,$.format,$.type,$.anisotropy,$.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=$.generateMipmaps!==void 0?$.generateMipmaps:!1,this.texture.minFilter=$.minFilter!==void 0?$.minFilter:1006}fromEquirectangularTexture(J,$){this.texture.type=$.type,this.texture.colorSpace=$.colorSpace,this.texture.generateMipmaps=$.generateMipmaps,this.texture.minFilter=$.minFilter,this.texture.magFilter=$.magFilter;const Z={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -183,4 +183,4 @@ var h6=function(){const J=Math.random()*4294967295|0,$=Math.random()*4294967295| gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},Q=new p6(5,5,5),W=new sJ({name:"CubemapFromEquirect",uniforms:B6(Z.uniforms),vertexShader:Z.vertexShader,fragmentShader:Z.fragmentShader,side:1,blending:0});W.uniforms.tEquirect.value=$;const Y=new hJ(Q,W),H=$.minFilter;if($.minFilter===1008)$.minFilter=1006;return new q9(1,10,this).update(J,Y),$.minFilter=H,Y.geometry.dispose(),Y.material.dispose(),this}clear(J,$,Z,Q){const W=J.getRenderTarget();for(let Y=0;Y<6;Y++)J.setRenderTarget(this,Y),J.clear($,Z,Q);J.setRenderTarget(W)}}var d7=new v,R$=new v,D$=new A0;class dJ{constructor(J=new v(1,0,0),$=0){this.isPlane=!0,this.normal=J,this.constant=$}set(J,$){return this.normal.copy(J),this.constant=$,this}setComponents(J,$,Z,Q){return this.normal.set(J,$,Z),this.constant=Q,this}setFromNormalAndCoplanarPoint(J,$){return this.normal.copy(J),this.constant=-$.dot(this.normal),this}setFromCoplanarPoints(J,$,Z){const Q=d7.subVectors(Z,$).cross(R$.subVectors(J,$)).normalize();return this.setFromNormalAndCoplanarPoint(Q,J),this}copy(J){return this.normal.copy(J.normal),this.constant=J.constant,this}normalize(){const J=1/this.normal.length();return this.normal.multiplyScalar(J),this.constant*=J,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(J){return this.normal.dot(J)+this.constant}distanceToSphere(J){return this.distanceToPoint(J.center)-J.radius}projectPoint(J,$){return $.copy(J).addScaledVector(this.normal,-this.distanceToPoint(J))}intersectLine(J,$){const Z=J.delta(d7),Q=this.normal.dot(Z);if(Q===0){if(this.distanceToPoint(J.start)===0)return $.copy(J.start);return null}const W=-(J.start.dot(this.normal)+this.constant)/Q;if(W<0||W>1)return null;return $.copy(J.start).addScaledVector(Z,W)}intersectsLine(J){const $=this.distanceToPoint(J.start),Z=this.distanceToPoint(J.end);return $<0&&Z>0||Z<0&&$>0}intersectsBox(J){return J.intersectsPlane(this)}intersectsSphere(J){return J.intersectsPlane(this)}coplanarPoint(J){return J.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(J,$){const Z=$||D$.getNormalMatrix(J),Q=this.coplanarPoint(d7).applyMatrix4(J),W=this.normal.applyMatrix3(Z).normalize();return this.constant=-Q.dot(W),this}translate(J){return this.constant-=J.dot(this.normal),this}equals(J){return J.normal.equals(this.normal)&&J.constant===this.constant}clone(){return new this.constructor().copy(this)}}var eJ=new g6,K7=new v;class G8{constructor(J=new dJ,$=new dJ,Z=new dJ,Q=new dJ,W=new dJ,Y=new dJ){this.planes=[J,$,Z,Q,W,Y]}set(J,$,Z,Q,W,Y){const H=this.planes;return H[0].copy(J),H[1].copy($),H[2].copy(Z),H[3].copy(Q),H[4].copy(W),H[5].copy(Y),this}copy(J){const $=this.planes;for(let Z=0;Z<6;Z++)$[Z].copy(J.planes[Z]);return this}setFromProjectionMatrix(J,$=2000){const Z=this.planes,Q=J.elements,W=Q[0],Y=Q[1],H=Q[2],X=Q[3],G=Q[4],K=Q[5],U=Q[6],V=Q[7],R=Q[8],E=Q[9],O=Q[10],M=Q[11],D=Q[12],q=Q[13],I=Q[14],z=Q[15];if(Z[0].setComponents(X-W,V-G,M-R,z-D).normalize(),Z[1].setComponents(X+W,V+G,M+R,z+D).normalize(),Z[2].setComponents(X+Y,V+K,M+E,z+q).normalize(),Z[3].setComponents(X-Y,V-K,M-E,z-q).normalize(),Z[4].setComponents(X-H,V-U,M-O,z-I).normalize(),$===2000)Z[5].setComponents(X+H,V+U,M+O,z+I).normalize();else if($===2001)Z[5].setComponents(H,U,O,I).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+$);return this}intersectsObject(J){if(J.boundingSphere!==void 0){if(J.boundingSphere===null)J.computeBoundingSphere();eJ.copy(J.boundingSphere).applyMatrix4(J.matrixWorld)}else{const $=J.geometry;if($.boundingSphere===null)$.computeBoundingSphere();eJ.copy($.boundingSphere).applyMatrix4(J.matrixWorld)}return this.intersectsSphere(eJ)}intersectsSprite(J){return eJ.center.set(0,0,0),eJ.radius=0.7071067811865476,eJ.applyMatrix4(J.matrixWorld),this.intersectsSphere(eJ)}intersectsSphere(J){const $=this.planes,Z=J.center,Q=-J.radius;for(let W=0;W<6;W++)if($[W].distanceToPoint(Z)0?J.max.x:J.min.x,K7.y=Q.normal.y>0?J.max.y:J.min.y,K7.z=Q.normal.z>0?J.max.z:J.min.z,Q.distanceToPoint(K7)<0)return!1}return!0}containsPoint(J){const $=this.planes;for(let Z=0;Z<6;Z++)if($[Z].distanceToPoint(J)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class V8 extends PJ{constructor(J=1,$=1,Z=1,Q=1){super();this.type="PlaneGeometry",this.parameters={width:J,height:$,widthSegments:Z,heightSegments:Q};const W=J/2,Y=$/2,H=Math.floor(Z),X=Math.floor(Q),G=H+1,K=X+1,U=J/H,V=$/X,R=[],E=[],O=[],M=[];for(let D=0;D0)this._blur(W,0,0,$);return this._applyPMREM(W),this._cleanup(W),W}fromEquirectangular(J,$=null){return this._fromTexture(J,$)}fromCubemap(J,$=null){return this._fromTexture(J,$)}compileCubemapShader(){if(this._cubemapMaterial===null)this._cubemapMaterial=u8(),this._compileMaterial(this._cubemapMaterial)}compileEquirectangularShader(){if(this._equirectMaterial===null)this._equirectMaterial=l8(),this._compileMaterial(this._equirectMaterial)}dispose(){if(this._dispose(),this._cubemapMaterial!==null)this._cubemapMaterial.dispose();if(this._equirectMaterial!==null)this._equirectMaterial.dispose()}_setSize(J){this._lodMax=Math.floor(Math.log2(J)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){if(this._blurMaterial!==null)this._blurMaterial.dispose();if(this._pingPongRenderTarget!==null)this._pingPongRenderTarget.dispose();for(let J=0;J2?I:0,I,I),K.setRenderTarget(Q),O)K.render(E,H);K.render(J,H)}E.geometry.dispose(),E.material.dispose(),K.toneMapping=V,K.autoClear=U,J.background=M}_textureToCubeUV(J,$){const Z=this._renderer,Q=J.mapping===301||J.mapping===302;if(Q){if(this._cubemapMaterial===null)this._cubemapMaterial=u8();this._cubemapMaterial.uniforms.flipEnvMap.value=J.isRenderTargetTexture===!1?-1:1}else if(this._equirectMaterial===null)this._equirectMaterial=l8();const W=Q?this._cubemapMaterial:this._equirectMaterial,Y=new hJ(this._lodPlanes[0],W),H=W.uniforms;H.envMap.value=J;const X=this._cubeSize;V7($,0,0,3*X,2*X),Z.setRenderTarget($),Z.render(Y,c7)}_applyPMREM(J){const $=this._renderer,Z=$.autoClear;$.autoClear=!1;for(let Q=1;Q$6)console.warn(`sigmaRadians, ${W}, is too large and will clip, as it requested ${M} samples when the maximum is set to ${$6}`);const D=[];let q=0;for(let w=0;w<$6;++w){const g=w/O,u=Math.exp(-g*g/2);if(D.push(u),w===0)q+=u;else if(wI-_6?Q-I+_6:0),L=4*(this._cubeSize-z);V7($,A,L,3*z,2*z),X.setRenderTarget($),X.render(U,c7)}}var F9=new MJ,N9=new $8,O9=new G9,M9=new K8,d8=[],c8=[],n8=new Float32Array(16),s8=new Float32Array(9),o8=new Float32Array(4);class _9{constructor(J,$,Z){this.id=J,this.addr=Z,this.cache=[],this.setValue=PQ($.type)}}class z9{constructor(J,$,Z){this.id=J,this.addr=Z,this.cache=[],this.size=$.size,this.setValue=iQ($.type)}}class B9{constructor(J){this.id=J,this.seq=[],this.map={}}setValue(J,$,Z){const Q=this.seq;for(let W=0,Y=Q.length;W!==Y;++W){const H=Q[W];H.setValue(J,$[H.id],Z)}}}var s7=/(\w+)(\])?(\[|\.)?/g;class x6{constructor(J,$){this.seq=[],this.map={};const Z=J.getProgramParameter($,J.ACTIVE_UNIFORMS);for(let Q=0;Q/gm,XW=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]),KW=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g,FW=0;class I9{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(J){const{vertexShader:$,fragmentShader:Z}=J,Q=this._getShaderStage($),W=this._getShaderStage(Z),Y=this._getShaderCacheForMaterial(J);if(Y.has(Q)===!1)Y.add(Q),Q.usedTimes++;if(Y.has(W)===!1)Y.add(W),W.usedTimes++;return this}remove(J){const $=this.materialCache.get(J);for(let Z of $)if(Z.usedTimes--,Z.usedTimes===0)this.shaderCache.delete(Z.code);return this.materialCache.delete(J),this}getVertexShaderID(J){return this._getShaderStage(J.vertexShader).id}getFragmentShaderID(J){return this._getShaderStage(J.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(J){const $=this.materialCache;let Z=$.get(J);if(Z===void 0)Z=new Set,$.set(J,Z);return Z}_getShaderStage(J){const $=this.shaderCache;let Z=$.get(J);if(Z===void 0)Z=new w9(J),$.set(J,Z);return Z}}class w9{constructor(J){this.id=FW++,this.code=J,this.usedTimes=0}}var IW=0;class k9 extends w6{constructor(J){super();this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(J)}copy(J){return super.copy(J),this.depthPacking=J.depthPacking,this.map=J.map,this.alphaMap=J.alphaMap,this.displacementMap=J.displacementMap,this.displacementScale=J.displacementScale,this.displacementBias=J.displacementBias,this.wireframe=J.wireframe,this.wireframeLinewidth=J.wireframeLinewidth,this}}class C9 extends w6{constructor(J){super();this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(J)}copy(J){return super.copy(J),this.map=J.map,this.alphaMap=J.alphaMap,this.displacementMap=J.displacementMap,this.displacementScale=J.displacementScale,this.displacementBias=J.displacementBias,this}}var LW="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",AW="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";class L9 extends DJ{constructor(J=[]){super();this.isArrayCamera=!0,this.cameras=J}}class j6 extends EJ{constructor(){super();this.isGroup=!0,this.type="Group"}}var fW={type:"move"};class D7{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){if(this._hand===null)this._hand=new j6,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1};return this._hand}getTargetRaySpace(){if(this._targetRay===null)this._targetRay=new j6,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new v,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new v;return this._targetRay}getGripSpace(){if(this._grip===null)this._grip=new j6,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new v,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new v;return this._grip}dispatchEvent(J){if(this._targetRay!==null)this._targetRay.dispatchEvent(J);if(this._grip!==null)this._grip.dispatchEvent(J);if(this._hand!==null)this._hand.dispatchEvent(J);return this}connect(J){if(J&&J.hand){const $=this._hand;if($)for(let Z of J.hand.values())this._getHandJoint($,Z)}return this.dispatchEvent({type:"connected",data:J}),this}disconnect(J){if(this.dispatchEvent({type:"disconnected",data:J}),this._targetRay!==null)this._targetRay.visible=!1;if(this._grip!==null)this._grip.visible=!1;if(this._hand!==null)this._hand.visible=!1;return this}update(J,$,Z){let Q=null,W=null,Y=null;const H=this._targetRay,X=this._grip,G=this._hand;if(J&&$.session.visibilityState!=="visible-blurred"){if(G&&J.hand){Y=!0;for(let O of J.hand.values()){const M=$.getJointPose(O,Z),D=this._getHandJoint(G,O);if(M!==null)D.matrix.fromArray(M.transform.matrix),D.matrix.decompose(D.position,D.rotation,D.scale),D.matrixWorldNeedsUpdate=!0,D.jointRadius=M.radius;D.visible=M!==null}const K=G.joints["index-finger-tip"],U=G.joints["thumb-tip"],V=K.position.distanceTo(U.position),R=0.02,E=0.005;if(G.inputState.pinching&&V>R+E)G.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:J.handedness,target:this});else if(!G.inputState.pinching&&V<=R-E)G.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:J.handedness,target:this})}else if(X!==null&&J.gripSpace){if(W=$.getPose(J.gripSpace,Z),W!==null){if(X.matrix.fromArray(W.transform.matrix),X.matrix.decompose(X.position,X.rotation,X.scale),X.matrixWorldNeedsUpdate=!0,W.linearVelocity)X.hasLinearVelocity=!0,X.linearVelocity.copy(W.linearVelocity);else X.hasLinearVelocity=!1;if(W.angularVelocity)X.hasAngularVelocity=!0,X.angularVelocity.copy(W.angularVelocity);else X.hasAngularVelocity=!1}}if(H!==null){if(Q=$.getPose(J.targetRaySpace,Z),Q===null&&W!==null)Q=W;if(Q!==null){if(H.matrix.fromArray(Q.transform.matrix),H.matrix.decompose(H.position,H.rotation,H.scale),H.matrixWorldNeedsUpdate=!0,Q.linearVelocity)H.hasLinearVelocity=!0,H.linearVelocity.copy(Q.linearVelocity);else H.hasLinearVelocity=!1;if(Q.angularVelocity)H.hasAngularVelocity=!0,H.angularVelocity.copy(Q.angularVelocity);else H.hasAngularVelocity=!1;this.dispatchEvent(fW)}}}if(H!==null)H.visible=Q!==null;if(X!==null)X.visible=W!==null;if(G!==null)G.visible=Y!==null;return this}_getHandJoint(J,$){if(J.joints[$.jointName]===void 0){const Z=new j6;Z.matrixAutoUpdate=!1,Z.visible=!1,J.joints[$.jointName]=Z,J.add(Z)}return J.joints[$.jointName]}}class A9 extends MJ{constructor(J,$,Z,Q,W,Y,H,X,G,K){if(K=K!==void 0?K:1026,K!==1026&&K!==1027)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");if(Z===void 0&&K===1026)Z=1014;if(Z===void 0&&K===1027)Z=1020;super(null,Q,W,Y,H,X,K,Z,G);this.isDepthTexture=!0,this.image={width:J,height:$},this.magFilter=H!==void 0?H:1003,this.minFilter=X!==void 0?X:1003,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(J){return super.copy(J),this.compareFunction=J.compareFunction,this}toJSON(J){const $=super.toJSON(J);if(this.compareFunction!==null)$.compareFunction=this.compareFunction;return $}}class P9 extends Z6{constructor(J,$){super();const Z=this;let Q=null,W=1,Y=null,H="local-floor",X=1,G=null,K=null,U=null,V=null,R=null,E=null;const O=$.getContextAttributes();let M=null,D=null;const q=[],I=[],z=new DJ;z.layers.enable(1),z.viewport=new QJ;const A=new DJ;A.layers.enable(2),A.viewport=new QJ;const L=[z,A],w=new L9;w.layers.enable(1),w.layers.enable(2);let g=null,u=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(T){let h=q[T];if(h===void 0)h=new D7,q[T]=h;return h.getTargetRaySpace()},this.getControllerGrip=function(T){let h=q[T];if(h===void 0)h=new D7,q[T]=h;return h.getGripSpace()},this.getHand=function(T){let h=q[T];if(h===void 0)h=new D7,q[T]=h;return h.getHandSpace()};function N(T){const h=I.indexOf(T.inputSource);if(h===-1)return;const a=q[h];if(a!==void 0)a.update(T.inputSource,T.frame,G||Y),a.dispatchEvent({type:T.type,data:T.inputSource})}function C(){Q.removeEventListener("select",N),Q.removeEventListener("selectstart",N),Q.removeEventListener("selectend",N),Q.removeEventListener("squeeze",N),Q.removeEventListener("squeezestart",N),Q.removeEventListener("squeezeend",N),Q.removeEventListener("end",C),Q.removeEventListener("inputsourceschange",m);for(let T=0;T=0)I[G0]=null,q[G0].disconnect(a)}for(let h=0;h=I.length){I.push(a),G0=U0;break}else if(I[U0]===null){I[U0]=a,G0=U0;break}if(G0===-1)break}const X0=q[G0];if(X0)X0.connect(a)}}const e=new v,W0=new v;function P(T,h,a){e.setFromMatrixPosition(h.matrixWorld),W0.setFromMatrixPosition(a.matrixWorld);const G0=e.distanceTo(W0),X0=h.projectionMatrix.elements,U0=a.projectionMatrix.elements,j0=X0[14]/(X0[10]-1),F0=X0[14]/(X0[10]+1),y0=(X0[9]+1)/X0[5],n0=(X0[9]-1)/X0[5],KJ=(X0[8]-1)/X0[0],S=(U0[8]+1)/U0[0],i0=j0*KJ,f0=j0*S,E0=G0/(-KJ+S),B0=E0*-KJ;h.matrixWorld.decompose(T.position,T.quaternion,T.scale),T.translateX(B0),T.translateZ(E0),T.matrixWorld.compose(T.position,T.quaternion,T.scale),T.matrixWorldInverse.copy(T.matrixWorld).invert();const d0=j0+E0,T0=F0+E0,v0=i0-B0,s0=f0+(G0-B0),p0=y0*F0/T0*d0,WJ=n0*F0/T0*d0;T.projectionMatrix.makePerspective(v0,s0,p0,WJ,d0,T0),T.projectionMatrixInverse.copy(T.projectionMatrix).invert()}function l(T,h){if(h===null)T.matrixWorld.copy(T.matrix);else T.matrixWorld.multiplyMatrices(h.matrixWorld,T.matrix);T.matrixWorldInverse.copy(T.matrixWorld).invert()}this.updateCamera=function(T){if(Q===null)return;if(w.near=A.near=z.near=T.near,w.far=A.far=z.far=T.far,g!==w.near||u!==w.far)Q.updateRenderState({depthNear:w.near,depthFar:w.far}),g=w.near,u=w.far;const h=T.parent,a=w.cameras;l(w,h);for(let G0=0;G00)M=q[q.length-1];else M=null;if(D.pop(),D.length>0)O=D[D.length-1];else O=null};function LJ(_,y,b,f){if(_.visible===!1)return;if(_.layers.test(y.layers)){if(_.isGroup)b=_.renderOrder;else if(_.isLOD){if(_.autoUpdate===!0)_.update(y)}else if(_.isLight){if(M.pushLight(_),_.castShadow)M.pushShadow(_)}else if(_.isSprite){if(!_.frustumCulled||a.intersectsSprite(_)){if(f)y0.setFromMatrixPosition(_.matrixWorld).applyMatrix4(j0);const N0=B.update(_),_0=_.material;if(_0.visible)O.push(_,N0,_0,b,y0.z,null)}}else if(_.isMesh||_.isLine||_.isPoints){if(!_.frustumCulled||a.intersectsObject(_)){const N0=B.update(_),_0=_.material;if(f){if(_.boundingSphere!==void 0){if(_.boundingSphere===null)_.computeBoundingSphere();y0.copy(_.boundingSphere.center)}else{if(N0.boundingSphere===null)N0.computeBoundingSphere();y0.copy(N0.boundingSphere.center)}y0.applyMatrix4(_.matrixWorld).applyMatrix4(j0)}if(Array.isArray(_0)){const z0=N0.groups;for(let P0=0,O0=z0.length;P00)l9(x,K0,y,b);if(f)B0.viewport(N.copy(f));if(x.length>0)l6(x,y,b);if(K0.length>0)l6(K0,y,b);if(N0.length>0)l6(N0,y,b);B0.buffers.depth.setTest(!0),B0.buffers.depth.setMask(!0),B0.buffers.color.setMask(!0),B0.setPolygonOffset(!1)}function l9(_,y,b,f){const x=E0.isWebGL2;if(U0===null)U0=new nJ(1,1,{generateMipmaps:!0,type:f0.has("EXT_color_buffer_half_float")?1016:1009,minFilter:1008,samples:x?4:0});if(I.getDrawingBufferSize(F0),x)U0.setSize(F0.x,F0.y);else U0.setSize(i7(F0.x),i7(F0.y));const K0=I.getRenderTarget();if(I.setRenderTarget(U0),I.getClearColor(e),W0=I.getClearAlpha(),W0<1)I.setClearColor(16777215,0.5);I.clear();const N0=I.toneMapping;I.toneMapping=0,l6(_,b,f),v0.updateMultisampleRenderTarget(U0),v0.updateRenderTargetMipmap(U0);let _0=!1;for(let z0=0,P0=y.length;z00),w0=!!b.morphAttributes.position,c0=!!b.morphAttributes.normal,o0=!!b.morphAttributes.color;let zJ=0;if(f.toneMapped){if(w===null||w.isXRRenderTarget===!0)zJ=I.toneMapping}const SJ=b.morphAttributes.position||b.morphAttributes.normal||b.morphAttributes.color,r0=SJ!==void 0?SJ.length:0,S0=T0.get(f),B7=M.state.lights;if(G0===!0){if(X0===!0||_!==u){const FJ=_===u&&f.id===g;i.setState(f,_,FJ)}}let a0=!1;if(f.version===S0.__version){if(S0.needsLights&&S0.lightsStateVersion!==B7.state.version)a0=!0;else if(S0.outputColorSpace!==_0)a0=!0;else if(x.isInstancedMesh&&S0.instancing===!1)a0=!0;else if(!x.isInstancedMesh&&S0.instancing===!0)a0=!0;else if(x.isSkinnedMesh&&S0.skinning===!1)a0=!0;else if(!x.isSkinnedMesh&&S0.skinning===!0)a0=!0;else if(x.isInstancedMesh&&S0.instancingColor===!0&&x.instanceColor===null)a0=!0;else if(x.isInstancedMesh&&S0.instancingColor===!1&&x.instanceColor!==null)a0=!0;else if(S0.envMap!==z0)a0=!0;else if(f.fog===!0&&S0.fog!==K0)a0=!0;else if(S0.numClippingPlanes!==void 0&&(S0.numClippingPlanes!==i.numPlanes||S0.numIntersection!==i.numIntersection))a0=!0;else if(S0.vertexAlphas!==P0)a0=!0;else if(S0.vertexTangents!==O0)a0=!0;else if(S0.morphTargets!==w0)a0=!0;else if(S0.morphNormals!==c0)a0=!0;else if(S0.morphColors!==o0)a0=!0;else if(S0.toneMapping!==zJ)a0=!0;else if(E0.isWebGL2===!0&&S0.morphTargetsCount!==r0)a0=!0}else a0=!0,S0.__version=f.version;let oJ=S0.currentProgram;if(a0===!0)oJ=u6(f,y,x);let M8=!1,A6=!1,I7=!1;const VJ=oJ.getUniforms(),iJ=S0.uniforms;if(B0.useProgram(oJ.program))M8=!0,A6=!0,I7=!0;if(f.id!==g)g=f.id,A6=!0;if(M8||u!==_){VJ.setValue(S,"projectionMatrix",_.projectionMatrix),VJ.setValue(S,"viewMatrix",_.matrixWorldInverse);const FJ=VJ.map.cameraPosition;if(FJ!==void 0)FJ.setValue(S,y0.setFromMatrixPosition(_.matrixWorld));if(E0.logarithmicDepthBuffer)VJ.setValue(S,"logDepthBufFC",2/(Math.log(_.far+1)/Math.LN2));if(f.isMeshPhongMaterial||f.isMeshToonMaterial||f.isMeshLambertMaterial||f.isMeshBasicMaterial||f.isMeshStandardMaterial||f.isShaderMaterial)VJ.setValue(S,"isOrthographic",_.isOrthographicCamera===!0);if(u!==_)u=_,A6=!0,I7=!0}if(x.isSkinnedMesh){VJ.setOptional(S,x,"bindMatrix"),VJ.setOptional(S,x,"bindMatrixInverse");const FJ=x.skeleton;if(FJ)if(E0.floatVertexTextures){if(FJ.boneTexture===null)FJ.computeBoneTexture();VJ.setValue(S,"boneTexture",FJ.boneTexture,v0),VJ.setValue(S,"boneTextureSize",FJ.boneTextureSize)}else console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required.")}const w7=b.morphAttributes;if(w7.position!==void 0||w7.normal!==void 0||w7.color!==void 0&&E0.isWebGL2===!0)q0.update(x,b,oJ);if(A6||S0.receiveShadow!==x.receiveShadow)S0.receiveShadow=x.receiveShadow,VJ.setValue(S,"receiveShadow",x.receiveShadow);if(f.isMeshGouraudMaterial&&f.envMap!==null)iJ.envMap.value=z0,iJ.flipEnvMap.value=z0.isCubeTexture&&z0.isRenderTargetTexture===!1?-1:1;if(A6){if(VJ.setValue(S,"toneMappingExposure",I.toneMappingExposure),S0.needsLights)d9(iJ,I7);if(K0&&f.fog===!0)j.refreshFogUniforms(iJ,K0);j.refreshMaterialUniforms(iJ,f,n,l,U0),x6.upload(S,S0.uniformsList,iJ,v0)}if(f.isShaderMaterial&&f.uniformsNeedUpdate===!0)x6.upload(S,S0.uniformsList,iJ,v0),f.uniformsNeedUpdate=!1;if(f.isSpriteMaterial)VJ.setValue(S,"center",x.center);if(VJ.setValue(S,"modelViewMatrix",x.modelViewMatrix),VJ.setValue(S,"normalMatrix",x.normalMatrix),VJ.setValue(S,"modelMatrix",x.matrixWorld),f.isShaderMaterial||f.isRawShaderMaterial){const FJ=f.uniformsGroups;for(let k7=0,n9=FJ.length;k70&&v0.useMultisampledRTT(_)===!1)x=T0.get(_).__webglMultisampledFramebuffer;else if(Array.isArray(O0))x=O0[b];else x=O0;N.copy(_.viewport),C.copy(_.scissor),m=_.scissorTest}else N.copy(p).multiplyScalar(n).floor(),C.copy(T).multiplyScalar(n).floor(),m=h;if(B0.bindFramebuffer(S.FRAMEBUFFER,x)&&E0.drawBuffers&&f)B0.drawBuffers(_,x);if(B0.viewport(N),B0.scissor(C),B0.setScissorTest(m),K0){const z0=T0.get(_.texture);S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_CUBE_MAP_POSITIVE_X+y,z0.__webglTexture,b)}else if(N0){const z0=T0.get(_.texture),P0=y||0;S.framebufferTextureLayer(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,z0.__webglTexture,b||0,P0)}g=-1},this.readRenderTargetPixels=function(_,y,b,f,x,K0,N0){if(!(_&&_.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let _0=T0.get(_).__webglFramebuffer;if(_.isWebGLCubeRenderTarget&&N0!==void 0)_0=_0[N0];if(_0){B0.bindFramebuffer(S.FRAMEBUFFER,_0);try{const z0=_.texture,P0=z0.format,O0=z0.type;if(P0!==1023&&s.convert(P0)!==S.getParameter(S.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const w0=O0===1016&&(f0.has("EXT_color_buffer_half_float")||E0.isWebGL2&&f0.has("EXT_color_buffer_float"));if(O0!==1009&&s.convert(O0)!==S.getParameter(S.IMPLEMENTATION_COLOR_READ_TYPE)&&!(O0===1015&&(E0.isWebGL2||f0.has("OES_texture_float")||f0.has("WEBGL_color_buffer_float")))&&!w0){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}if(y>=0&&y<=_.width-f&&(b>=0&&b<=_.height-x))S.readPixels(y,b,f,x,s.convert(P0),s.convert(O0),K0)}finally{const z0=w!==null?T0.get(w).__webglFramebuffer:null;B0.bindFramebuffer(S.FRAMEBUFFER,z0)}}},this.copyFramebufferToTexture=function(_,y,b=0){const f=Math.pow(2,-b),x=Math.floor(y.image.width*f),K0=Math.floor(y.image.height*f);v0.setTexture2D(y,0),S.copyTexSubImage2D(S.TEXTURE_2D,b,0,0,_.x,_.y,x,K0),B0.unbindTexture()},this.copyTextureToTexture=function(_,y,b,f=0){const x=y.image.width,K0=y.image.height,N0=s.convert(b.format),_0=s.convert(b.type);if(v0.setTexture2D(b,0),S.pixelStorei(S.UNPACK_FLIP_Y_WEBGL,b.flipY),S.pixelStorei(S.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),S.pixelStorei(S.UNPACK_ALIGNMENT,b.unpackAlignment),y.isDataTexture)S.texSubImage2D(S.TEXTURE_2D,f,_.x,_.y,x,K0,N0,_0,y.image.data);else if(y.isCompressedTexture)S.compressedTexSubImage2D(S.TEXTURE_2D,f,_.x,_.y,y.mipmaps[0].width,y.mipmaps[0].height,N0,y.mipmaps[0].data);else S.texSubImage2D(S.TEXTURE_2D,f,_.x,_.y,N0,_0,y.image);if(f===0&&b.generateMipmaps)S.generateMipmap(S.TEXTURE_2D);B0.unbindTexture()},this.copyTextureToTexture3D=function(_,y,b,f,x=0){if(I.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const K0=_.max.x-_.min.x+1,N0=_.max.y-_.min.y+1,_0=_.max.z-_.min.z+1,z0=s.convert(f.format),P0=s.convert(f.type);let O0;if(f.isData3DTexture)v0.setTexture3D(f,0),O0=S.TEXTURE_3D;else if(f.isDataArrayTexture)v0.setTexture2DArray(f,0),O0=S.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}S.pixelStorei(S.UNPACK_FLIP_Y_WEBGL,f.flipY),S.pixelStorei(S.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f.premultiplyAlpha),S.pixelStorei(S.UNPACK_ALIGNMENT,f.unpackAlignment);const w0=S.getParameter(S.UNPACK_ROW_LENGTH),c0=S.getParameter(S.UNPACK_IMAGE_HEIGHT),o0=S.getParameter(S.UNPACK_SKIP_PIXELS),zJ=S.getParameter(S.UNPACK_SKIP_ROWS),SJ=S.getParameter(S.UNPACK_SKIP_IMAGES),r0=b.isCompressedTexture?b.mipmaps[0]:b.image;if(S.pixelStorei(S.UNPACK_ROW_LENGTH,r0.width),S.pixelStorei(S.UNPACK_IMAGE_HEIGHT,r0.height),S.pixelStorei(S.UNPACK_SKIP_PIXELS,_.min.x),S.pixelStorei(S.UNPACK_SKIP_ROWS,_.min.y),S.pixelStorei(S.UNPACK_SKIP_IMAGES,_.min.z),b.isDataTexture||b.isData3DTexture)S.texSubImage3D(O0,x,y.x,y.y,y.z,K0,N0,_0,z0,P0,r0.data);else if(b.isCompressedArrayTexture)console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),S.compressedTexSubImage3D(O0,x,y.x,y.y,y.z,K0,N0,_0,z0,r0.data);else S.texSubImage3D(O0,x,y.x,y.y,y.z,K0,N0,_0,z0,P0,r0);if(S.pixelStorei(S.UNPACK_ROW_LENGTH,w0),S.pixelStorei(S.UNPACK_IMAGE_HEIGHT,c0),S.pixelStorei(S.UNPACK_SKIP_PIXELS,o0),S.pixelStorei(S.UNPACK_SKIP_ROWS,zJ),S.pixelStorei(S.UNPACK_SKIP_IMAGES,SJ),x===0&&f.generateMipmaps)S.generateMipmap(O0);B0.unbindTexture()},this.initTexture=function(_){if(_.isCubeTexture)v0.setTextureCube(_,0);else if(_.isData3DTexture)v0.setTexture3D(_,0);else if(_.isDataArrayTexture||_.isCompressedArrayTexture)v0.setTexture2DArray(_,0);else v0.setTexture2D(_,0);B0.unbindTexture()},this.resetState=function(){A=0,L=0,w=null,B0.reset(),l0.reset()},typeof __THREE_DEVTOOLS__!=="undefined")__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return 2000}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(J){this._outputColorSpace=J;const $=this.getContext();$.drawingBufferColorSpace=J==="display-p3"?"display-p3":"srgb",$.unpackColorSpace=h0.workingColorSpace==="display-p3-linear"?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(J){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!J}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace==="srgb"?3001:3000}set outputEncoding(J){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=J===3001?"srgb":"srgb-linear"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(J){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=J}}class T9 extends O7{}T9.prototype.isWebGL1Renderer=!0;class M7{constructor(J,$=1,Z=1000){this.isFog=!0,this.name="",this.color=new g0(J),this.near=$,this.far=Z}clone(){return new M7(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class q8 extends EJ{constructor(){super();if(this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__!=="undefined")__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(J,$){if(super.copy(J,$),J.background!==null)this.background=J.background.clone();if(J.environment!==null)this.environment=J.environment.clone();if(J.fog!==null)this.fog=J.fog.clone();if(this.backgroundBlurriness=J.backgroundBlurriness,this.backgroundIntensity=J.backgroundIntensity,J.overrideMaterial!==null)this.overrideMaterial=J.overrideMaterial.clone();return this.matrixAutoUpdate=J.matrixAutoUpdate,this}toJSON(J){const $=super.toJSON(J);if(this.fog!==null)$.object.fog=this.fog.toJSON();if(this.backgroundBlurriness>0)$.object.backgroundBlurriness=this.backgroundBlurriness;if(this.backgroundIntensity!==1)$.object.backgroundIntensity=this.backgroundIntensity;return $}}class _7 extends w6{constructor(J){super();this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new g0(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(J)}copy(J){return super.copy(J),this.color.copy(J.color),this.map=J.map,this.alphaMap=J.alphaMap,this.size=J.size,this.sizeAttenuation=J.sizeAttenuation,this.fog=J.fog,this}}var Y9=new ZJ,t7=new Z8,U7=new g6,q7=new v;class R8 extends EJ{constructor(J=new PJ,$=new _7){super();this.isPoints=!0,this.type="Points",this.geometry=J,this.material=$,this.updateMorphTargets()}copy(J,$){return super.copy(J,$),this.material=Array.isArray(J.material)?J.material.slice():J.material,this.geometry=J.geometry,this}raycast(J,$){const Z=this.geometry,Q=this.matrixWorld,W=J.params.Points.threshold,Y=Z.drawRange;if(Z.boundingSphere===null)Z.computeBoundingSphere();if(U7.copy(Z.boundingSphere),U7.applyMatrix4(Q),U7.radius+=W,J.ray.intersectsSphere(U7)===!1)return;Y9.copy(Q).invert(),t7.copy(J.ray).applyMatrix4(Y9);const H=W/((this.scale.x+this.scale.y+this.scale.z)/3),X=H*H,G=Z.index,U=Z.attributes.position;if(G!==null){const V=Math.max(0,Y.start),R=Math.min(G.count,Y.start+Y.count);for(let E=V,O=R;E0){const Q=$[Z[0]];if(Q!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let W=0,Y=Q.length;W=W)){const H=$[1];if(J=W)break J}Y=Z,Z=0;break $}break Z}while(Z>>1;if(J<$[H])Y=H;else Z=H+1}if(Q=$[Z],W=$[Z-1],W===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(Q===void 0)return Z=$.length,this._cachedIndex=Z,this.copySampleValue_(Z-1)}this._cachedIndex=Z,this.intervalChanged_(Z,W,Q)}return this.interpolate_(Z,W,J,Q)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(J){const $=this.resultBuffer,Z=this.sampleValues,Q=this.valueSize,W=J*Q;for(let Y=0;Y!==Q;++Y)$[Y]=Z[W+Y];return $}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class S9 extends m6{constructor(J,$,Z,Q){super(J,$,Z,Q);this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(J,$,Z){const Q=this.parameterPositions;let W=J-2,Y=J+1,H=Q[W],X=Q[Y];if(H===void 0)switch(this.getSettings_().endingStart){case 2401:W=J,H=2*$-Z;break;case 2402:W=Q.length-2,H=$+Q[W]-Q[W+1];break;default:W=J,H=Z}if(X===void 0)switch(this.getSettings_().endingEnd){case 2401:Y=J,X=2*Z-$;break;case 2402:Y=1,X=Z+Q[1]-Q[0];break;default:Y=J-1,X=$}const G=(Z-$)*0.5,K=this.valueSize;this._weightPrev=G/($-H),this._weightNext=G/(X-Z),this._offsetPrev=W*K,this._offsetNext=Y*K}interpolate_(J,$,Z,Q){const W=this.resultBuffer,Y=this.sampleValues,H=this.valueSize,X=J*H,G=X-H,K=this._offsetPrev,U=this._offsetNext,V=this._weightPrev,R=this._weightNext,E=(Z-$)/(Q-$),O=E*E,M=O*E,D=-V*M+2*V*O-V*E,q=(1+V)*M+(-1.5-2*V)*O+(-0.5+V)*E+1,I=(-1-R)*M+(1.5+R)*O+0.5*E,z=R*M-R*O;for(let A=0;A!==H;++A)W[A]=D*Y[K+A]+q*Y[G+A]+I*Y[X+A]+z*Y[U+A];return W}}class y9 extends m6{constructor(J,$,Z,Q){super(J,$,Z,Q)}interpolate_(J,$,Z,Q){const W=this.resultBuffer,Y=this.sampleValues,H=this.valueSize,X=J*H,G=X-H,K=(Z-$)/(Q-$),U=1-K;for(let V=0;V!==H;++V)W[V]=Y[G+V]*U+Y[X+V]*K;return W}}class f9 extends m6{constructor(J,$,Z,Q){super(J,$,Z,Q)}interpolate_(J){return this.copySampleValue_(J-1)}}class TJ{constructor(J,$,Z,Q){if(J===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if($===void 0||$.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+J);this.name=J,this.times=R7($,this.TimeBufferType),this.values=R7(Z,this.ValueBufferType),this.setInterpolation(Q||this.DefaultInterpolation)}static toJSON(J){const $=J.constructor;let Z;if($.toJSON!==this.toJSON)Z=$.toJSON(J);else{Z={name:J.name,times:R7(J.times,Array),values:R7(J.values,Array)};const Q=J.getInterpolation();if(Q!==J.DefaultInterpolation)Z.interpolation=Q}return Z.type=J.ValueTypeName,Z}InterpolantFactoryMethodDiscrete(J){return new f9(this.times,this.values,this.getValueSize(),J)}InterpolantFactoryMethodLinear(J){return new y9(this.times,this.values,this.getValueSize(),J)}InterpolantFactoryMethodSmooth(J){return new S9(this.times,this.values,this.getValueSize(),J)}setInterpolation(J){let $;switch(J){case 2300:$=this.InterpolantFactoryMethodDiscrete;break;case 2301:$=this.InterpolantFactoryMethodLinear;break;case 2302:$=this.InterpolantFactoryMethodSmooth;break}if($===void 0){const Z="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(J!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(Z);return console.warn("THREE.KeyframeTrack:",Z),this}return this.createInterpolant=$,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(J){if(J!==0){const $=this.times;for(let Z=0,Q=$.length;Z!==Q;++Z)$[Z]+=J}return this}scale(J){if(J!==1){const $=this.times;for(let Z=0,Q=$.length;Z!==Q;++Z)$[Z]*=J}return this}trim(J,$){const Z=this.times,Q=Z.length;let W=0,Y=Q-1;while(W!==Q&&Z[W]$)--Y;if(++Y,W!==0||Y!==Q){if(W>=Y)Y=Math.max(Y,1),W=Y-1;const H=this.getValueSize();this.times=Z.slice(W,Y),this.values=this.values.slice(W*H,Y*H)}return this}validate(){let J=!0;const $=this.getValueSize();if($-Math.floor($)!==0)console.error("THREE.KeyframeTrack: Invalid value size in track.",this),J=!1;const Z=this.times,Q=this.values,W=Z.length;if(W===0)console.error("THREE.KeyframeTrack: Track is empty.",this),J=!1;let Y=null;for(let H=0;H!==W;H++){const X=Z[H];if(typeof X==="number"&&isNaN(X)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,H,X),J=!1;break}if(Y!==null&&Y>X){console.error("THREE.KeyframeTrack: Out of order keys.",this,H,X,Y),J=!1;break}Y=X}if(Q!==void 0){if(bW(Q))for(let H=0,X=Q.length;H!==X;++H){const G=Q[H];if(isNaN(G)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,H,G),J=!1;break}}}return J}optimize(){const J=this.times.slice(),$=this.values.slice(),Z=this.getValueSize(),Q=this.getInterpolation()===2302,W=J.length-1;let Y=1;for(let H=1;H0){J[Y]=J[W];for(let H=W*Z,X=Y*Z,G=0;G!==Z;++G)$[X+G]=$[H+G];++Y}if(Y!==J.length)this.times=J.slice(0,Y),this.values=$.slice(0,Y*Z);else this.times=J,this.values=$;return this}clone(){const J=this.times.slice(),$=this.values.slice(),Q=new this.constructor(this.name,J,$);return Q.createInterpolant=this.createInterpolant,Q}}TJ.prototype.TimeBufferType=Float32Array;TJ.prototype.ValueBufferType=Float32Array;TJ.prototype.DefaultInterpolation=2301;class C6 extends TJ{}C6.prototype.ValueTypeName="bool";C6.prototype.ValueBufferType=Array;C6.prototype.DefaultInterpolation=2300;C6.prototype.InterpolantFactoryMethodLinear=void 0;C6.prototype.InterpolantFactoryMethodSmooth=void 0;class v9 extends TJ{}v9.prototype.ValueTypeName="color";class j9 extends TJ{}j9.prototype.ValueTypeName="number";class b9 extends m6{constructor(J,$,Z,Q){super(J,$,Z,Q)}interpolate_(J,$,Z,Q){const W=this.resultBuffer,Y=this.sampleValues,H=this.valueSize,X=(Z-$)/(Q-$);let G=J*H;for(let K=G+H;G!==K;G+=4)Q6.slerpFlat(W,0,Y,G-H,Y,G,X);return W}}class z7 extends TJ{InterpolantFactoryMethodLinear(J){return new b9(this.times,this.values,this.getValueSize(),J)}}z7.prototype.ValueTypeName="quaternion";z7.prototype.DefaultInterpolation=2301;z7.prototype.InterpolantFactoryMethodSmooth=void 0;class L6 extends TJ{}L6.prototype.ValueTypeName="string";L6.prototype.ValueBufferType=Array;L6.prototype.DefaultInterpolation=2300;L6.prototype.InterpolantFactoryMethodLinear=void 0;L6.prototype.InterpolantFactoryMethodSmooth=void 0;class x9 extends TJ{}x9.prototype.ValueTypeName="vector";class h9{constructor(J,$,Z){const Q=this;let W=!1,Y=0,H=0,X=void 0;const G=[];this.onStart=void 0,this.onLoad=J,this.onProgress=$,this.onError=Z,this.itemStart=function(K){if(H++,W===!1){if(Q.onStart!==void 0)Q.onStart(K,Y,H)}W=!0},this.itemEnd=function(K){if(Y++,Q.onProgress!==void 0)Q.onProgress(K,Y,H);if(Y===H){if(W=!1,Q.onLoad!==void 0)Q.onLoad()}},this.itemError=function(K){if(Q.onError!==void 0)Q.onError(K)},this.resolveURL=function(K){if(X)return X(K);return K},this.setURLModifier=function(K){return X=K,this},this.addHandler=function(K,U){return G.push(K,U),this},this.removeHandler=function(K){const U=G.indexOf(K);if(U!==-1)G.splice(U,2);return this},this.getHandler=function(K){for(let U=0,V=G.length;U{const $=()=>{return 45},Z=new q8,Q=new DJ($(),J.clientWidth/J.clientHeight,0.1,1000);Q.position.z=5,Z.fog=new M7(0,3,6);const W=new O7({antialias:!0});W.setSize(J.clientWidth,J.clientHeight),J.appendChild(W.domElement);const Y=16737280,H=0.012,X=3,G=0.08,K=Math.floor(X/G),U=K**3,V=[];for(let A=0;A{M=A.clientX/window.innerWidth*2-1,D=A.clientY/window.innerHeight*2-1}),window.addEventListener("resize",()=>{W.setSize(J.clientWidth,J.clientHeight),Q.aspect=J.clientWidth/J.clientHeight,Q.fov=$(),Q.updateProjectionMatrix()});const q=0.001,I=0.0001;O.rotation.y=Math.PI/4,O.rotation.x=Math.PI/4;const z=()=>{requestAnimationFrame(z),W.render(Z,Q),O.rotation.y+=-M*q+I,O.rotation.x+=-D*q+I,O.rotation.z=I};console.log(U),z()};if(m9)sW(m9); + `},Q=new p6(5,5,5),W=new sJ({name:"CubemapFromEquirect",uniforms:B6(Z.uniforms),vertexShader:Z.vertexShader,fragmentShader:Z.fragmentShader,side:1,blending:0});W.uniforms.tEquirect.value=$;const Y=new hJ(Q,W),H=$.minFilter;if($.minFilter===1008)$.minFilter=1006;return new q9(1,10,this).update(J,Y),$.minFilter=H,Y.geometry.dispose(),Y.material.dispose(),this}clear(J,$,Z,Q){const W=J.getRenderTarget();for(let Y=0;Y<6;Y++)J.setRenderTarget(this,Y),J.clear($,Z,Q);J.setRenderTarget(W)}}var d7=new v,R$=new v,E$=new A0;class dJ{constructor(J=new v(1,0,0),$=0){this.isPlane=!0,this.normal=J,this.constant=$}set(J,$){return this.normal.copy(J),this.constant=$,this}setComponents(J,$,Z,Q){return this.normal.set(J,$,Z),this.constant=Q,this}setFromNormalAndCoplanarPoint(J,$){return this.normal.copy(J),this.constant=-$.dot(this.normal),this}setFromCoplanarPoints(J,$,Z){const Q=d7.subVectors(Z,$).cross(R$.subVectors(J,$)).normalize();return this.setFromNormalAndCoplanarPoint(Q,J),this}copy(J){return this.normal.copy(J.normal),this.constant=J.constant,this}normalize(){const J=1/this.normal.length();return this.normal.multiplyScalar(J),this.constant*=J,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(J){return this.normal.dot(J)+this.constant}distanceToSphere(J){return this.distanceToPoint(J.center)-J.radius}projectPoint(J,$){return $.copy(J).addScaledVector(this.normal,-this.distanceToPoint(J))}intersectLine(J,$){const Z=J.delta(d7),Q=this.normal.dot(Z);if(Q===0){if(this.distanceToPoint(J.start)===0)return $.copy(J.start);return null}const W=-(J.start.dot(this.normal)+this.constant)/Q;if(W<0||W>1)return null;return $.copy(J.start).addScaledVector(Z,W)}intersectsLine(J){const $=this.distanceToPoint(J.start),Z=this.distanceToPoint(J.end);return $<0&&Z>0||Z<0&&$>0}intersectsBox(J){return J.intersectsPlane(this)}intersectsSphere(J){return J.intersectsPlane(this)}coplanarPoint(J){return J.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(J,$){const Z=$||E$.getNormalMatrix(J),Q=this.coplanarPoint(d7).applyMatrix4(J),W=this.normal.applyMatrix3(Z).normalize();return this.constant=-Q.dot(W),this}translate(J){return this.constant-=J.dot(this.normal),this}equals(J){return J.normal.equals(this.normal)&&J.constant===this.constant}clone(){return new this.constructor().copy(this)}}var eJ=new g6,K7=new v;class G8{constructor(J=new dJ,$=new dJ,Z=new dJ,Q=new dJ,W=new dJ,Y=new dJ){this.planes=[J,$,Z,Q,W,Y]}set(J,$,Z,Q,W,Y){const H=this.planes;return H[0].copy(J),H[1].copy($),H[2].copy(Z),H[3].copy(Q),H[4].copy(W),H[5].copy(Y),this}copy(J){const $=this.planes;for(let Z=0;Z<6;Z++)$[Z].copy(J.planes[Z]);return this}setFromProjectionMatrix(J,$=2000){const Z=this.planes,Q=J.elements,W=Q[0],Y=Q[1],H=Q[2],X=Q[3],K=Q[4],G=Q[5],U=Q[6],V=Q[7],R=Q[8],D=Q[9],M=Q[10],O=Q[11],E=Q[12],q=Q[13],I=Q[14],z=Q[15];if(Z[0].setComponents(X-W,V-K,O-R,z-E).normalize(),Z[1].setComponents(X+W,V+K,O+R,z+E).normalize(),Z[2].setComponents(X+Y,V+G,O+D,z+q).normalize(),Z[3].setComponents(X-Y,V-G,O-D,z-q).normalize(),Z[4].setComponents(X-H,V-U,O-M,z-I).normalize(),$===2000)Z[5].setComponents(X+H,V+U,O+M,z+I).normalize();else if($===2001)Z[5].setComponents(H,U,M,I).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+$);return this}intersectsObject(J){if(J.boundingSphere!==void 0){if(J.boundingSphere===null)J.computeBoundingSphere();eJ.copy(J.boundingSphere).applyMatrix4(J.matrixWorld)}else{const $=J.geometry;if($.boundingSphere===null)$.computeBoundingSphere();eJ.copy($.boundingSphere).applyMatrix4(J.matrixWorld)}return this.intersectsSphere(eJ)}intersectsSprite(J){return eJ.center.set(0,0,0),eJ.radius=0.7071067811865476,eJ.applyMatrix4(J.matrixWorld),this.intersectsSphere(eJ)}intersectsSphere(J){const $=this.planes,Z=J.center,Q=-J.radius;for(let W=0;W<6;W++)if($[W].distanceToPoint(Z)0?J.max.x:J.min.x,K7.y=Q.normal.y>0?J.max.y:J.min.y,K7.z=Q.normal.z>0?J.max.z:J.min.z,Q.distanceToPoint(K7)<0)return!1}return!0}containsPoint(J){const $=this.planes;for(let Z=0;Z<6;Z++)if($[Z].distanceToPoint(J)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class V8 extends PJ{constructor(J=1,$=1,Z=1,Q=1){super();this.type="PlaneGeometry",this.parameters={width:J,height:$,widthSegments:Z,heightSegments:Q};const W=J/2,Y=$/2,H=Math.floor(Z),X=Math.floor(Q),K=H+1,G=X+1,U=J/H,V=$/X,R=[],D=[],M=[],O=[];for(let E=0;E0)this._blur(W,0,0,$);return this._applyPMREM(W),this._cleanup(W),W}fromEquirectangular(J,$=null){return this._fromTexture(J,$)}fromCubemap(J,$=null){return this._fromTexture(J,$)}compileCubemapShader(){if(this._cubemapMaterial===null)this._cubemapMaterial=u8(),this._compileMaterial(this._cubemapMaterial)}compileEquirectangularShader(){if(this._equirectMaterial===null)this._equirectMaterial=l8(),this._compileMaterial(this._equirectMaterial)}dispose(){if(this._dispose(),this._cubemapMaterial!==null)this._cubemapMaterial.dispose();if(this._equirectMaterial!==null)this._equirectMaterial.dispose()}_setSize(J){this._lodMax=Math.floor(Math.log2(J)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){if(this._blurMaterial!==null)this._blurMaterial.dispose();if(this._pingPongRenderTarget!==null)this._pingPongRenderTarget.dispose();for(let J=0;J2?I:0,I,I),G.setRenderTarget(Q),M)G.render(D,H);G.render(J,H)}D.geometry.dispose(),D.material.dispose(),G.toneMapping=V,G.autoClear=U,J.background=O}_textureToCubeUV(J,$){const Z=this._renderer,Q=J.mapping===301||J.mapping===302;if(Q){if(this._cubemapMaterial===null)this._cubemapMaterial=u8();this._cubemapMaterial.uniforms.flipEnvMap.value=J.isRenderTargetTexture===!1?-1:1}else if(this._equirectMaterial===null)this._equirectMaterial=l8();const W=Q?this._cubemapMaterial:this._equirectMaterial,Y=new hJ(this._lodPlanes[0],W),H=W.uniforms;H.envMap.value=J;const X=this._cubeSize;V7($,0,0,3*X,2*X),Z.setRenderTarget($),Z.render(Y,c7)}_applyPMREM(J){const $=this._renderer,Z=$.autoClear;$.autoClear=!1;for(let Q=1;Q$6)console.warn(`sigmaRadians, ${W}, is too large and will clip, as it requested ${O} samples when the maximum is set to ${$6}`);const E=[];let q=0;for(let w=0;w<$6;++w){const g=w/M,u=Math.exp(-g*g/2);if(E.push(u),w===0)q+=u;else if(wI-_6?Q-I+_6:0),L=4*(this._cubeSize-z);V7($,A,L,3*z,2*z),X.setRenderTarget($),X.render(U,c7)}}var F9=new MJ,N9=new $8,O9=new G9,M9=new K8,d8=[],c8=[],n8=new Float32Array(16),s8=new Float32Array(9),o8=new Float32Array(4);class _9{constructor(J,$,Z){this.id=J,this.addr=Z,this.cache=[],this.setValue=PQ($.type)}}class z9{constructor(J,$,Z){this.id=J,this.addr=Z,this.cache=[],this.size=$.size,this.setValue=iQ($.type)}}class B9{constructor(J){this.id=J,this.seq=[],this.map={}}setValue(J,$,Z){const Q=this.seq;for(let W=0,Y=Q.length;W!==Y;++W){const H=Q[W];H.setValue(J,$[H.id],Z)}}}var s7=/(\w+)(\])?(\[|\.)?/g;class x6{constructor(J,$){this.seq=[],this.map={};const Z=J.getProgramParameter($,J.ACTIVE_UNIFORMS);for(let Q=0;Q/gm,XW=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]),KW=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g,FW=0;class I9{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(J){const{vertexShader:$,fragmentShader:Z}=J,Q=this._getShaderStage($),W=this._getShaderStage(Z),Y=this._getShaderCacheForMaterial(J);if(Y.has(Q)===!1)Y.add(Q),Q.usedTimes++;if(Y.has(W)===!1)Y.add(W),W.usedTimes++;return this}remove(J){const $=this.materialCache.get(J);for(let Z of $)if(Z.usedTimes--,Z.usedTimes===0)this.shaderCache.delete(Z.code);return this.materialCache.delete(J),this}getVertexShaderID(J){return this._getShaderStage(J.vertexShader).id}getFragmentShaderID(J){return this._getShaderStage(J.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(J){const $=this.materialCache;let Z=$.get(J);if(Z===void 0)Z=new Set,$.set(J,Z);return Z}_getShaderStage(J){const $=this.shaderCache;let Z=$.get(J);if(Z===void 0)Z=new w9(J),$.set(J,Z);return Z}}class w9{constructor(J){this.id=FW++,this.code=J,this.usedTimes=0}}var IW=0;class k9 extends w6{constructor(J){super();this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(J)}copy(J){return super.copy(J),this.depthPacking=J.depthPacking,this.map=J.map,this.alphaMap=J.alphaMap,this.displacementMap=J.displacementMap,this.displacementScale=J.displacementScale,this.displacementBias=J.displacementBias,this.wireframe=J.wireframe,this.wireframeLinewidth=J.wireframeLinewidth,this}}class C9 extends w6{constructor(J){super();this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(J)}copy(J){return super.copy(J),this.map=J.map,this.alphaMap=J.alphaMap,this.displacementMap=J.displacementMap,this.displacementScale=J.displacementScale,this.displacementBias=J.displacementBias,this}}var LW="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",AW="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";class L9 extends EJ{constructor(J=[]){super();this.isArrayCamera=!0,this.cameras=J}}class j6 extends DJ{constructor(){super();this.isGroup=!0,this.type="Group"}}var fW={type:"move"};class E7{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){if(this._hand===null)this._hand=new j6,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1};return this._hand}getTargetRaySpace(){if(this._targetRay===null)this._targetRay=new j6,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new v,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new v;return this._targetRay}getGripSpace(){if(this._grip===null)this._grip=new j6,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new v,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new v;return this._grip}dispatchEvent(J){if(this._targetRay!==null)this._targetRay.dispatchEvent(J);if(this._grip!==null)this._grip.dispatchEvent(J);if(this._hand!==null)this._hand.dispatchEvent(J);return this}connect(J){if(J&&J.hand){const $=this._hand;if($)for(let Z of J.hand.values())this._getHandJoint($,Z)}return this.dispatchEvent({type:"connected",data:J}),this}disconnect(J){if(this.dispatchEvent({type:"disconnected",data:J}),this._targetRay!==null)this._targetRay.visible=!1;if(this._grip!==null)this._grip.visible=!1;if(this._hand!==null)this._hand.visible=!1;return this}update(J,$,Z){let Q=null,W=null,Y=null;const H=this._targetRay,X=this._grip,K=this._hand;if(J&&$.session.visibilityState!=="visible-blurred"){if(K&&J.hand){Y=!0;for(let M of J.hand.values()){const O=$.getJointPose(M,Z),E=this._getHandJoint(K,M);if(O!==null)E.matrix.fromArray(O.transform.matrix),E.matrix.decompose(E.position,E.rotation,E.scale),E.matrixWorldNeedsUpdate=!0,E.jointRadius=O.radius;E.visible=O!==null}const G=K.joints["index-finger-tip"],U=K.joints["thumb-tip"],V=G.position.distanceTo(U.position),R=0.02,D=0.005;if(K.inputState.pinching&&V>R+D)K.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:J.handedness,target:this});else if(!K.inputState.pinching&&V<=R-D)K.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:J.handedness,target:this})}else if(X!==null&&J.gripSpace){if(W=$.getPose(J.gripSpace,Z),W!==null){if(X.matrix.fromArray(W.transform.matrix),X.matrix.decompose(X.position,X.rotation,X.scale),X.matrixWorldNeedsUpdate=!0,W.linearVelocity)X.hasLinearVelocity=!0,X.linearVelocity.copy(W.linearVelocity);else X.hasLinearVelocity=!1;if(W.angularVelocity)X.hasAngularVelocity=!0,X.angularVelocity.copy(W.angularVelocity);else X.hasAngularVelocity=!1}}if(H!==null){if(Q=$.getPose(J.targetRaySpace,Z),Q===null&&W!==null)Q=W;if(Q!==null){if(H.matrix.fromArray(Q.transform.matrix),H.matrix.decompose(H.position,H.rotation,H.scale),H.matrixWorldNeedsUpdate=!0,Q.linearVelocity)H.hasLinearVelocity=!0,H.linearVelocity.copy(Q.linearVelocity);else H.hasLinearVelocity=!1;if(Q.angularVelocity)H.hasAngularVelocity=!0,H.angularVelocity.copy(Q.angularVelocity);else H.hasAngularVelocity=!1;this.dispatchEvent(fW)}}}if(H!==null)H.visible=Q!==null;if(X!==null)X.visible=W!==null;if(K!==null)K.visible=Y!==null;return this}_getHandJoint(J,$){if(J.joints[$.jointName]===void 0){const Z=new j6;Z.matrixAutoUpdate=!1,Z.visible=!1,J.joints[$.jointName]=Z,J.add(Z)}return J.joints[$.jointName]}}class A9 extends MJ{constructor(J,$,Z,Q,W,Y,H,X,K,G){if(G=G!==void 0?G:1026,G!==1026&&G!==1027)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");if(Z===void 0&&G===1026)Z=1014;if(Z===void 0&&G===1027)Z=1020;super(null,Q,W,Y,H,X,G,Z,K);this.isDepthTexture=!0,this.image={width:J,height:$},this.magFilter=H!==void 0?H:1003,this.minFilter=X!==void 0?X:1003,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(J){return super.copy(J),this.compareFunction=J.compareFunction,this}toJSON(J){const $=super.toJSON(J);if(this.compareFunction!==null)$.compareFunction=this.compareFunction;return $}}class P9 extends Z6{constructor(J,$){super();const Z=this;let Q=null,W=1,Y=null,H="local-floor",X=1,K=null,G=null,U=null,V=null,R=null,D=null;const M=$.getContextAttributes();let O=null,E=null;const q=[],I=[],z=new EJ;z.layers.enable(1),z.viewport=new QJ;const A=new EJ;A.layers.enable(2),A.viewport=new QJ;const L=[z,A],w=new L9;w.layers.enable(1),w.layers.enable(2);let g=null,u=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(T){let h=q[T];if(h===void 0)h=new E7,q[T]=h;return h.getTargetRaySpace()},this.getControllerGrip=function(T){let h=q[T];if(h===void 0)h=new E7,q[T]=h;return h.getGripSpace()},this.getHand=function(T){let h=q[T];if(h===void 0)h=new E7,q[T]=h;return h.getHandSpace()};function N(T){const h=I.indexOf(T.inputSource);if(h===-1)return;const a=q[h];if(a!==void 0)a.update(T.inputSource,T.frame,K||Y),a.dispatchEvent({type:T.type,data:T.inputSource})}function C(){Q.removeEventListener("select",N),Q.removeEventListener("selectstart",N),Q.removeEventListener("selectend",N),Q.removeEventListener("squeeze",N),Q.removeEventListener("squeezestart",N),Q.removeEventListener("squeezeend",N),Q.removeEventListener("end",C),Q.removeEventListener("inputsourceschange",m);for(let T=0;T=0)I[G0]=null,q[G0].disconnect(a)}for(let h=0;h=I.length){I.push(a),G0=U0;break}else if(I[U0]===null){I[U0]=a,G0=U0;break}if(G0===-1)break}const X0=q[G0];if(X0)X0.connect(a)}}const e=new v,W0=new v;function P(T,h,a){e.setFromMatrixPosition(h.matrixWorld),W0.setFromMatrixPosition(a.matrixWorld);const G0=e.distanceTo(W0),X0=h.projectionMatrix.elements,U0=a.projectionMatrix.elements,j0=X0[14]/(X0[10]-1),F0=X0[14]/(X0[10]+1),y0=(X0[9]+1)/X0[5],n0=(X0[9]-1)/X0[5],KJ=(X0[8]-1)/X0[0],S=(U0[8]+1)/U0[0],i0=j0*KJ,f0=j0*S,D0=G0/(-KJ+S),B0=D0*-KJ;h.matrixWorld.decompose(T.position,T.quaternion,T.scale),T.translateX(B0),T.translateZ(D0),T.matrixWorld.compose(T.position,T.quaternion,T.scale),T.matrixWorldInverse.copy(T.matrixWorld).invert();const d0=j0+D0,T0=F0+D0,v0=i0-B0,s0=f0+(G0-B0),p0=y0*F0/T0*d0,WJ=n0*F0/T0*d0;T.projectionMatrix.makePerspective(v0,s0,p0,WJ,d0,T0),T.projectionMatrixInverse.copy(T.projectionMatrix).invert()}function l(T,h){if(h===null)T.matrixWorld.copy(T.matrix);else T.matrixWorld.multiplyMatrices(h.matrixWorld,T.matrix);T.matrixWorldInverse.copy(T.matrixWorld).invert()}this.updateCamera=function(T){if(Q===null)return;if(w.near=A.near=z.near=T.near,w.far=A.far=z.far=T.far,g!==w.near||u!==w.far)Q.updateRenderState({depthNear:w.near,depthFar:w.far}),g=w.near,u=w.far;const h=T.parent,a=w.cameras;l(w,h);for(let G0=0;G00)O=q[q.length-1];else O=null;if(E.pop(),E.length>0)M=E[E.length-1];else M=null};function LJ(_,y,b,f){if(_.visible===!1)return;if(_.layers.test(y.layers)){if(_.isGroup)b=_.renderOrder;else if(_.isLOD){if(_.autoUpdate===!0)_.update(y)}else if(_.isLight){if(O.pushLight(_),_.castShadow)O.pushShadow(_)}else if(_.isSprite){if(!_.frustumCulled||a.intersectsSprite(_)){if(f)y0.setFromMatrixPosition(_.matrixWorld).applyMatrix4(j0);const N0=B.update(_),_0=_.material;if(_0.visible)M.push(_,N0,_0,b,y0.z,null)}}else if(_.isMesh||_.isLine||_.isPoints){if(!_.frustumCulled||a.intersectsObject(_)){const N0=B.update(_),_0=_.material;if(f){if(_.boundingSphere!==void 0){if(_.boundingSphere===null)_.computeBoundingSphere();y0.copy(_.boundingSphere.center)}else{if(N0.boundingSphere===null)N0.computeBoundingSphere();y0.copy(N0.boundingSphere.center)}y0.applyMatrix4(_.matrixWorld).applyMatrix4(j0)}if(Array.isArray(_0)){const z0=N0.groups;for(let P0=0,O0=z0.length;P00)l9(x,K0,y,b);if(f)B0.viewport(N.copy(f));if(x.length>0)l6(x,y,b);if(K0.length>0)l6(K0,y,b);if(N0.length>0)l6(N0,y,b);B0.buffers.depth.setTest(!0),B0.buffers.depth.setMask(!0),B0.buffers.color.setMask(!0),B0.setPolygonOffset(!1)}function l9(_,y,b,f){const x=D0.isWebGL2;if(U0===null)U0=new nJ(1,1,{generateMipmaps:!0,type:f0.has("EXT_color_buffer_half_float")?1016:1009,minFilter:1008,samples:x?4:0});if(I.getDrawingBufferSize(F0),x)U0.setSize(F0.x,F0.y);else U0.setSize(i7(F0.x),i7(F0.y));const K0=I.getRenderTarget();if(I.setRenderTarget(U0),I.getClearColor(e),W0=I.getClearAlpha(),W0<1)I.setClearColor(16777215,0.5);I.clear();const N0=I.toneMapping;I.toneMapping=0,l6(_,b,f),v0.updateMultisampleRenderTarget(U0),v0.updateRenderTargetMipmap(U0);let _0=!1;for(let z0=0,P0=y.length;z00),w0=!!b.morphAttributes.position,c0=!!b.morphAttributes.normal,o0=!!b.morphAttributes.color;let zJ=0;if(f.toneMapped){if(w===null||w.isXRRenderTarget===!0)zJ=I.toneMapping}const SJ=b.morphAttributes.position||b.morphAttributes.normal||b.morphAttributes.color,r0=SJ!==void 0?SJ.length:0,S0=T0.get(f),B7=O.state.lights;if(G0===!0){if(X0===!0||_!==u){const FJ=_===u&&f.id===g;i.setState(f,_,FJ)}}let a0=!1;if(f.version===S0.__version){if(S0.needsLights&&S0.lightsStateVersion!==B7.state.version)a0=!0;else if(S0.outputColorSpace!==_0)a0=!0;else if(x.isInstancedMesh&&S0.instancing===!1)a0=!0;else if(!x.isInstancedMesh&&S0.instancing===!0)a0=!0;else if(x.isSkinnedMesh&&S0.skinning===!1)a0=!0;else if(!x.isSkinnedMesh&&S0.skinning===!0)a0=!0;else if(x.isInstancedMesh&&S0.instancingColor===!0&&x.instanceColor===null)a0=!0;else if(x.isInstancedMesh&&S0.instancingColor===!1&&x.instanceColor!==null)a0=!0;else if(S0.envMap!==z0)a0=!0;else if(f.fog===!0&&S0.fog!==K0)a0=!0;else if(S0.numClippingPlanes!==void 0&&(S0.numClippingPlanes!==i.numPlanes||S0.numIntersection!==i.numIntersection))a0=!0;else if(S0.vertexAlphas!==P0)a0=!0;else if(S0.vertexTangents!==O0)a0=!0;else if(S0.morphTargets!==w0)a0=!0;else if(S0.morphNormals!==c0)a0=!0;else if(S0.morphColors!==o0)a0=!0;else if(S0.toneMapping!==zJ)a0=!0;else if(D0.isWebGL2===!0&&S0.morphTargetsCount!==r0)a0=!0}else a0=!0,S0.__version=f.version;let oJ=S0.currentProgram;if(a0===!0)oJ=u6(f,y,x);let M8=!1,A6=!1,I7=!1;const VJ=oJ.getUniforms(),iJ=S0.uniforms;if(B0.useProgram(oJ.program))M8=!0,A6=!0,I7=!0;if(f.id!==g)g=f.id,A6=!0;if(M8||u!==_){VJ.setValue(S,"projectionMatrix",_.projectionMatrix),VJ.setValue(S,"viewMatrix",_.matrixWorldInverse);const FJ=VJ.map.cameraPosition;if(FJ!==void 0)FJ.setValue(S,y0.setFromMatrixPosition(_.matrixWorld));if(D0.logarithmicDepthBuffer)VJ.setValue(S,"logDepthBufFC",2/(Math.log(_.far+1)/Math.LN2));if(f.isMeshPhongMaterial||f.isMeshToonMaterial||f.isMeshLambertMaterial||f.isMeshBasicMaterial||f.isMeshStandardMaterial||f.isShaderMaterial)VJ.setValue(S,"isOrthographic",_.isOrthographicCamera===!0);if(u!==_)u=_,A6=!0,I7=!0}if(x.isSkinnedMesh){VJ.setOptional(S,x,"bindMatrix"),VJ.setOptional(S,x,"bindMatrixInverse");const FJ=x.skeleton;if(FJ)if(D0.floatVertexTextures){if(FJ.boneTexture===null)FJ.computeBoneTexture();VJ.setValue(S,"boneTexture",FJ.boneTexture,v0),VJ.setValue(S,"boneTextureSize",FJ.boneTextureSize)}else console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required.")}const w7=b.morphAttributes;if(w7.position!==void 0||w7.normal!==void 0||w7.color!==void 0&&D0.isWebGL2===!0)q0.update(x,b,oJ);if(A6||S0.receiveShadow!==x.receiveShadow)S0.receiveShadow=x.receiveShadow,VJ.setValue(S,"receiveShadow",x.receiveShadow);if(f.isMeshGouraudMaterial&&f.envMap!==null)iJ.envMap.value=z0,iJ.flipEnvMap.value=z0.isCubeTexture&&z0.isRenderTargetTexture===!1?-1:1;if(A6){if(VJ.setValue(S,"toneMappingExposure",I.toneMappingExposure),S0.needsLights)d9(iJ,I7);if(K0&&f.fog===!0)j.refreshFogUniforms(iJ,K0);j.refreshMaterialUniforms(iJ,f,n,l,U0),x6.upload(S,S0.uniformsList,iJ,v0)}if(f.isShaderMaterial&&f.uniformsNeedUpdate===!0)x6.upload(S,S0.uniformsList,iJ,v0),f.uniformsNeedUpdate=!1;if(f.isSpriteMaterial)VJ.setValue(S,"center",x.center);if(VJ.setValue(S,"modelViewMatrix",x.modelViewMatrix),VJ.setValue(S,"normalMatrix",x.normalMatrix),VJ.setValue(S,"modelMatrix",x.matrixWorld),f.isShaderMaterial||f.isRawShaderMaterial){const FJ=f.uniformsGroups;for(let k7=0,n9=FJ.length;k70&&v0.useMultisampledRTT(_)===!1)x=T0.get(_).__webglMultisampledFramebuffer;else if(Array.isArray(O0))x=O0[b];else x=O0;N.copy(_.viewport),C.copy(_.scissor),m=_.scissorTest}else N.copy(p).multiplyScalar(n).floor(),C.copy(T).multiplyScalar(n).floor(),m=h;if(B0.bindFramebuffer(S.FRAMEBUFFER,x)&&D0.drawBuffers&&f)B0.drawBuffers(_,x);if(B0.viewport(N),B0.scissor(C),B0.setScissorTest(m),K0){const z0=T0.get(_.texture);S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_CUBE_MAP_POSITIVE_X+y,z0.__webglTexture,b)}else if(N0){const z0=T0.get(_.texture),P0=y||0;S.framebufferTextureLayer(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,z0.__webglTexture,b||0,P0)}g=-1},this.readRenderTargetPixels=function(_,y,b,f,x,K0,N0){if(!(_&&_.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let _0=T0.get(_).__webglFramebuffer;if(_.isWebGLCubeRenderTarget&&N0!==void 0)_0=_0[N0];if(_0){B0.bindFramebuffer(S.FRAMEBUFFER,_0);try{const z0=_.texture,P0=z0.format,O0=z0.type;if(P0!==1023&&s.convert(P0)!==S.getParameter(S.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const w0=O0===1016&&(f0.has("EXT_color_buffer_half_float")||D0.isWebGL2&&f0.has("EXT_color_buffer_float"));if(O0!==1009&&s.convert(O0)!==S.getParameter(S.IMPLEMENTATION_COLOR_READ_TYPE)&&!(O0===1015&&(D0.isWebGL2||f0.has("OES_texture_float")||f0.has("WEBGL_color_buffer_float")))&&!w0){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}if(y>=0&&y<=_.width-f&&(b>=0&&b<=_.height-x))S.readPixels(y,b,f,x,s.convert(P0),s.convert(O0),K0)}finally{const z0=w!==null?T0.get(w).__webglFramebuffer:null;B0.bindFramebuffer(S.FRAMEBUFFER,z0)}}},this.copyFramebufferToTexture=function(_,y,b=0){const f=Math.pow(2,-b),x=Math.floor(y.image.width*f),K0=Math.floor(y.image.height*f);v0.setTexture2D(y,0),S.copyTexSubImage2D(S.TEXTURE_2D,b,0,0,_.x,_.y,x,K0),B0.unbindTexture()},this.copyTextureToTexture=function(_,y,b,f=0){const x=y.image.width,K0=y.image.height,N0=s.convert(b.format),_0=s.convert(b.type);if(v0.setTexture2D(b,0),S.pixelStorei(S.UNPACK_FLIP_Y_WEBGL,b.flipY),S.pixelStorei(S.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),S.pixelStorei(S.UNPACK_ALIGNMENT,b.unpackAlignment),y.isDataTexture)S.texSubImage2D(S.TEXTURE_2D,f,_.x,_.y,x,K0,N0,_0,y.image.data);else if(y.isCompressedTexture)S.compressedTexSubImage2D(S.TEXTURE_2D,f,_.x,_.y,y.mipmaps[0].width,y.mipmaps[0].height,N0,y.mipmaps[0].data);else S.texSubImage2D(S.TEXTURE_2D,f,_.x,_.y,N0,_0,y.image);if(f===0&&b.generateMipmaps)S.generateMipmap(S.TEXTURE_2D);B0.unbindTexture()},this.copyTextureToTexture3D=function(_,y,b,f,x=0){if(I.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const K0=_.max.x-_.min.x+1,N0=_.max.y-_.min.y+1,_0=_.max.z-_.min.z+1,z0=s.convert(f.format),P0=s.convert(f.type);let O0;if(f.isData3DTexture)v0.setTexture3D(f,0),O0=S.TEXTURE_3D;else if(f.isDataArrayTexture)v0.setTexture2DArray(f,0),O0=S.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}S.pixelStorei(S.UNPACK_FLIP_Y_WEBGL,f.flipY),S.pixelStorei(S.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f.premultiplyAlpha),S.pixelStorei(S.UNPACK_ALIGNMENT,f.unpackAlignment);const w0=S.getParameter(S.UNPACK_ROW_LENGTH),c0=S.getParameter(S.UNPACK_IMAGE_HEIGHT),o0=S.getParameter(S.UNPACK_SKIP_PIXELS),zJ=S.getParameter(S.UNPACK_SKIP_ROWS),SJ=S.getParameter(S.UNPACK_SKIP_IMAGES),r0=b.isCompressedTexture?b.mipmaps[0]:b.image;if(S.pixelStorei(S.UNPACK_ROW_LENGTH,r0.width),S.pixelStorei(S.UNPACK_IMAGE_HEIGHT,r0.height),S.pixelStorei(S.UNPACK_SKIP_PIXELS,_.min.x),S.pixelStorei(S.UNPACK_SKIP_ROWS,_.min.y),S.pixelStorei(S.UNPACK_SKIP_IMAGES,_.min.z),b.isDataTexture||b.isData3DTexture)S.texSubImage3D(O0,x,y.x,y.y,y.z,K0,N0,_0,z0,P0,r0.data);else if(b.isCompressedArrayTexture)console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),S.compressedTexSubImage3D(O0,x,y.x,y.y,y.z,K0,N0,_0,z0,r0.data);else S.texSubImage3D(O0,x,y.x,y.y,y.z,K0,N0,_0,z0,P0,r0);if(S.pixelStorei(S.UNPACK_ROW_LENGTH,w0),S.pixelStorei(S.UNPACK_IMAGE_HEIGHT,c0),S.pixelStorei(S.UNPACK_SKIP_PIXELS,o0),S.pixelStorei(S.UNPACK_SKIP_ROWS,zJ),S.pixelStorei(S.UNPACK_SKIP_IMAGES,SJ),x===0&&f.generateMipmaps)S.generateMipmap(O0);B0.unbindTexture()},this.initTexture=function(_){if(_.isCubeTexture)v0.setTextureCube(_,0);else if(_.isData3DTexture)v0.setTexture3D(_,0);else if(_.isDataArrayTexture||_.isCompressedArrayTexture)v0.setTexture2DArray(_,0);else v0.setTexture2D(_,0);B0.unbindTexture()},this.resetState=function(){A=0,L=0,w=null,B0.reset(),l0.reset()},typeof __THREE_DEVTOOLS__!=="undefined")__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return 2000}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(J){this._outputColorSpace=J;const $=this.getContext();$.drawingBufferColorSpace=J==="display-p3"?"display-p3":"srgb",$.unpackColorSpace=h0.workingColorSpace==="display-p3-linear"?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(J){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!J}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace==="srgb"?3001:3000}set outputEncoding(J){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=J===3001?"srgb":"srgb-linear"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(J){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=J}}class T9 extends O7{}T9.prototype.isWebGL1Renderer=!0;class M7{constructor(J,$=1,Z=1000){this.isFog=!0,this.name="",this.color=new g0(J),this.near=$,this.far=Z}clone(){return new M7(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class q8 extends DJ{constructor(){super();if(this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__!=="undefined")__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(J,$){if(super.copy(J,$),J.background!==null)this.background=J.background.clone();if(J.environment!==null)this.environment=J.environment.clone();if(J.fog!==null)this.fog=J.fog.clone();if(this.backgroundBlurriness=J.backgroundBlurriness,this.backgroundIntensity=J.backgroundIntensity,J.overrideMaterial!==null)this.overrideMaterial=J.overrideMaterial.clone();return this.matrixAutoUpdate=J.matrixAutoUpdate,this}toJSON(J){const $=super.toJSON(J);if(this.fog!==null)$.object.fog=this.fog.toJSON();if(this.backgroundBlurriness>0)$.object.backgroundBlurriness=this.backgroundBlurriness;if(this.backgroundIntensity!==1)$.object.backgroundIntensity=this.backgroundIntensity;return $}}class _7 extends w6{constructor(J){super();this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new g0(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(J)}copy(J){return super.copy(J),this.color.copy(J.color),this.map=J.map,this.alphaMap=J.alphaMap,this.size=J.size,this.sizeAttenuation=J.sizeAttenuation,this.fog=J.fog,this}}var Y9=new ZJ,t7=new Z8,U7=new g6,q7=new v;class R8 extends DJ{constructor(J=new PJ,$=new _7){super();this.isPoints=!0,this.type="Points",this.geometry=J,this.material=$,this.updateMorphTargets()}copy(J,$){return super.copy(J,$),this.material=Array.isArray(J.material)?J.material.slice():J.material,this.geometry=J.geometry,this}raycast(J,$){const Z=this.geometry,Q=this.matrixWorld,W=J.params.Points.threshold,Y=Z.drawRange;if(Z.boundingSphere===null)Z.computeBoundingSphere();if(U7.copy(Z.boundingSphere),U7.applyMatrix4(Q),U7.radius+=W,J.ray.intersectsSphere(U7)===!1)return;Y9.copy(Q).invert(),t7.copy(J.ray).applyMatrix4(Y9);const H=W/((this.scale.x+this.scale.y+this.scale.z)/3),X=H*H,K=Z.index,U=Z.attributes.position;if(K!==null){const V=Math.max(0,Y.start),R=Math.min(K.count,Y.start+Y.count);for(let D=V,M=R;D0){const Q=$[Z[0]];if(Q!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let W=0,Y=Q.length;W=W)){const H=$[1];if(J=W)break J}Y=Z,Z=0;break $}break Z}while(Z>>1;if(J<$[H])Y=H;else Z=H+1}if(Q=$[Z],W=$[Z-1],W===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(Q===void 0)return Z=$.length,this._cachedIndex=Z,this.copySampleValue_(Z-1)}this._cachedIndex=Z,this.intervalChanged_(Z,W,Q)}return this.interpolate_(Z,W,J,Q)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(J){const $=this.resultBuffer,Z=this.sampleValues,Q=this.valueSize,W=J*Q;for(let Y=0;Y!==Q;++Y)$[Y]=Z[W+Y];return $}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class S9 extends m6{constructor(J,$,Z,Q){super(J,$,Z,Q);this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(J,$,Z){const Q=this.parameterPositions;let W=J-2,Y=J+1,H=Q[W],X=Q[Y];if(H===void 0)switch(this.getSettings_().endingStart){case 2401:W=J,H=2*$-Z;break;case 2402:W=Q.length-2,H=$+Q[W]-Q[W+1];break;default:W=J,H=Z}if(X===void 0)switch(this.getSettings_().endingEnd){case 2401:Y=J,X=2*Z-$;break;case 2402:Y=1,X=Z+Q[1]-Q[0];break;default:Y=J-1,X=$}const K=(Z-$)*0.5,G=this.valueSize;this._weightPrev=K/($-H),this._weightNext=K/(X-Z),this._offsetPrev=W*G,this._offsetNext=Y*G}interpolate_(J,$,Z,Q){const W=this.resultBuffer,Y=this.sampleValues,H=this.valueSize,X=J*H,K=X-H,G=this._offsetPrev,U=this._offsetNext,V=this._weightPrev,R=this._weightNext,D=(Z-$)/(Q-$),M=D*D,O=M*D,E=-V*O+2*V*M-V*D,q=(1+V)*O+(-1.5-2*V)*M+(-0.5+V)*D+1,I=(-1-R)*O+(1.5+R)*M+0.5*D,z=R*O-R*M;for(let A=0;A!==H;++A)W[A]=E*Y[G+A]+q*Y[K+A]+I*Y[X+A]+z*Y[U+A];return W}}class y9 extends m6{constructor(J,$,Z,Q){super(J,$,Z,Q)}interpolate_(J,$,Z,Q){const W=this.resultBuffer,Y=this.sampleValues,H=this.valueSize,X=J*H,K=X-H,G=(Z-$)/(Q-$),U=1-G;for(let V=0;V!==H;++V)W[V]=Y[K+V]*U+Y[X+V]*G;return W}}class f9 extends m6{constructor(J,$,Z,Q){super(J,$,Z,Q)}interpolate_(J){return this.copySampleValue_(J-1)}}class TJ{constructor(J,$,Z,Q){if(J===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if($===void 0||$.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+J);this.name=J,this.times=R7($,this.TimeBufferType),this.values=R7(Z,this.ValueBufferType),this.setInterpolation(Q||this.DefaultInterpolation)}static toJSON(J){const $=J.constructor;let Z;if($.toJSON!==this.toJSON)Z=$.toJSON(J);else{Z={name:J.name,times:R7(J.times,Array),values:R7(J.values,Array)};const Q=J.getInterpolation();if(Q!==J.DefaultInterpolation)Z.interpolation=Q}return Z.type=J.ValueTypeName,Z}InterpolantFactoryMethodDiscrete(J){return new f9(this.times,this.values,this.getValueSize(),J)}InterpolantFactoryMethodLinear(J){return new y9(this.times,this.values,this.getValueSize(),J)}InterpolantFactoryMethodSmooth(J){return new S9(this.times,this.values,this.getValueSize(),J)}setInterpolation(J){let $;switch(J){case 2300:$=this.InterpolantFactoryMethodDiscrete;break;case 2301:$=this.InterpolantFactoryMethodLinear;break;case 2302:$=this.InterpolantFactoryMethodSmooth;break}if($===void 0){const Z="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(J!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(Z);return console.warn("THREE.KeyframeTrack:",Z),this}return this.createInterpolant=$,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(J){if(J!==0){const $=this.times;for(let Z=0,Q=$.length;Z!==Q;++Z)$[Z]+=J}return this}scale(J){if(J!==1){const $=this.times;for(let Z=0,Q=$.length;Z!==Q;++Z)$[Z]*=J}return this}trim(J,$){const Z=this.times,Q=Z.length;let W=0,Y=Q-1;while(W!==Q&&Z[W]$)--Y;if(++Y,W!==0||Y!==Q){if(W>=Y)Y=Math.max(Y,1),W=Y-1;const H=this.getValueSize();this.times=Z.slice(W,Y),this.values=this.values.slice(W*H,Y*H)}return this}validate(){let J=!0;const $=this.getValueSize();if($-Math.floor($)!==0)console.error("THREE.KeyframeTrack: Invalid value size in track.",this),J=!1;const Z=this.times,Q=this.values,W=Z.length;if(W===0)console.error("THREE.KeyframeTrack: Track is empty.",this),J=!1;let Y=null;for(let H=0;H!==W;H++){const X=Z[H];if(typeof X==="number"&&isNaN(X)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,H,X),J=!1;break}if(Y!==null&&Y>X){console.error("THREE.KeyframeTrack: Out of order keys.",this,H,X,Y),J=!1;break}Y=X}if(Q!==void 0){if(bW(Q))for(let H=0,X=Q.length;H!==X;++H){const K=Q[H];if(isNaN(K)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,H,K),J=!1;break}}}return J}optimize(){const J=this.times.slice(),$=this.values.slice(),Z=this.getValueSize(),Q=this.getInterpolation()===2302,W=J.length-1;let Y=1;for(let H=1;H0){J[Y]=J[W];for(let H=W*Z,X=Y*Z,K=0;K!==Z;++K)$[X+K]=$[H+K];++Y}if(Y!==J.length)this.times=J.slice(0,Y),this.values=$.slice(0,Y*Z);else this.times=J,this.values=$;return this}clone(){const J=this.times.slice(),$=this.values.slice(),Q=new this.constructor(this.name,J,$);return Q.createInterpolant=this.createInterpolant,Q}}TJ.prototype.TimeBufferType=Float32Array;TJ.prototype.ValueBufferType=Float32Array;TJ.prototype.DefaultInterpolation=2301;class C6 extends TJ{}C6.prototype.ValueTypeName="bool";C6.prototype.ValueBufferType=Array;C6.prototype.DefaultInterpolation=2300;C6.prototype.InterpolantFactoryMethodLinear=void 0;C6.prototype.InterpolantFactoryMethodSmooth=void 0;class v9 extends TJ{}v9.prototype.ValueTypeName="color";class j9 extends TJ{}j9.prototype.ValueTypeName="number";class b9 extends m6{constructor(J,$,Z,Q){super(J,$,Z,Q)}interpolate_(J,$,Z,Q){const W=this.resultBuffer,Y=this.sampleValues,H=this.valueSize,X=(Z-$)/(Q-$);let K=J*H;for(let G=K+H;K!==G;K+=4)Q6.slerpFlat(W,0,Y,K-H,Y,K,X);return W}}class z7 extends TJ{InterpolantFactoryMethodLinear(J){return new b9(this.times,this.values,this.getValueSize(),J)}}z7.prototype.ValueTypeName="quaternion";z7.prototype.DefaultInterpolation=2301;z7.prototype.InterpolantFactoryMethodSmooth=void 0;class L6 extends TJ{}L6.prototype.ValueTypeName="string";L6.prototype.ValueBufferType=Array;L6.prototype.DefaultInterpolation=2300;L6.prototype.InterpolantFactoryMethodLinear=void 0;L6.prototype.InterpolantFactoryMethodSmooth=void 0;class x9 extends TJ{}x9.prototype.ValueTypeName="vector";class h9{constructor(J,$,Z){const Q=this;let W=!1,Y=0,H=0,X=void 0;const K=[];this.onStart=void 0,this.onLoad=J,this.onProgress=$,this.onError=Z,this.itemStart=function(G){if(H++,W===!1){if(Q.onStart!==void 0)Q.onStart(G,Y,H)}W=!0},this.itemEnd=function(G){if(Y++,Q.onProgress!==void 0)Q.onProgress(G,Y,H);if(Y===H){if(W=!1,Q.onLoad!==void 0)Q.onLoad()}},this.itemError=function(G){if(Q.onError!==void 0)Q.onError(G)},this.resolveURL=function(G){if(X)return X(G);return G},this.setURLModifier=function(G){return X=G,this},this.addHandler=function(G,U){return K.push(G,U),this},this.removeHandler=function(G){const U=K.indexOf(G);if(U!==-1)K.splice(U,2);return this},this.getHandler=function(G){for(let U=0,V=K.length;U{const $=()=>{return 45},Z=new q8,Q=new EJ($(),J.clientWidth/J.clientHeight,0.1,1000);Q.position.z=5,Z.fog=new M7(0,3,6);const W=new O7({antialias:!0});W.setSize(J.clientWidth,J.clientHeight),J.appendChild(W.domElement);const Y=16737280,H=0.012,X=3,K=0.08,G=Math.floor(X/K),U=[];for(let z=0;z{M=z.clientX/window.innerWidth*2-1,O=z.clientY/window.innerHeight*2-1}),window.addEventListener("resize",()=>{W.setSize(J.clientWidth,J.clientHeight),Q.aspect=J.clientWidth/J.clientHeight,Q.fov=$(),Q.updateProjectionMatrix()});const E=0.001,q=0.0001;D.rotation.y=Math.PI/4,D.rotation.x=Math.PI/4;const I=()=>{requestAnimationFrame(I),W.render(Z,Q),D.rotation.y+=-M*E+q,D.rotation.x+=-O*E+q,D.rotation.z=q};I()};if(m9)sW(m9); diff --git a/src/assets/scripts/nav.js b/src/assets/scripts/nav.js index 324ded9..a4e13a2 100644 --- a/src/assets/scripts/nav.js +++ b/src/assets/scripts/nav.js @@ -1 +1 @@ -var K1=function(J,Q){J.indexOf(Q)===-1&&J.push(Q)};var p=(J,Q,Z)=>Math.min(Math.max(Z,J),Q);var Y={duration:0.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var x=(J)=>typeof J==="number";var S=(J)=>Array.isArray(J)&&!x(J[0]);var x1=(J,Q,Z)=>{const W=Q-J;return((Z-J)%W+W)%W+J};var _1=function(J,Q){return S(J)?J[x1(0,J.length,Q)]:J};var n=(J,Q,Z)=>-Z*J+Z*Q+J;var y=()=>{},h=(J)=>J;var D=(J,Q,Z)=>Q-J===0?1:(Z-J)/(Q-J);var M1=function(J,Q){const Z=J[J.length-1];for(let W=1;W<=Q;W++){const q=D(0,Q,W);J.push(n(Z,1,q))}},F1=function(J){const Q=[0];return M1(Q,J-1),Q};var U1=function(J,Q=F1(J.length),Z=h){const W=J.length,q=W-Q.length;return q>0&&M1(Q,q),($)=>{let G=0;for(;GArray.isArray(J)&&x(J[0]);var P=(J)=>typeof J==="object"&&Boolean(J.createAnimation);var R=(J)=>typeof J==="function";var Y1=(J)=>typeof J==="string";var B={ms:(J)=>J*1000,s:(J)=>J/1000};var r1=function(J,Q,Z,W,q){let $,G,H=0;do if(G=Q+(Z-Q)/2,$=B1(G,W,q)-J,$>0)Z=G;else Q=G;while(Math.abs($)>l1&&++Hr1($,0,1,J,Z);return($)=>$===0||$===1?$:B1(q($),Q,W)},B1=(J,Q,Z)=>(((1-3*Z+3*Q)*J+(3*Z-6*Q))*J+3*Q)*J,l1=0.0000001,m1=12;var h1=(J,Q="end")=>(Z)=>{Z=Q==="end"?Math.min(Z,0.999):Math.max(Z,0.001);const W=Z*J,q=Q==="end"?Math.floor(W):Math.ceil(W);return p(0,1,q/J)};var w1=function(J){if(R(J))return J;if(d(J))return T(...J);if(C1[J])return C1[J];if(J.startsWith("steps")){const Q=o1.exec(J);if(Q){const Z=Q[1].split(",");return h1(parseFloat(Z[0]),Z[1].trim())}}return h},C1={ease:T(0.25,0.1,0.25,1),"ease-in":T(0.42,0,1,1),"ease-in-out":T(0.42,0,0.58,1),"ease-out":T(0,0,0.58,1)},o1=/\((.*?)\)/;class b{constructor(J,Q=[0,1],{easing:Z,duration:W=Y.duration,delay:q=Y.delay,endDelay:$=Y.endDelay,repeat:G=Y.repeat,offset:H,direction:w="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=h,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((L,z)=>{this.resolve=L,this.reject=z}),Z=Z||Y.easing,P(Z)){const L=Z.createAnimation(Q);Z=L.easing,Q=L.keyframes||Q,W=L.duration||W}this.repeat=G,this.easing=S(Z)?h:w1(Z),this.updateDuration(W);const _=U1(Q,H,S(Z)?Z.map(w1):h);this.tick=(L)=>{var z;q=q;let K=0;if(this.pauseTime!==void 0)K=this.pauseTime;else K=(L-this.startTime)*this.rate;if(this.t=K,K/=1000,K=Math.max(K-q,0),this.playState==="finished"&&this.pauseTime===void 0)K=this.totalDuration;const v=K/this.duration;let o=Math.floor(v),X=v%1;if(!X&&v>=1)X=1;X===1&&o--;const s=o%2;if(w==="reverse"||w==="alternate"&&s||w==="alternate-reverse"&&!s)X=1-X;const H1=K>=this.totalDuration?1:Math.min(X,1),E=_(this.easing(H1));if(J(E),this.pauseTime===void 0&&(this.playState==="finished"||K>=this.totalDuration+$))this.playState="finished",(z=this.resolve)===null||z===void 0||z.call(this,E);else if(this.playState!=="idle")this.frameRequestId=requestAnimationFrame(this.tick)},this.play()}play(){const J=performance.now();if(this.playState="running",this.pauseTime!==void 0)this.startTime=J-this.pauseTime;else if(!this.startTime)this.startTime=J;this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var J;if(this.playState="idle",this.frameRequestId!==void 0)cancelAnimationFrame(this.frameRequestId);(J=this.reject)===null||J===void 0||J.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(J){this.duration=J,this.totalDuration=J*(this.repeat+1)}get currentTime(){return this.t}set currentTime(J){if(this.pauseTime!==void 0||this.rate===0)this.pauseTime=J;else this.startTime=performance.now()-J/this.rate}get playbackRate(){return this.rate}set playbackRate(J){this.rate=J}}var s1=function(){},e=function(){};s1=function(J,Q){if(!J&&typeof console!=="undefined")console.warn(Q)},e=function(J,Q){if(!J)throw new Error(Q)};class J1{setAnimation(J){this.animation=J,J===null||J===void 0||J.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}var Q1=function(J){if(!L1.has(J))L1.set(J,{transforms:[],values:new Map});return L1.get(J)},N1=function(J,Q){if(!J.has(Q))J.set(Q,new J1);return J.get(Q)},L1=new WeakMap;var t1=["","X","Y","Z"],a1=["translate","scale","rotate","skew"],f={x:"translateX",y:"translateY",z:"translateZ"},V1={syntax:"",initialValue:"0deg",toDefaultUnit:(J)=>J+"deg"},i1={translate:{syntax:"",initialValue:"0px",toDefaultUnit:(J)=>J+"px"},rotate:V1,scale:{syntax:"",initialValue:1,toDefaultUnit:h},skew:V1},C=new Map,W1=(J)=>`--motion-${J}`,Z1=["x","y","z"];a1.forEach((J)=>{t1.forEach((Q)=>{Z1.push(J+Q),C.set(W1(J+Q),i1[J])})});var n1=(J,Q)=>Z1.indexOf(J)-Z1.indexOf(Q),e1=new Set(Z1),q1=(J)=>e1.has(J),D1=(J,Q)=>{if(f[Q])Q=f[Q];const{transforms:Z}=Q1(J);K1(Z,Q),J.style.transform=JJ(Z)},JJ=(J)=>J.sort(n1).reduce(QJ,"").trim(),QJ=(J,Q)=>`${J} ${Q}(var(${W1(Q)}))`;var I1=function(J){if(T1.has(J))return;T1.add(J);try{const{syntax:Q,initialValue:Z}=C.has(J)?C.get(J):{};CSS.registerProperty({name:J,inherits:!1,syntax:Q,initialValue:Z})}catch(Q){}},u=(J)=>J.startsWith("--"),T1=new Set;var R1=(J,Q)=>document.createElement("div").animate(J,Q),E1={cssRegisterProperty:()=>typeof CSS!=="undefined"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{R1({opacity:[1]})}catch(J){return!1}return!0},finished:()=>Boolean(R1({opacity:[0,1]},{duration:0.001}).finished),linearEasing:()=>{try{R1({opacity:0},{easing:"linear(0, 1)"})}catch(J){return!1}return!0}},z1={},N={};for(let J in E1)N[J]=()=>{if(z1[J]===void 0)z1[J]=E1[J]();return z1[J]};var ZJ=0.015,WJ=(J,Q)=>{let Z="";const W=Math.round(Q/ZJ);for(let q=0;q{if(R(J))return N.linearEasing()?`linear(${WJ(J,Q)})`:Y.easing;else return d(J)?qJ(J):J},qJ=([J,Q,Z,W])=>`cubic-bezier(${J}, ${Q}, ${Z}, ${W})`;var P1=function(J,Q){for(let Z=0;ZArray.isArray(J)?J:[J];var g=function(J){if(f[J])J=f[J];return q1(J)?W1(J):J};var l={get:(J,Q)=>{Q=g(Q);let Z=u(Q)?J.style.getPropertyValue(Q):getComputedStyle(J)[Q];if(!Z&&Z!==0){const W=C.get(Q);if(W)Z=W.initialValue}return Z},set:(J,Q,Z)=>{if(Q=g(Q),u(Q))J.style.setProperty(Q,Z);else J.style[Q]=Z}};var $1=function(J,Q=!0){if(!J||J.playState==="finished")return;try{if(J.stop)J.stop();else Q&&J.commitStyles(),J.cancel()}catch(Z){}};var A1=function(J,Q){var Z;let W=(Q===null||Q===void 0?void 0:Q.toDefaultUnit)||h;const q=J[J.length-1];if(Y1(q)){const $=((Z=q.match(/(-?[\d.]+)([a-z%]*)/))===null||Z===void 0?void 0:Z[2])||"";if($)W=(G)=>G+$}return W};var $J=function(){return window.__MOTION_DEV_TOOLS_RECORD},j1=function(J,Q,Z,W={},q){const $=$J(),G=W.record!==!1&&$;let H,{duration:w=Y.duration,delay:_=Y.delay,endDelay:L=Y.endDelay,repeat:z=Y.repeat,easing:K=Y.easing,persist:v=!1,direction:o,offset:X,allowWebkitAcceleration:s=!1}=W;const H1=Q1(J),E=q1(Q);let t=N.waapi();E&&D1(J,Q);const O=g(Q),a=N1(H1.values,O),F=C.get(O);return $1(a.animation,!(P(K)&&a.generator)&&W.record!==!1),()=>{const i=()=>{var M,c;return(c=(M=l.get(J,O))!==null&&M!==void 0?M:F===null||F===void 0?void 0:F.initialValue)!==null&&c!==void 0?c:0};let U=P1(b1(Z),i);const X1=A1(U,F);if(P(K)){const M=K.createAnimation(U,Q!=="opacity",i,O,a);K=M.easing,U=M.keyframes||U,w=M.duration||w}if(u(O))if(N.cssRegisterProperty())I1(O);else t=!1;if(E&&!N.linearEasing()&&(R(K)||S(K)&&K.some(R)))t=!1;if(t){if(F)U=U.map((V)=>x(V)?F.toDefaultUnit(V):V);if(U.length===1&&(!N.partialKeyframes()||G))U.unshift(i());const M={delay:B.ms(_),duration:B.ms(w),endDelay:B.ms(L),easing:!S(K)?O1(K,w):void 0,direction:o,iterations:z+1,fill:"both"};if(H=J.animate({[O]:U,offset:X,easing:S(K)?K.map((V)=>O1(V,w)):void 0},M),!H.finished)H.finished=new Promise((V,g1)=>{H.onfinish=V,H.oncancel=g1});const c=U[U.length-1];if(H.finished.then(()=>{if(v)return;l.set(J,O,c),H.cancel()}).catch(y),!s)H.playbackRate=1.000001}else if(q&&E){if(U=U.map((M)=>typeof M==="string"?parseFloat(M):M),U.length===1)U.unshift(parseFloat(i()));H=new q((M)=>{l.set(J,O,X1?X1(M):M)},U,Object.assign(Object.assign({},W),{duration:w,easing:K}))}else{const M=U[U.length-1];l.set(J,O,F&&x(M)?F.toDefaultUnit(M):M)}if(G)$(J,Q,U,{duration:w,delay:_,easing:K,repeat:z,offset:X},"motion-one");return a.setAnimation(H),H}};var k1=(J,Q)=>J[Q]?Object.assign(Object.assign({},J),J[Q]):Object.assign({},J);var v1=function(J,Q){var Z;if(typeof J==="string")if(Q)(Z=Q[J])!==null&&Z!==void 0||(Q[J]=document.querySelectorAll(J)),J=Q[J];else J=document.querySelectorAll(J);else if(J instanceof Element)J=[J];return Array.from(J||[])};var GJ=(J)=>J(),m=(J,Q,Z=Y.duration)=>{return new Proxy({animations:J.map(GJ).filter(Boolean),duration:Z,options:Q},KJ)},HJ=(J)=>J.animations[0],KJ={get:(J,Q)=>{const Z=HJ(J);switch(Q){case"duration":return J.duration;case"currentTime":return B.s((Z===null||Z===void 0?void 0:Z[Q])||0);case"playbackRate":case"playState":return Z===null||Z===void 0?void 0:Z[Q];case"finished":if(!J.finished)J.finished=Promise.all(J.animations.map(MJ)).catch(y);return J.finished;case"stop":return()=>{J.animations.forEach((W)=>$1(W))};case"forEachNative":return(W)=>{J.animations.forEach((q)=>W(q,J))};default:return typeof(Z===null||Z===void 0?void 0:Z[Q])==="undefined"?void 0:()=>J.animations.forEach((W)=>W[Q]())}},set:(J,Q,Z)=>{switch(Q){case"currentTime":Z=B.ms(Z);case"playbackRate":for(let W=0;WJ.finished;var c1=function(J,Q,Z){return R(J)?J(Q,Z):J};var p1=function(J){return function Q(Z,W,q={}){Z=v1(Z);const $=Z.length;e(Boolean($),"No valid element provided."),e(Boolean(W),"No keyframes defined.");const G=[];for(let H=0;H<$;H++){const w=Z[H];for(let _ in W){const L=k1(q,_);L.delay=c1(L.delay,H,$);const z=j1(w,_,W[_],L,J);G.push(z)}}return m(G,q,q.duration)}};var S1=p1(b);var UJ=function(J,Q={}){return m([()=>{const Z=new b(J,[0,1],Q);return Z.finished.catch(()=>{}),Z}],Q,Q.duration)},A=function(J,Q,Z){return(R(J)?UJ:S1)(J,Q,Z)};var y1=window.scrollY,I=!1,G1=!1,k=document.getElementById("nav-main"),YJ=()=>{if(I)return;const J=window.scrollY;if(J>y1){if(J>124){if(k&&!G1&&!I)I=!0,A(k,{y:k.clientHeight*-1}).finished.then(()=>{G1=!0,I=!1})}}else if(k&&G1&&!I)I=!0,A(k,{y:0}).finished.then(()=>{G1=!1,I=!1});y1=J};if(k)window.addEventListener("scroll",YJ);var d1=document.getElementById("mobile-nav-trigger"),f1=document.getElementById("close-mobile-nav"),r=document.getElementById("mobile-nav"),j=!1,u1=0.25;if(r&&d1&&f1){const J=()=>{if(j)return;j=!0,r.showModal(),document.body.classList.add("hide-scroll"),A(r,{opacity:1},{duration:u1}).finished.then(()=>{j=!1})},Q=()=>{if(j)return;j=!0,A(r,{opacity:0},{duration:u1}).finished.then(()=>{r.close(),document.body.classList.remove("hide-scroll"),j=!1})};d1.addEventListener("click",J),f1.addEventListener("click",Q)} +var M1=function(J,Q){J.indexOf(Q)===-1&&J.push(Q)};var p=(J,Q,Z)=>Math.min(Math.max(Z,J),Q);var Y={duration:0.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var B=(J)=>typeof J==="number";var X=(J)=>Array.isArray(J)&&!B(J[0]);var S1=(J,Q,Z)=>{const W=Q-J;return((Z-J)%W+W)%W+J};var C1=function(J,Q){return X(J)?J[S1(0,J.length,Q)]:J};var e=(J,Q,Z)=>-Z*J+Z*Q+J;var y=()=>{},w=(J)=>J;var N=(J,Q,Z)=>Q-J===0?1:(Z-J)/(Q-J);var U1=function(J,Q){const Z=J[J.length-1];for(let W=1;W<=Q;W++){const q=N(0,Q,W);J.push(e(Z,1,q))}},V1=function(J){const Q=[0];return U1(Q,J-1),Q};var Y1=function(J,Q=V1(J.length),Z=w){const W=J.length,q=W-Q.length;return q>0&&U1(Q,q),(G)=>{let H=0;for(;HArray.isArray(J)&&B(J[0]);var E=(J)=>typeof J==="object"&&Boolean(J.createAnimation);var R=(J)=>typeof J==="function";var h1=(J)=>typeof J==="string";var C={ms:(J)=>J*1000,s:(J)=>J/1000};var i1=function(J,Q,Z,W,q){let G,H,$=0;do if(H=Q+(Z-Q)/2,G=D1(H,W,q)-J,G>0)Z=H;else Q=H;while(Math.abs(G)>a1&&++$i1(G,0,1,J,Z);return(G)=>G===0||G===1?G:D1(q(G),Q,W)},D1=(J,Q,Z)=>(((1-3*Z+3*Q)*J+(3*Z-6*Q))*J+3*Q)*J,a1=0.0000001,t1=12;var w1=(J,Q="end")=>(Z)=>{Z=Q==="end"?Math.min(Z,0.999):Math.max(Z,0.001);const W=Z*J,q=Q==="end"?Math.floor(W):Math.ceil(W);return p(0,1,q/J)};var L1=function(J){if(R(J))return J;if(d(J))return I(...J);if(T1[J])return T1[J];if(J.startsWith("steps")){const Q=n1.exec(J);if(Q){const Z=Q[1].split(",");return w1(parseFloat(Z[0]),Z[1].trim())}}return w},T1={ease:I(0.25,0.1,0.25,1),"ease-in":I(0.42,0,1,1),"ease-in-out":I(0.42,0,0.58,1),"ease-out":I(0,0,0.58,1)},n1=/\((.*?)\)/;class j{constructor(J,Q=[0,1],{easing:Z,duration:W=Y.duration,delay:q=Y.delay,endDelay:G=Y.endDelay,repeat:H=Y.repeat,offset:$,direction:h="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=w,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((L,z)=>{this.resolve=L,this.reject=z}),Z=Z||Y.easing,E(Z)){const L=Z.createAnimation(Q);Z=L.easing,Q=L.keyframes||Q,W=L.duration||W}this.repeat=H,this.easing=X(Z)?w:L1(Z),this.updateDuration(W);const F=Y1(Q,$,X(Z)?Z.map(L1):w);this.tick=(L)=>{var z;q=q;let K=0;if(this.pauseTime!==void 0)K=this.pauseTime;else K=(L-this.startTime)*this.rate;if(this.t=K,K/=1000,K=Math.max(K-q,0),this.playState==="finished"&&this.pauseTime===void 0)K=this.totalDuration;const v=K/this.duration;let s=Math.floor(v),x=v%1;if(!x&&v>=1)x=1;x===1&&s--;const a=s%2;if(h==="reverse"||h==="alternate"&&a||h==="alternate-reverse"&&!a)x=1-x;const K1=K>=this.totalDuration?1:Math.min(x,1),_=F(this.easing(K1));if(J(_),this.pauseTime===void 0&&(this.playState==="finished"||K>=this.totalDuration+G))this.playState="finished",(z=this.resolve)===null||z===void 0||z.call(this,_);else if(this.playState!=="idle")this.frameRequestId=requestAnimationFrame(this.tick)},this.play()}play(){const J=performance.now();if(this.playState="running",this.pauseTime!==void 0)this.startTime=J-this.pauseTime;else if(!this.startTime)this.startTime=J;this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var J;if(this.playState="idle",this.frameRequestId!==void 0)cancelAnimationFrame(this.frameRequestId);(J=this.reject)===null||J===void 0||J.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(J){this.duration=J,this.totalDuration=J*(this.repeat+1)}get currentTime(){return this.t}set currentTime(J){if(this.pauseTime!==void 0||this.rate===0)this.pauseTime=J;else this.startTime=performance.now()-J/this.rate}get playbackRate(){return this.rate}set playbackRate(J){this.rate=J}}var e1=function(){},J1=function(){};e1=function(J,Q){if(!J&&typeof console!=="undefined")console.warn(Q)},J1=function(J,Q){if(!J)throw new Error(Q)};class Q1{setAnimation(J){this.animation=J,J===null||J===void 0||J.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}var Z1=function(J){if(!R1.has(J))R1.set(J,{transforms:[],values:new Map});return R1.get(J)},N1=function(J,Q){if(!J.has(Q))J.set(Q,new Q1);return J.get(Q)},R1=new WeakMap;var JJ=["","X","Y","Z"],QJ=["translate","scale","rotate","skew"],f={x:"translateX",y:"translateY",z:"translateZ"},I1={syntax:"",initialValue:"0deg",toDefaultUnit:(J)=>J+"deg"},ZJ={translate:{syntax:"",initialValue:"0px",toDefaultUnit:(J)=>J+"px"},rotate:I1,scale:{syntax:"",initialValue:1,toDefaultUnit:w},skew:I1},V=new Map,q1=(J)=>`--motion-${J}`,W1=["x","y","z"];QJ.forEach((J)=>{JJ.forEach((Q)=>{W1.push(J+Q),V.set(q1(J+Q),ZJ[J])})});var WJ=(J,Q)=>W1.indexOf(J)-W1.indexOf(Q),qJ=new Set(W1),$1=(J)=>qJ.has(J),P1=(J,Q)=>{if(f[Q])Q=f[Q];const{transforms:Z}=Z1(J);M1(Z,Q),J.style.transform=$J(Z)},$J=(J)=>J.sort(WJ).reduce(GJ,"").trim(),GJ=(J,Q)=>`${J} ${Q}(var(${q1(Q)}))`;var E1=function(J){if(_1.has(J))return;_1.add(J);try{const{syntax:Q,initialValue:Z}=V.has(J)?V.get(J):{};CSS.registerProperty({name:J,inherits:!1,syntax:Q,initialValue:Z})}catch(Q){}},g=(J)=>J.startsWith("--"),_1=new Set;var z1=(J,Q)=>document.createElement("div").animate(J,Q),j1={cssRegisterProperty:()=>typeof CSS!=="undefined"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{z1({opacity:[1]})}catch(J){return!1}return!0},finished:()=>Boolean(z1({opacity:[0,1]},{duration:0.001}).finished),linearEasing:()=>{try{z1({opacity:0},{easing:"linear(0, 1)"})}catch(J){return!1}return!0}},O1={},D={};for(let J in j1)D[J]=()=>{if(O1[J]===void 0)O1[J]=j1[J]();return O1[J]};var HJ=0.015,KJ=(J,Q)=>{let Z="";const W=Math.round(Q/HJ);for(let q=0;q{if(R(J))return D.linearEasing()?`linear(${KJ(J,Q)})`:Y.easing;else return d(J)?MJ(J):J},MJ=([J,Q,Z,W])=>`cubic-bezier(${J}, ${Q}, ${Z}, ${W})`;var A1=function(J,Q){for(let Z=0;ZArray.isArray(J)?J:[J];var u=function(J){if(f[J])J=f[J];return $1(J)?q1(J):J};var l={get:(J,Q)=>{Q=u(Q);let Z=g(Q)?J.style.getPropertyValue(Q):getComputedStyle(J)[Q];if(!Z&&Z!==0){const W=V.get(Q);if(W)Z=W.initialValue}return Z},set:(J,Q,Z)=>{if(Q=u(Q),g(Q))J.style.setProperty(Q,Z);else J.style[Q]=Z}};var G1=function(J,Q=!0){if(!J||J.playState==="finished")return;try{if(J.stop)J.stop();else Q&&J.commitStyles(),J.cancel()}catch(Z){}};var k1=function(J,Q){var Z;let W=(Q===null||Q===void 0?void 0:Q.toDefaultUnit)||w;const q=J[J.length-1];if(h1(q)){const G=((Z=q.match(/(-?[\d.]+)([a-z%]*)/))===null||Z===void 0?void 0:Z[2])||"";if(G)W=(H)=>H+G}return W};var UJ=function(){return window.__MOTION_DEV_TOOLS_RECORD},v1=function(J,Q,Z,W={},q){const G=UJ(),H=W.record!==!1&&G;let $,{duration:h=Y.duration,delay:F=Y.delay,endDelay:L=Y.endDelay,repeat:z=Y.repeat,easing:K=Y.easing,persist:v=!1,direction:s,offset:x,allowWebkitAcceleration:a=!1}=W;const K1=Z1(J),_=$1(Q);let t=D.waapi();_&&P1(J,Q);const O=u(Q),i=N1(K1.values,O),S=V.get(O);return G1(i.animation,!(E(K)&&i.generator)&&W.record!==!1),()=>{const n=()=>{var M,c;return(c=(M=l.get(J,O))!==null&&M!==void 0?M:S===null||S===void 0?void 0:S.initialValue)!==null&&c!==void 0?c:0};let U=A1(b1(Z),n);const B1=k1(U,S);if(E(K)){const M=K.createAnimation(U,Q!=="opacity",n,O,i);K=M.easing,U=M.keyframes||U,h=M.duration||h}if(g(O))if(D.cssRegisterProperty())E1(O);else t=!1;if(_&&!D.linearEasing()&&(R(K)||X(K)&&K.some(R)))t=!1;if(t){if(S)U=U.map((T)=>B(T)?S.toDefaultUnit(T):T);if(U.length===1&&(!D.partialKeyframes()||H))U.unshift(n());const M={delay:C.ms(F),duration:C.ms(h),endDelay:C.ms(L),easing:!X(K)?X1(K,h):void 0,direction:s,iterations:z+1,fill:"both"};if($=J.animate({[O]:U,offset:x,easing:X(K)?K.map((T)=>X1(T,h)):void 0},M),!$.finished)$.finished=new Promise((T,s1)=>{$.onfinish=T,$.oncancel=s1});const c=U[U.length-1];if($.finished.then(()=>{if(v)return;l.set(J,O,c),$.cancel()}).catch(y),!a)$.playbackRate=1.000001}else if(q&&_){if(U=U.map((M)=>typeof M==="string"?parseFloat(M):M),U.length===1)U.unshift(parseFloat(n()));$=new q((M)=>{l.set(J,O,B1?B1(M):M)},U,Object.assign(Object.assign({},W),{duration:h,easing:K}))}else{const M=U[U.length-1];l.set(J,O,S&&B(M)?S.toDefaultUnit(M):M)}if(H)G(J,Q,U,{duration:h,delay:F,easing:K,repeat:z,offset:x},"motion-one");return i.setAnimation($),$}};var c1=(J,Q)=>J[Q]?Object.assign(Object.assign({},J),J[Q]):Object.assign({},J);var p1=function(J,Q){var Z;if(typeof J==="string")if(Q)(Z=Q[J])!==null&&Z!==void 0||(Q[J]=document.querySelectorAll(J)),J=Q[J];else J=document.querySelectorAll(J);else if(J instanceof Element)J=[J];return Array.from(J||[])};var YJ=(J)=>J(),m=(J,Q,Z=Y.duration)=>{return new Proxy({animations:J.map(YJ).filter(Boolean),duration:Z,options:Q},wJ)},hJ=(J)=>J.animations[0],wJ={get:(J,Q)=>{const Z=hJ(J);switch(Q){case"duration":return J.duration;case"currentTime":return C.s((Z===null||Z===void 0?void 0:Z[Q])||0);case"playbackRate":case"playState":return Z===null||Z===void 0?void 0:Z[Q];case"finished":if(!J.finished)J.finished=Promise.all(J.animations.map(LJ)).catch(y);return J.finished;case"stop":return()=>{J.animations.forEach((W)=>G1(W))};case"forEachNative":return(W)=>{J.animations.forEach((q)=>W(q,J))};default:return typeof(Z===null||Z===void 0?void 0:Z[Q])==="undefined"?void 0:()=>J.animations.forEach((W)=>W[Q]())}},set:(J,Q,Z)=>{switch(Q){case"currentTime":Z=C.ms(Z);case"playbackRate":for(let W=0;WJ.finished;var y1=function(J,Q,Z){return R(J)?J(Q,Z):J};var d1=function(J){return function Q(Z,W,q={}){Z=p1(Z);const G=Z.length;J1(Boolean(G),"No valid element provided."),J1(Boolean(W),"No keyframes defined.");const H=[];for(let $=0;${const Z=new j(J,[0,1],Q);return Z.finished.catch(()=>{}),Z}],Q,Q.duration)},A=function(J,Q,Z){return(R(J)?RJ:F1)(J,Q,Z)};var r=function(J,Q){if(!Q)return"";var Z="; "+J;if(Q===!0)return Z;return Z+"="+Q},zJ=function(J){if(typeof J.expires==="number"){var Q=new Date;Q.setMilliseconds(Q.getMilliseconds()+J.expires*86400000),J.expires=Q}return r("Expires",J.expires?J.expires.toUTCString():"")+r("Domain",J.domain)+r("Path",J.path)+r("Secure",J.secure)+r("SameSite",J.sameSite)};function OJ(J,Q,Z){return encodeURIComponent(J).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(Q).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)+zJ(Z)}function XJ(J){var Q={},Z=J?J.split("; "):[];for(var W=0,q=Z;W{if(P)return;const J=window.scrollY;if(J>u1){if(J>124){if(k&&!H1&&!P)P=!0,A(k,{y:k.clientHeight*-1}).finished.then(()=>{H1=!0,P=!1})}}else if(k&&H1&&!P)P=!0,A(k,{y:0}).finished.then(()=>{H1=!1,P=!1});u1=J};if(k)window.addEventListener("scroll",BJ);var l1=document.getElementById("mobile-nav-trigger"),m1=document.getElementById("close-mobile-nav"),o=document.getElementById("mobile-nav"),b=!1,r1=0.25;if(o&&l1&&m1){const J=()=>{if(b)return;b=!0,o.showModal(),document.body.classList.add("hide-scroll"),A(o,{opacity:1},{duration:r1}).finished.then(()=>{b=!1})},Q=()=>{if(b)return;b=!0,A(o,{opacity:0},{duration:r1}).finished.then(()=>{o.close(),document.body.classList.remove("hide-scroll"),b=!1})};l1.addEventListener("click",J),m1.addEventListener("click",Q)}var o1="teonite-accept-cookies",SJ=()=>{const J=f1(o1);if(J)return JSON.parse(J).accepted;return!1};if(!SJ()){const J=document.getElementById("cookies"),Q=document.getElementById("accept-cookies");if(J&&Q)J.classList.add("show"),Q.addEventListener("click",()=>{const Z={accepted:!0};g1(o1,JSON.stringify(Z)),J.classList.remove("show")})} diff --git a/src/documents/PrivacyPolicy.pdf b/src/documents/PrivacyPolicy.pdf new file mode 100644 index 0000000..7791bbd Binary files /dev/null and b/src/documents/PrivacyPolicy.pdf differ diff --git a/src/index.html b/src/index.html index db65c4a..bac1c6f 100644 --- a/src/index.html +++ b/src/index.html @@ -259,13 +259,13 @@

Venture Building

home
  • - products + our work
  • - contact us + services
  • - blog + contact
    • @@ -276,13 +276,13 @@

      Venture Building

    • X
    • - facebookmatrix
    • - matrixfacebook
    @@ -311,6 +311,13 @@

    Venture Building

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - - + + + + + diff --git a/src/pages/contact.html b/src/pages/contact.html index 741cbbe..181bb80 100644 --- a/src/pages/contact.html +++ b/src/pages/contact.html @@ -73,7 +73,7 @@

    MichaƂ Gryczka

    -

    Fund:

    +

    VENTURE BUILDING:

    Robert Olejnik

    Executive Chairman & Founder

    @@ -94,13 +94,13 @@

    Robert Olejnik

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
  • @@ -146,6 +146,14 @@

    Robert Olejnik

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - - + + + + + diff --git a/src/pages/services/discovery.html b/src/pages/services/discovery.html index f054c86..2eb45db 100644 --- a/src/pages/services/discovery.html +++ b/src/pages/services/discovery.html @@ -181,13 +181,13 @@

    Form

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
  • @@ -233,6 +233,13 @@

    Form

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/services/duediligence.html b/src/pages/services/duediligence.html index 22ac7e9..ae7e942 100644 --- a/src/pages/services/duediligence.html +++ b/src/pages/services/duediligence.html @@ -158,13 +158,13 @@

    Due Diligence

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
  • @@ -210,6 +210,13 @@

    Due Diligence

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/services/engineering.html b/src/pages/services/engineering.html index 231f6f1..257de05 100644 --- a/src/pages/services/engineering.html +++ b/src/pages/services/engineering.html @@ -234,13 +234,13 @@

    What do you need to do to maximize success?

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
    • @@ -251,13 +251,13 @@

      What do you need to do to maximize success?

    • X
    • - facebookmatrix
    • - matrixfacebook
    @@ -286,6 +286,13 @@

    What do you need to do to maximize success?

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/services/index.html b/src/pages/services/index.html index ed7a413..66ba5f6 100644 --- a/src/pages/services/index.html +++ b/src/pages/services/index.html @@ -159,32 +159,28 @@

    Due Diligence

    -
    -

    Venture Building

    +
    +

    Research & Development

    - We invest in deep-tech products in pre-seed and seed stages - with cash & equity model. + Innovative projects that challenge the status quo require a + unique and flexible process that encourages exploration and + effectively manages risks.

    - With nearly 15 years of experience working with founders and - building over 10 product companies, we have gained valuable - insights into the critical processes of bootstrapping - businesses in their early stages. + Innovative projects are often based on invalidated + assumptions and hypotheses. Once solved they bring a lot of + value. But they also pose a lot of technological risks.

    - We have also gained key insights into team and product - development. Using this experience and our verified and - well-established processes, we invest in deep-tech products - on pre-seed and seed stage. + We help you execute R&D projects with our custom process + focused on exploration, risk management and prototyping.

    @@ -228,32 +224,35 @@

    UI/UX & Branding

    -
    -

    Research & Development

    +
    +

    Venture Building

    - Innovative projects that challenge the status quo require a - unique and flexible process that encourages exploration and - effectively manages risks. + We invest in deep-tech products in pre-seed and seed stages + with cash & equity model.

    - Innovative projects are often based on invalidated - assumptions and hypotheses. Once solved they bring a lot of - value. But they also pose a lot of technological risks. + With nearly 15 years of experience working with founders and + building over 10 product companies, we have gained valuable + insights into the critical processes of bootstrapping + businesses in their early stages.

    - We help you execute R&D projects with our custom process - focused on exploration, risk management and prototyping. + We have also gained key insights into team and product + development. Using this experience and our verified and + well-established processes, we invest in deep-tech products + on pre-seed and seed stage.

    -
    @@ -269,13 +268,13 @@

    Research & Development

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
    • @@ -286,13 +285,13 @@

      Research & Development

    • X
    • - facebookmatrix
    • - matrixfacebook
    @@ -321,6 +320,13 @@

    Research & Development

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/services/rd.html b/src/pages/services/rd.html index 471009a..df9d74c 100644 --- a/src/pages/services/rd.html +++ b/src/pages/services/rd.html @@ -160,13 +160,13 @@

    3. Prototyping and Testing

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
    • @@ -177,13 +177,13 @@

      3. Prototyping and Testing

    • X
    • - facebookmatrix
    • - matrixfacebook
    @@ -212,6 +212,13 @@

    3. Prototyping and Testing

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/services/uiux.html b/src/pages/services/uiux.html index 4edcc5e..d0a279d 100644 --- a/src/pages/services/uiux.html +++ b/src/pages/services/uiux.html @@ -154,13 +154,13 @@

    Seamless Handoff

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
    • @@ -171,13 +171,13 @@

      Seamless Handoff

    • X
    • - facebookmatrix
    • - matrixfacebook
    @@ -206,6 +206,13 @@

    Seamless Handoff

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/services/venture.html b/src/pages/services/venture.html index efc79c4..0264a5d 100644 --- a/src/pages/services/venture.html +++ b/src/pages/services/venture.html @@ -162,13 +162,13 @@

    Followup call

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
  • @@ -214,6 +214,13 @@

    Followup call

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/work/esa.html b/src/pages/work/esa.html index 0718ad3..4bc0fc1 100644 --- a/src/pages/work/esa.html +++ b/src/pages/work/esa.html @@ -128,13 +128,13 @@

    The Solution:

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
  • @@ -180,6 +180,13 @@

    The Solution:

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/work/index.html b/src/pages/work/index.html index 555efee..c09dbdc 100644 --- a/src/pages/work/index.html +++ b/src/pages/work/index.html @@ -142,7 +142,7 @@

    Our Work

    />
    -

    Open Source security platform: defguard

    +

    Open Source security platform

    Our Work />
    -

    NPL trading platform & marketplace: Widestreet

    +

    NPL trading platform & marketplace

    Our Work />
    -

    Strategic Portfolio Management: Qvistorp

    +

    Strategic Portfolio Management

    Our Work />
    -

    Bid-to-earn DEX: Brightpool

    +

    Bid-to-earn DEX

    Our Work home
  • - products + our work
  • - contact us + services
  • - blog + contact
  • @@ -277,6 +277,13 @@

    Our Work

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/work/tmobile.html b/src/pages/work/tmobile.html index 0ae3a8a..06603d0 100644 --- a/src/pages/work/tmobile.html +++ b/src/pages/work/tmobile.html @@ -191,13 +191,13 @@

    Analytical Framework

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
    • @@ -208,13 +208,13 @@

      Analytical Framework

    • X
    • - facebookmatrix
    • - matrixfacebook
    @@ -243,6 +243,13 @@

    Analytical Framework

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + + diff --git a/src/pages/work/uv.html b/src/pages/work/uv.html index ac3ca9c..1c57000 100644 --- a/src/pages/work/uv.html +++ b/src/pages/work/uv.html @@ -173,13 +173,13 @@

    About castLabs

    home
  • - products + our work
  • - contact us + services
  • - blog + contact
  • @@ -225,6 +225,13 @@

    About castLabs

    +
    +

    + We use cookies to improve this website - learn more about our + privacy policy. +

    + +
    - + + + +