shop-components 0.4.21 → 0.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
(function(){"use strict";var na=function(){var l="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q:Odkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq;w8Wqdbk;esezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9Uc;WFbGgocjdaocjd6EhDaicefhocbhqdnindndndnaeaq9nmbaDaeaq9RaqaDfae6Egkcsfglcl4cifcd4hxalc9WGgmTmecbhPawcjdfhsaohzinaraz9Rax6mvarazaxfgo9RcK6mvczhlcbhHinalgic9WfgOawcj;cbffhldndndndndnazaOco4fRbbaHcoG4ciGPlbedibkal9cb83ibalcwf9cb83ibxikalaoRblaoRbbgOco4gAaAciSgAE86bbawcj;cbfaifglcGfaoclfaAfgARbbaOcl4ciGgCaCciSgCE86bbalcVfaAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc7faAaCfgARbbaOciGgOaOciSgOE86bbalctfaAaOfgARbbaoRbegOco4gCaCciSgCE86bbalc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc93faAaCfgARbbaOciGgOaOciSgOE86bbalc94faAaOfgARbbaoRbdgOco4gCaCciSgCE86bbalc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc97faAaCfgARbbaOciGgOaOciSgOE86bbalc98faAaOfgORbbaoRbigoco4gAaAciSgAE86bbalc99faOaAfgORbbaocl4ciGgAaAciSgAE86bbalc9:faOaAfgORbbaocd4ciGgAaAciSgAE86bbalcufaOaAfglRbbaociGgoaociSgoE86bbalaofhoxdkalaoRbwaoRbbgOcl4gAaAcsSgAE86bbawcj;cbfaifglcGfaocwfaAfgARbbaOcsGgOaOcsSgOE86bbalcVfaAaOfgORbbaoRbegAcl4gCaCcsSgCE86bbalc7faOaCfgORbbaAcsGgAaAcsSgAE86bbalctfaOaAfgORbbaoRbdgAcl4gCaCcsSgCE86bbalc91faOaCfgORbbaAcsGgAaAcsSgAE86bbalc4faOaAfgORbbaoRbigAcl4gCaCcsSgCE86bbalc93faOaCfgORbbaAcsGgAaAcsSgAE86bbalc94faOaAfgORbbaoRblgAcl4gCaCcsSgCE86bbalc95faOaCfgORbbaAcsGgAaAcsSgAE86bbalc96faOaAfgORbbaoRbvgAcl4gCaCcsSgCE86bbalc97faOaCfgORbbaAcsGgAaAcsSgAE86bbalc98faOaAfgORbbaoRbogAcl4gCaCcsSgCE86bbalc99faOaCfgORbbaAcsGgAaAcsSgAE86bbalc9:faOaAfgORbbaoRbrgocl4gAaAcsSgAE86bbalcufaOaAfglRbbaocsGgoaocsSgoE86bbalaofhoxekalao8Pbb83bbalcwfaocwf8Pbb83bbaoczfhokdnaiam9pmbaHcdfhHaiczfhlarao9RcL0mekkaiam6mvaoTmvdnakTmbawaPfRbbhHawcj;cbfhlashiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkkascefhsaohzaPcefgPad9hmbxikkcbc99arao9Radcaadca0ESEhoxlkaoaxad2fhCdnakmbadhlinaoTmlarao9Rax6mlaoaxfhoalcufglmbkaChoxekcbhmawcjdfhAinarao9Rax6miawamfRbbhHawcj;cbfhlaAhiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkaAcefhAaoaxfhoamcefgmad9hmbkaChokabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqaombkc9:hoxekc9:hokavcj;ebf8Kjjjjbaok;cseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;oiliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavciGfgkcd7cetfaD87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavcufciGfcetfaD87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohvxekcjjjj94hvkabakcetfav87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklzNbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q:6dkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq:p9sqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:N8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhlaicefhodnaeTmbadTmbalc;WFbGglcjdalcjd6EhwcbhDinawaeaD9RaDawfae6Egqcsfglc9WGgkci2hxakcethmalcl4cifcd4hPabaDad2fhsakc;ab6hzcbhHincbhOaohAdndninaraA9RaP6meavcj;cbfaOak2fhCaAaPfhocbhidnazmbarao9Rc;Gb6mbcbhlinaCalfhidndndndndnaAalco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklbaoczfhokdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklzaoczfhokdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklaaoczfhokdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaoclfaYpQbfaXc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaocwfaYpQbfaXc:q:yjjbfRbbfhoxekaiaopbbbpkl8Waoczfhokalc;abfhialcjefak0meaihlarao9Rc;Fb0mbkkdnaiak9pmbaici4hlinarao9RcK6miaCaifhXdndndndndnaAaico4fRbbalcoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpkbbxikaXaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaXaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaXaopbbbpkbbaoczfhokalcdfhlaiczfgiak6mbkkaoTmeaohAaOcefgOclSmdxbkkc9:hoxlkdnakTmbavcjdfaHfhiavaHfpbdbhYcbhXinaiavcj;cbfaXfglpblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLalakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEalamfpblbg3cep9Ta3aQp9op9Hp9rg3alaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfhiaXczfgXak6mbkkaHclfgHad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfgDae6mbkkcbc99arao9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk::seHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:wPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiaeciGgvcitgdfcbcaad9R;8kbaiabalcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaialciGgecdtgdVcbc;abad9R;8kbaiabavcdtfgvad;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkavaiad;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz:Dbb",e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var s=WebAssembly.validate(e)?a(t):a(l),n,r=WebAssembly.instantiate(s,{}).then(function(f){n=f.instance,n.exports.__wasm_call_ctors()});function a(f){for(var m=new Uint8Array(f.length),B=0;B<f.length;++B){var I=f.charCodeAt(B);m[B]=I>96?I-97:I>64?I-39:I+4}for(var E=0,B=0;B<f.length;++B)m[E++]=m[B]<60?i[m[B]]:(m[B]-60)*64+m[++B];return m.buffer.slice(0,E)}function A(f,m,B,I,E,Q,y){var x=f.exports.sbrk,F=I+3&-4,w=x(F*E),_=x(Q.length),J=new Uint8Array(f.exports.memory.buffer);J.set(Q,_);var G=m(w,I,E,_,Q.length);if(G==0&&y&&y(w,F,E),B.set(J.subarray(w,w+I*E)),x(w-x(0)),G!=0)throw new Error("Malformed buffer data: "+G)}var o={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},h={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},c=[],d=0;function u(f){var m={object:new Worker(f),pending:0,requests:{}};return m.object.onmessage=function(B){var I=B.data;m.pending-=I.count,m.requests[I.id][I.action](I.value),delete m.requests[I.id]},m}function g(f){for(var m="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(s)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+b.name+";"+A.toString()+b.toString(),B=new Blob([m],{type:"text/javascript"}),I=URL.createObjectURL(B),E=c.length;E<f;++E)c[E]=u(I);for(var E=f;E<c.length;++E)c[E].object.postMessage({});c.length=f,URL.revokeObjectURL(I)}function p(f,m,B,I,E){for(var Q=c[0],y=1;y<c.length;++y)c[y].pending<Q.pending&&(Q=c[y]);return new Promise(function(x,F){var w=new Uint8Array(B),_=++d;Q.pending+=f,Q.requests[_]={resolve:x,reject:F},Q.object.postMessage({id:_,count:f,size:m,source:w,mode:I,filter:E},[w.buffer])})}function b(f){var m=f.data;if(!m.id)return self.close();self.ready.then(function(B){try{var I=new Uint8Array(m.count*m.size);A(B,B.exports[m.mode],I,m.count,m.size,m.source,B.exports[m.filter]),self.postMessage({id:m.id,count:m.count,action:"resolve",value:I},[I.buffer])}catch(E){self.postMessage({id:m.id,count:m.count,action:"reject",value:E})}})}return{ready:r,supported:!0,useWorkers:function(f){g(f)},decodeVertexBuffer:function(f,m,B,I,E){A(n,n.exports.meshopt_decodeVertexBuffer,f,m,B,I,n.exports[o[E]])},decodeIndexBuffer:function(f,m,B,I){A(n,n.exports.meshopt_decodeIndexBuffer,f,m,B,I)},decodeIndexSequence:function(f,m,B,I){A(n,n.exports.meshopt_decodeIndexSequence,f,m,B,I)},decodeGltfBuffer:function(f,m,B,I,E,Q){A(n,n.exports[h[E]],f,m,B,I,n.exports[o[Q]])},decodeGltfBufferAsync:function(f,m,B,I,E){return c.length>0?p(f,m,B,h[I],o[E]):r.then(function(){var Q=new Uint8Array(f*m);return A(n,n.exports[h[I]],Q,f,m,B,n.exports[o[E]]),Q})}}}();/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2010-2025 Three.js Authors
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/const Ks="182",Xe=0,ra=1,aa=2,Ys=1,Ws=100,Xs=204,Zs=205,$s=3,Aa=0,tn="attached",oa="detached",en=300,ha=301,De=1e3,Yt=1001,Ri=1002,Gt=1003,sn=1004,ca=1005,Nt=1006,la=1007,_e=1008,k=1009,Ut=1015,Wt=1016,nn=35902,rn=35899,Li=1022,zt=1023,ae=1028,Te=1030,an=33776,Gi=33777,An=33778,da=33779,ua=35840,Ni=35842,on=35843,ga=36196,hn=37492,cn=37496,pa=37488,fa=37489,ba=37490,ma=37491,Ze=37808,Ui=37812,zi=36492,Ia=36495,Ba=36283,Ca=36284,Ea=36285,ya=36286,Re=2300,Le=2301,vi=2302,ln=2400,dn=2401,un=2402,Qa=2500,xa=0,gn=1,Oi=2,wa=0,$e="",z="srgb",$="srgb-linear",pn="linear",Hi="srgb",Ae=7680,fn=519,qi=35044,Xt=2e3,Pi=2001;function Ma(l){for(let t=l.length-1;t>=0;--t)if(l[t]>=65535)return!0;return!1}function Sa(l){return ArrayBuffer.isView(l)&&!(l instanceof DataView)}function ji(l){return document.createElementNS("http://www.w3.org/1999/xhtml",l)}const bn={};function mn(...l){const t="THREE."+l.shift();console.log(t,...l)}function L(...l){const t="THREE."+l.shift();console.warn(t,...l)}function U(...l){const t="THREE."+l.shift();console.error(t,...l)}function In(...l){const t=l.join(" ");t in bn||(bn[t]=!0,L(...l))}class ti{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)}hasEventListener(t,e){const i=this._listeners;return i===void 0?!1:i[t]!==void 0&&i[t].indexOf(e)!==-1}removeEventListener(t,e){const i=this._listeners;if(i===void 0)return;const s=i[t];if(s!==void 0){const n=s.indexOf(e);n!==-1&&s.splice(n,1)}}dispatchEvent(t){const e=this._listeners;if(e===void 0)return;const i=e[t.type];if(i!==void 0){t.target=this;const s=i.slice(0);for(let n=0,r=s.length;n<r;n++)s[n].call(this,t);t.target=null}}}const K=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let Bn=1234567;const Ge=Math.PI/180,Ne=180/Math.PI;function ot(){const l=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(K[l&255]+K[l>>8&255]+K[l>>16&255]+K[l>>24&255]+"-"+K[t&255]+K[t>>8&255]+"-"+K[t>>16&15|64]+K[t>>24&255]+"-"+K[e&63|128]+K[e>>8&255]+"-"+K[e>>16&255]+K[e>>24&255]+K[i&255]+K[i>>8&255]+K[i>>16&255]+K[i>>24&255]).toLowerCase()}function M(l,t,e){return Math.max(t,Math.min(e,l))}function Ji(l,t){return(l%t+t)%t}function Fa(l,t,e,i,s){return i+(l-t)*(s-i)/(e-t)}function ka(l,t,e){return l!==t?(e-l)/(t-l):0}function Ue(l,t,e){return(1-e)*l+e*t}function Da(l,t,e,i){return Ue(l,t,1-Math.exp(-e*i))}function _a(l,t=1){return t-Math.abs(Ji(l,t*2)-t)}function Ta(l,t,e){return l<=t?0:l>=e?1:(l=(l-t)/(e-t),l*l*(3-2*l))}function Ra(l,t,e){return l<=t?0:l>=e?1:(l=(l-t)/(e-t),l*l*l*(l*(l*6-15)+10))}function La(l,t){return l+Math.floor(Math.random()*(t-l+1))}function Ga(l,t){return l+Math.random()*(t-l)}function Na(l){return l*(.5-Math.random())}function Ua(l){l!==void 0&&(Bn=l);let t=Bn+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function za(l){return l*Ge}function va(l){return l*Ne}function Oa(l){return(l&l-1)===0&&l!==0}function Ha(l){return Math.pow(2,Math.ceil(Math.log(l)/Math.LN2))}function qa(l){return Math.pow(2,Math.floor(Math.log(l)/Math.LN2))}function Pa(l,t,e,i,s){const n=Math.cos,r=Math.sin,a=n(e/2),A=r(e/2),o=n((t+i)/2),h=r((t+i)/2),c=n((t-i)/2),d=r((t-i)/2),u=n((i-t)/2),g=r((i-t)/2);switch(s){case"XYX":l.set(a*h,A*c,A*d,a*o);break;case"YZY":l.set(A*d,a*h,A*c,a*o);break;case"ZXZ":l.set(A*c,A*d,a*h,a*o);break;case"XZX":l.set(a*h,A*g,A*u,a*o);break;case"YXY":l.set(A*u,a*h,A*g,a*o);break;case"ZYZ":l.set(A*g,A*u,a*h,a*o);break;default:L("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function ht(l,t){switch(t.constructor){case Float32Array:return l;case Uint32Array:return l/4294967295;case Uint16Array:return l/65535;case Uint8Array:return l/255;case Int32Array:return Math.max(l/2147483647,-1);case Int16Array:return Math.max(l/32767,-1);case Int8Array:return Math.max(l/127,-1);default:throw new Error("Invalid component type.")}}function T(l,t){switch(t.constructor){case Float32Array:return l;case Uint32Array:return Math.round(l*4294967295);case Uint16Array:return Math.round(l*65535);case Uint8Array:return Math.round(l*255);case Int32Array:return Math.round(l*2147483647);case Int16Array:return Math.round(l*32767);case Int8Array:return Math.round(l*127);default:throw new Error("Invalid component type.")}}const ja={DEG2RAD:Ge,RAD2DEG:Ne,generateUUID:ot,clamp:M,euclideanModulo:Ji,mapLinear:Fa,inverseLerp:ka,lerp:Ue,damp:Da,pingpong:_a,smoothstep:Ta,smootherstep:Ra,randInt:La,randFloat:Ga,randFloatSpread:Na,seededRandom:Ua,degToRad:za,radToDeg:va,isPowerOfTwo:Oa,ceilPowerOfTwo:Ha,floorPowerOfTwo:qa,setQuaternionFromProperEuler:Pa,normalize:T,denormalize:ht};class O{constructor(t=0,e=0){O.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,i=this.y,s=t.elements;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=M(this.x,t.x,e.x),this.y=M(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=M(this.x,t,e),this.y=M(this.y,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(M(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(M(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const i=Math.cos(e),s=Math.sin(e),n=this.x-t.x,r=this.y-t.y;return this.x=n*i-r*s+t.x,this.y=n*s+r*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class vt{constructor(t=0,e=0,i=0,s=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=i,this._w=s}static slerpFlat(t,e,i,s,n,r,a){let A=i[s+0],o=i[s+1],h=i[s+2],c=i[s+3],d=n[r+0],u=n[r+1],g=n[r+2],p=n[r+3];if(a<=0){t[e+0]=A,t[e+1]=o,t[e+2]=h,t[e+3]=c;return}if(a>=1){t[e+0]=d,t[e+1]=u,t[e+2]=g,t[e+3]=p;return}if(c!==p||A!==d||o!==u||h!==g){let b=A*d+o*u+h*g+c*p;b<0&&(d=-d,u=-u,g=-g,p=-p,b=-b);let f=1-a;if(b<.9995){const m=Math.acos(b),B=Math.sin(m);f=Math.sin(f*m)/B,a=Math.sin(a*m)/B,A=A*f+d*a,o=o*f+u*a,h=h*f+g*a,c=c*f+p*a}else{A=A*f+d*a,o=o*f+u*a,h=h*f+g*a,c=c*f+p*a;const m=1/Math.sqrt(A*A+o*o+h*h+c*c);A*=m,o*=m,h*=m,c*=m}}t[e]=A,t[e+1]=o,t[e+2]=h,t[e+3]=c}static multiplyQuaternionsFlat(t,e,i,s,n,r){const a=i[s],A=i[s+1],o=i[s+2],h=i[s+3],c=n[r],d=n[r+1],u=n[r+2],g=n[r+3];return t[e]=a*g+h*c+A*u-o*d,t[e+1]=A*g+h*d+o*c-a*u,t[e+2]=o*g+h*u+a*d-A*c,t[e+3]=h*g-a*c-A*d-o*u,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,s){return this._x=t,this._y=e,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const i=t._x,s=t._y,n=t._z,r=t._order,a=Math.cos,A=Math.sin,o=a(i/2),h=a(s/2),c=a(n/2),d=A(i/2),u=A(s/2),g=A(n/2);switch(r){case"XYZ":this._x=d*h*c+o*u*g,this._y=o*u*c-d*h*g,this._z=o*h*g+d*u*c,this._w=o*h*c-d*u*g;break;case"YXZ":this._x=d*h*c+o*u*g,this._y=o*u*c-d*h*g,this._z=o*h*g-d*u*c,this._w=o*h*c+d*u*g;break;case"ZXY":this._x=d*h*c-o*u*g,this._y=o*u*c+d*h*g,this._z=o*h*g+d*u*c,this._w=o*h*c-d*u*g;break;case"ZYX":this._x=d*h*c-o*u*g,this._y=o*u*c+d*h*g,this._z=o*h*g-d*u*c,this._w=o*h*c+d*u*g;break;case"YZX":this._x=d*h*c+o*u*g,this._y=o*u*c+d*h*g,this._z=o*h*g-d*u*c,this._w=o*h*c-d*u*g;break;case"XZY":this._x=d*h*c-o*u*g,this._y=o*u*c-d*h*g,this._z=o*h*g+d*u*c,this._w=o*h*c+d*u*g;break;default:L("Quaternion: .setFromEuler() encountered an unknown order: "+r)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const i=e/2,s=Math.sin(i);return this._x=t.x*s,this._y=t.y*s,this._z=t.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,i=e[0],s=e[4],n=e[8],r=e[1],a=e[5],A=e[9],o=e[2],h=e[6],c=e[10],d=i+a+c;if(d>0){const u=.5/Math.sqrt(d+1);this._w=.25/u,this._x=(h-A)*u,this._y=(n-o)*u,this._z=(r-s)*u}else if(i>a&&i>c){const u=2*Math.sqrt(1+i-a-c);this._w=(h-A)/u,this._x=.25*u,this._y=(s+r)/u,this._z=(n+o)/u}else if(a>c){const u=2*Math.sqrt(1+a-i-c);this._w=(n-o)/u,this._x=(s+r)/u,this._y=.25*u,this._z=(A+h)/u}else{const u=2*Math.sqrt(1+c-i-a);this._w=(r-s)/u,this._x=(n+o)/u,this._y=(A+h)/u,this._z=.25*u}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return i<1e-8?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(M(this.dot(t),-1,1)))}rotateTowards(t,e){const i=this.angleTo(t);if(i===0)return this;const s=Math.min(1,e/i);return this.slerp(t,s),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(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const i=t._x,s=t._y,n=t._z,r=t._w,a=e._x,A=e._y,o=e._z,h=e._w;return this._x=i*h+r*a+s*o-n*A,this._y=s*h+r*A+n*a-i*o,this._z=n*h+r*o+i*A-s*a,this._w=r*h-i*a-s*A-n*o,this._onChangeCallback(),this}slerp(t,e){if(e<=0)return this;if(e>=1)return this.copy(t);let i=t._x,s=t._y,n=t._z,r=t._w,a=this.dot(t);a<0&&(i=-i,s=-s,n=-n,r=-r,a=-a);let A=1-e;if(a<.9995){const o=Math.acos(a),h=Math.sin(o);A=Math.sin(A*o)/h,e=Math.sin(e*o)/h,this._x=this._x*A+i*e,this._y=this._y*A+s*e,this._z=this._z*A+n*e,this._w=this._w*A+r*e,this._onChangeCallback()}else this._x=this._x*A+i*e,this._y=this._y*A+s*e,this._z=this._z*A+n*e,this._w=this._w*A+r*e,this.normalize();return this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),n=Math.sqrt(i);return this.set(s*Math.sin(t),s*Math.cos(t),n*Math.sin(e),n*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class C{constructor(t=0,e=0,i=0){C.prototype.isVector3=!0,this.x=t,this.y=e,this.z=i}set(t,e,i){return i===void 0&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(Cn.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Cn.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,i=this.y,s=this.z,n=t.elements;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,n=t.elements,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this}applyQuaternion(t){const e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,a=t.z,A=t.w,o=2*(r*s-a*i),h=2*(a*e-n*s),c=2*(n*i-r*e);return this.x=e+A*o+r*c-a*h,this.y=i+A*h+a*o-n*c,this.z=s+A*c+n*h-r*o,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,i=this.y,s=this.z,n=t.elements;return this.x=n[0]*e+n[4]*i+n[8]*s,this.y=n[1]*e+n[5]*i+n[9]*s,this.z=n[2]*e+n[6]*i+n[10]*s,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=M(this.x,t.x,e.x),this.y=M(this.y,t.y,e.y),this.z=M(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=M(this.x,t,e),this.y=M(this.y,t,e),this.z=M(this.z,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(M(i,t,e))}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(t){return this.x*t.x+this.y*t.y+this.z*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const i=t.x,s=t.y,n=t.z,r=e.x,a=e.y,A=e.z;return this.x=s*A-n*a,this.y=n*r-i*A,this.z=i*a-s*r,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return Vi.copy(this).projectOnVector(t),this.sub(Vi)}reflect(t){return this.sub(Vi.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(M(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y,s=this.z-t.z;return e*e+i*i+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){const s=Math.sin(e)*t;return this.x=s*Math.sin(i),this.y=Math.cos(e)*t,this.z=s*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),s=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=s,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,i=Math.sqrt(1-e*e);return this.x=i*Math.cos(t),this.y=e,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Vi=new C,Cn=new vt;class Et{constructor(t,e,i,s,n,r,a,A,o){Et.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,i,s,n,r,a,A,o)}set(t,e,i,s,n,r,a,A,o){const h=this.elements;return h[0]=t,h[1]=s,h[2]=a,h[3]=e,h[4]=n,h[5]=A,h[6]=i,h[7]=r,h[8]=o,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,n=this.elements,r=i[0],a=i[3],A=i[6],o=i[1],h=i[4],c=i[7],d=i[2],u=i[5],g=i[8],p=s[0],b=s[3],f=s[6],m=s[1],B=s[4],I=s[7],E=s[2],Q=s[5],y=s[8];return n[0]=r*p+a*m+A*E,n[3]=r*b+a*B+A*Q,n[6]=r*f+a*I+A*y,n[1]=o*p+h*m+c*E,n[4]=o*b+h*B+c*Q,n[7]=o*f+h*I+c*y,n[2]=d*p+u*m+g*E,n[5]=d*b+u*B+g*Q,n[8]=d*f+u*I+g*y,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],A=t[6],o=t[7],h=t[8];return e*r*h-e*a*o-i*n*h+i*a*A+s*n*o-s*r*A}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],A=t[6],o=t[7],h=t[8],c=h*r-a*o,d=a*A-h*n,u=o*n-r*A,g=e*c+i*d+s*u;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/g;return t[0]=c*p,t[1]=(s*o-h*i)*p,t[2]=(a*i-s*r)*p,t[3]=d*p,t[4]=(h*e-s*A)*p,t[5]=(s*n-a*e)*p,t[6]=u*p,t[7]=(i*A-o*e)*p,t[8]=(r*e-i*n)*p,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,i,s,n,r,a){const A=Math.cos(n),o=Math.sin(n);return this.set(i*A,i*o,-i*(A*r+o*a)+r+t,-s*o,s*A,-s*(-o*r+A*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Ki.makeScale(t,e)),this}rotate(t){return this.premultiply(Ki.makeRotation(-t)),this}translate(t,e){return this.premultiply(Ki.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<9;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const Ki=new Et,En=new Et().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),yn=new Et().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Ja(){const l={enabled:!0,workingColorSpace:$,spaces:{},convert:function(s,n,r){return this.enabled===!1||n===r||!n||!r||(this.spaces[n].transfer===Hi&&(s.r=yt(s.r),s.g=yt(s.g),s.b=yt(s.b)),this.spaces[n].primaries!==this.spaces[r].primaries&&(s.applyMatrix3(this.spaces[n].toXYZ),s.applyMatrix3(this.spaces[r].fromXYZ)),this.spaces[r].transfer===Hi&&(s.r=oe(s.r),s.g=oe(s.g),s.b=oe(s.b))),s},workingToColorSpace:function(s,n){return this.convert(s,this.workingColorSpace,n)},colorSpaceToWorking:function(s,n){return this.convert(s,n,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===$e?pn:this.spaces[s].transfer},getToneMappingMode:function(s){return this.spaces[s].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(s,n=this.workingColorSpace){return s.fromArray(this.spaces[n].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,n,r){return s.copy(this.spaces[n].toXYZ).multiply(this.spaces[r].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,n){return In("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),l.workingToColorSpace(s,n)},toWorkingColorSpace:function(s,n){return In("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),l.colorSpaceToWorking(s,n)}},t=[.64,.33,.3,.6,.15,.06],e=[.2126,.7152,.0722],i=[.3127,.329];return l.define({[$]:{primaries:t,whitePoint:i,transfer:pn,toXYZ:En,fromXYZ:yn,luminanceCoefficients:e,workingColorSpaceConfig:{unpackColorSpace:z},outputColorSpaceConfig:{drawingBufferColorSpace:z}},[z]:{primaries:t,whitePoint:i,transfer:Hi,toXYZ:En,fromXYZ:yn,luminanceCoefficients:e,outputColorSpaceConfig:{drawingBufferColorSpace:z}}}),l}const W=Ja();function yt(l){return l<.04045?l*.0773993808:Math.pow(l*.9478672986+.0521327014,2.4)}function oe(l){return l<.0031308?l*12.92:1.055*Math.pow(l,.41666)-.055}let he;class Va{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let i;if(t instanceof HTMLCanvasElement)i=t;else{he===void 0&&(he=ji("canvas")),he.width=t.width,he.height=t.height;const s=he.getContext("2d");t instanceof ImageData?s.putImageData(t,0,0):s.drawImage(t,0,0,t.width,t.height),i=he}return i.toDataURL(e)}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const e=ji("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);const s=i.getImageData(0,0,t.width,t.height),n=s.data;for(let r=0;r<n.length;r++)n[r]=yt(n[r]/255)*255;return i.putImageData(s,0,0),e}else if(t.data){const e=t.data.slice(0);for(let i=0;i<e.length;i++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[i]=Math.floor(yt(e[i]/255)*255):e[i]=yt(e[i]);return{data:e,width:t.width,height:t.height}}else return L("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let Ka=0;class Ya{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Ka++}),this.uuid=ot(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return typeof HTMLVideoElement<"u"&&e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight,0):typeof VideoFrame<"u"&&e instanceof VideoFrame?t.set(e.displayHeight,e.displayWidth,0):e!==null?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){t===!0&&this.version++}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];const i={uuid:this.uuid,url:""},s=this.data;if(s!==null){let n;if(Array.isArray(s)){n=[];for(let r=0,a=s.length;r<a;r++)s[r].isDataTexture?n.push(Yi(s[r].image)):n.push(Yi(s[r]))}else n=Yi(s);i.url=n}return e||(t.images[this.uuid]=i),i}}function Yi(l){return typeof HTMLImageElement<"u"&&l instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&l instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&l instanceof ImageBitmap?Va.getDataURL(l):l.data?{data:Array.from(l.data),width:l.width,height:l.height,type:l.data.constructor.name}:(L("Texture: Unable to serialize Texture."),{})}let Wa=0;const Wi=new C;class tt extends ti{constructor(t=tt.DEFAULT_IMAGE,e=tt.DEFAULT_MAPPING,i=Yt,s=Yt,n=Nt,r=_e,a=zt,A=k,o=tt.DEFAULT_ANISOTROPY,h=$e){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Wa++}),this.uuid=ot(),this.name="",this.source=new Ya(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=i,this.wrapT=s,this.magFilter=n,this.minFilter=r,this.anisotropy=o,this.format=a,this.internalFormat=null,this.type=A,this.offset=new O(0,0),this.repeat=new O(1,1),this.center=new O(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Et,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Wi).x}get height(){return this.source.getSize(Wi).y}get depth(){return this.source.getSize(Wi).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const i=t[e];if(i===void 0){L(`Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){L(`Texture.setValues(): property '${e}' does not exist.`);continue}s&&i&&s.isVector2&&i.isVector2||s&&i&&s.isVector3&&i.isVector3||s&&i&&s.isMatrix3&&i.isMatrix3?s.copy(i):this[e]=i}}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==en)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case De:t.x=t.x-Math.floor(t.x);break;case Yt:t.x=t.x<0?0:1;break;case Ri:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case De:t.y=t.y-Math.floor(t.y);break;case Yt:t.y=t.y<0?0:1;break;case Ri:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}tt.DEFAULT_IMAGE=null,tt.DEFAULT_MAPPING=en,tt.DEFAULT_ANISOTROPY=1;class Qt{constructor(t=0,e=0,i=0,s=1){Qt.prototype.isVector4=!0,this.x=t,this.y=e,this.z=i,this.w=s}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,s){return this.x=t,this.y=e,this.z=i,this.w=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){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: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,n=this.w,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,i,s,n;const A=t.elements,o=A[0],h=A[4],c=A[8],d=A[1],u=A[5],g=A[9],p=A[2],b=A[6],f=A[10];if(Math.abs(h-d)<.01&&Math.abs(c-p)<.01&&Math.abs(g-b)<.01){if(Math.abs(h+d)<.1&&Math.abs(c+p)<.1&&Math.abs(g+b)<.1&&Math.abs(o+u+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const B=(o+1)/2,I=(u+1)/2,E=(f+1)/2,Q=(h+d)/4,y=(c+p)/4,x=(g+b)/4;return B>I&&B>E?B<.01?(i=0,s=.707106781,n=.707106781):(i=Math.sqrt(B),s=Q/i,n=y/i):I>E?I<.01?(i=.707106781,s=0,n=.707106781):(s=Math.sqrt(I),i=Q/s,n=x/s):E<.01?(i=.707106781,s=.707106781,n=0):(n=Math.sqrt(E),i=y/n,s=x/n),this.set(i,s,n,e),this}let m=Math.sqrt((b-g)*(b-g)+(c-p)*(c-p)+(d-h)*(d-h));return Math.abs(m)<.001&&(m=1),this.x=(b-g)/m,this.y=(c-p)/m,this.z=(d-h)/m,this.w=Math.acos((o+u+f-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=M(this.x,t.x,e.x),this.y=M(this.y,t.y,e.y),this.z=M(this.z,t.z,e.z),this.w=M(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=M(this.x,t,e),this.y=M(this.y,t,e),this.z=M(this.z,t,e),this.w=M(this.w,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(M(i,t,e))}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(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),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 Xa extends tt{constructor(t=null,e=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:i,depth:s},this.magFilter=Gt,this.minFilter=Gt,this.wrapR=Yt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class xt{constructor(t=new C(1/0,1/0,1/0),e=new C(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e+=3)this.expandByPoint(ct.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,i=t.count;e<i;e++)this.expandByPoint(ct.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const i=ct.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const i=t.geometry;if(i!==void 0){const n=i.getAttribute("position");if(e===!0&&n!==void 0&&t.isInstancedMesh!==!0)for(let r=0,a=n.count;r<a;r++)t.isMesh===!0?t.getVertexPosition(r,ct):ct.fromBufferAttribute(n,r),ct.applyMatrix4(t.matrixWorld),this.expandByPoint(ct);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),ei.copy(t.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),ei.copy(i.boundingBox)),ei.applyMatrix4(t.matrixWorld),this.union(ei)}const s=t.children;for(let n=0,r=s.length;n<r;n++)this.expandByObject(s[n],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,ct),ct.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(ze),ii.subVectors(this.max,ze),ce.subVectors(t.a,ze),le.subVectors(t.b,ze),de.subVectors(t.c,ze),Ot.subVectors(le,ce),Ht.subVectors(de,le),Zt.subVectors(ce,de);let e=[0,-Ot.z,Ot.y,0,-Ht.z,Ht.y,0,-Zt.z,Zt.y,Ot.z,0,-Ot.x,Ht.z,0,-Ht.x,Zt.z,0,-Zt.x,-Ot.y,Ot.x,0,-Ht.y,Ht.x,0,-Zt.y,Zt.x,0];return!Xi(e,ce,le,de,ii)||(e=[1,0,0,0,1,0,0,0,1],!Xi(e,ce,le,de,ii))?!1:(si.crossVectors(Ot,Ht),e=[si.x,si.y,si.z],Xi(e,ce,le,de,ii))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ct).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(ct).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(wt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),wt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),wt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),wt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),wt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),wt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),wt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),wt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(wt),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(t){return this.min.fromArray(t.min),this.max.fromArray(t.max),this}}const wt=[new C,new C,new C,new C,new C,new C,new C,new C],ct=new C,ei=new xt,ce=new C,le=new C,de=new C,Ot=new C,Ht=new C,Zt=new C,ze=new C,ii=new C,si=new C,$t=new C;function Xi(l,t,e,i,s){for(let n=0,r=l.length-3;n<=r;n+=3){$t.fromArray(l,n);const a=s.x*Math.abs($t.x)+s.y*Math.abs($t.y)+s.z*Math.abs($t.z),A=t.dot($t),o=e.dot($t),h=i.dot($t);if(Math.max(-Math.max(A,o,h),Math.min(A,o,h))>a)return!1}return!0}const Za=new xt,ve=new C,Zi=new C;class ft{constructor(t=new C,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const i=this.center;e!==void 0?i.copy(e):Za.setFromPoints(t).getCenter(i);let s=0;for(let n=0,r=t.length;n<r;n++)s=Math.max(s,i.distanceToSquared(t[n]));return this.radius=Math.sqrt(s),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const i=this.center.distanceToSquared(t);return e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;ve.subVectors(t,this.center);const e=ve.lengthSq();if(e>this.radius*this.radius){const i=Math.sqrt(e),s=(i-this.radius)*.5;this.center.addScaledVector(ve,s/i),this.radius+=s}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(Zi.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(ve.copy(t.center).add(Zi)),this.expandByPoint(ve.copy(t.center).sub(Zi))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(t){return this.radius=t.radius,this.center.fromArray(t.center),this}}const Mt=new C,$i=new C,ni=new C,qt=new C,ts=new C,ri=new C,es=new C;class ai{constructor(t=new C,e=new C(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Mt)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Mt.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Mt.copy(this.origin).addScaledVector(this.direction,e),Mt.distanceToSquared(t))}distanceSqToSegment(t,e,i,s){$i.copy(t).add(e).multiplyScalar(.5),ni.copy(e).sub(t).normalize(),qt.copy(this.origin).sub($i);const n=t.distanceTo(e)*.5,r=-this.direction.dot(ni),a=qt.dot(this.direction),A=-qt.dot(ni),o=qt.lengthSq(),h=Math.abs(1-r*r);let c,d,u,g;if(h>0)if(c=r*A-a,d=r*a-A,g=n*h,c>=0)if(d>=-g)if(d<=g){const p=1/h;c*=p,d*=p,u=c*(c+r*d+2*a)+d*(r*c+d+2*A)+o}else d=n,c=Math.max(0,-(r*d+a)),u=-c*c+d*(d+2*A)+o;else d=-n,c=Math.max(0,-(r*d+a)),u=-c*c+d*(d+2*A)+o;else d<=-g?(c=Math.max(0,-(-r*n+a)),d=c>0?-n:Math.min(Math.max(-n,-A),n),u=-c*c+d*(d+2*A)+o):d<=g?(c=0,d=Math.min(Math.max(-n,-A),n),u=d*(d+2*A)+o):(c=Math.max(0,-(r*n+a)),d=c>0?n:Math.min(Math.max(-n,-A),n),u=-c*c+d*(d+2*A)+o);else d=r>0?-n:n,c=Math.max(0,-(r*d+a)),u=-c*c+d*(d+2*A)+o;return i&&i.copy(this.origin).addScaledVector(this.direction,c),s&&s.copy($i).addScaledVector(ni,d),u}intersectSphere(t,e){Mt.subVectors(t.center,this.origin);const i=Mt.dot(this.direction),s=Mt.dot(Mt)-i*i,n=t.radius*t.radius;if(s>n)return null;const r=Math.sqrt(n-s),a=i-r,A=i+r;return A<0?null:a<0?this.at(A,e):this.at(a,e)}intersectsSphere(t){return t.radius<0?!1:this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){const i=this.distanceToPlane(t);return i===null?null:this.at(i,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let i,s,n,r,a,A;const o=1/this.direction.x,h=1/this.direction.y,c=1/this.direction.z,d=this.origin;return o>=0?(i=(t.min.x-d.x)*o,s=(t.max.x-d.x)*o):(i=(t.max.x-d.x)*o,s=(t.min.x-d.x)*o),h>=0?(n=(t.min.y-d.y)*h,r=(t.max.y-d.y)*h):(n=(t.max.y-d.y)*h,r=(t.min.y-d.y)*h),i>r||n>s||((n>i||isNaN(i))&&(i=n),(r<s||isNaN(s))&&(s=r),c>=0?(a=(t.min.z-d.z)*c,A=(t.max.z-d.z)*c):(a=(t.max.z-d.z)*c,A=(t.min.z-d.z)*c),i>A||a>s)||((a>i||i!==i)&&(i=a),(A<s||s!==s)&&(s=A),s<0)?null:this.at(i>=0?i:s,e)}intersectsBox(t){return this.intersectBox(t,Mt)!==null}intersectTriangle(t,e,i,s,n){ts.subVectors(e,t),ri.subVectors(i,t),es.crossVectors(ts,ri);let r=this.direction.dot(es),a;if(r>0){if(s)return null;a=1}else if(r<0)a=-1,r=-r;else return null;qt.subVectors(this.origin,t);const A=a*this.direction.dot(ri.crossVectors(qt,ri));if(A<0)return null;const o=a*this.direction.dot(ts.cross(qt));if(o<0||A+o>r)return null;const h=-a*qt.dot(es);return h<0?null:this.at(h/r,n)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class D{constructor(t,e,i,s,n,r,a,A,o,h,c,d,u,g,p,b){D.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,i,s,n,r,a,A,o,h,c,d,u,g,p,b)}set(t,e,i,s,n,r,a,A,o,h,c,d,u,g,p,b){const f=this.elements;return f[0]=t,f[4]=e,f[8]=i,f[12]=s,f[1]=n,f[5]=r,f[9]=a,f[13]=A,f[2]=o,f[6]=h,f[10]=c,f[14]=d,f[3]=u,f[7]=g,f[11]=p,f[15]=b,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 D().fromArray(this.elements)}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){const e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return this.determinant()===0?(t.set(1,0,0),e.set(0,1,0),i.set(0,0,1),this):(t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){if(t.determinant()===0)return this.identity();const e=this.elements,i=t.elements,s=1/ue.setFromMatrixColumn(t,0).length(),n=1/ue.setFromMatrixColumn(t,1).length(),r=1/ue.setFromMatrixColumn(t,2).length();return e[0]=i[0]*s,e[1]=i[1]*s,e[2]=i[2]*s,e[3]=0,e[4]=i[4]*n,e[5]=i[5]*n,e[6]=i[6]*n,e[7]=0,e[8]=i[8]*r,e[9]=i[9]*r,e[10]=i[10]*r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,i=t.x,s=t.y,n=t.z,r=Math.cos(i),a=Math.sin(i),A=Math.cos(s),o=Math.sin(s),h=Math.cos(n),c=Math.sin(n);if(t.order==="XYZ"){const d=r*h,u=r*c,g=a*h,p=a*c;e[0]=A*h,e[4]=-A*c,e[8]=o,e[1]=u+g*o,e[5]=d-p*o,e[9]=-a*A,e[2]=p-d*o,e[6]=g+u*o,e[10]=r*A}else if(t.order==="YXZ"){const d=A*h,u=A*c,g=o*h,p=o*c;e[0]=d+p*a,e[4]=g*a-u,e[8]=r*o,e[1]=r*c,e[5]=r*h,e[9]=-a,e[2]=u*a-g,e[6]=p+d*a,e[10]=r*A}else if(t.order==="ZXY"){const d=A*h,u=A*c,g=o*h,p=o*c;e[0]=d-p*a,e[4]=-r*c,e[8]=g+u*a,e[1]=u+g*a,e[5]=r*h,e[9]=p-d*a,e[2]=-r*o,e[6]=a,e[10]=r*A}else if(t.order==="ZYX"){const d=r*h,u=r*c,g=a*h,p=a*c;e[0]=A*h,e[4]=g*o-u,e[8]=d*o+p,e[1]=A*c,e[5]=p*o+d,e[9]=u*o-g,e[2]=-o,e[6]=a*A,e[10]=r*A}else if(t.order==="YZX"){const d=r*A,u=r*o,g=a*A,p=a*o;e[0]=A*h,e[4]=p-d*c,e[8]=g*c+u,e[1]=c,e[5]=r*h,e[9]=-a*h,e[2]=-o*h,e[6]=u*c+g,e[10]=d-p*c}else if(t.order==="XZY"){const d=r*A,u=r*o,g=a*A,p=a*o;e[0]=A*h,e[4]=-c,e[8]=o*h,e[1]=d*c+p,e[5]=r*h,e[9]=u*c-g,e[2]=g*c-u,e[6]=a*h,e[10]=p*c+d}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose($a,t,tA)}lookAt(t,e,i){const s=this.elements;return et.subVectors(t,e),et.lengthSq()===0&&(et.z=1),et.normalize(),Pt.crossVectors(i,et),Pt.lengthSq()===0&&(Math.abs(i.z)===1?et.x+=1e-4:et.z+=1e-4,et.normalize(),Pt.crossVectors(i,et)),Pt.normalize(),Ai.crossVectors(et,Pt),s[0]=Pt.x,s[4]=Ai.x,s[8]=et.x,s[1]=Pt.y,s[5]=Ai.y,s[9]=et.y,s[2]=Pt.z,s[6]=Ai.z,s[10]=et.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,n=this.elements,r=i[0],a=i[4],A=i[8],o=i[12],h=i[1],c=i[5],d=i[9],u=i[13],g=i[2],p=i[6],b=i[10],f=i[14],m=i[3],B=i[7],I=i[11],E=i[15],Q=s[0],y=s[4],x=s[8],F=s[12],w=s[1],_=s[5],J=s[9],G=s[13],V=s[2],It=s[6],nt=s[10],Rt=s[14],Bt=s[3],Ct=s[7],Lt=s[11],N=s[15];return n[0]=r*Q+a*w+A*V+o*Bt,n[4]=r*y+a*_+A*It+o*Ct,n[8]=r*x+a*J+A*nt+o*Lt,n[12]=r*F+a*G+A*Rt+o*N,n[1]=h*Q+c*w+d*V+u*Bt,n[5]=h*y+c*_+d*It+u*Ct,n[9]=h*x+c*J+d*nt+u*Lt,n[13]=h*F+c*G+d*Rt+u*N,n[2]=g*Q+p*w+b*V+f*Bt,n[6]=g*y+p*_+b*It+f*Ct,n[10]=g*x+p*J+b*nt+f*Lt,n[14]=g*F+p*G+b*Rt+f*N,n[3]=m*Q+B*w+I*V+E*Bt,n[7]=m*y+B*_+I*It+E*Ct,n[11]=m*x+B*J+I*nt+E*Lt,n[15]=m*F+B*G+I*Rt+E*N,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[4],s=t[8],n=t[12],r=t[1],a=t[5],A=t[9],o=t[13],h=t[2],c=t[6],d=t[10],u=t[14],g=t[3],p=t[7],b=t[11],f=t[15],m=A*u-o*d,B=a*u-o*c,I=a*d-A*c,E=r*u-o*h,Q=r*d-A*h,y=r*c-a*h;return e*(p*m-b*B+f*I)-i*(g*m-b*E+f*Q)+s*(g*B-p*E+f*y)-n*(g*I-p*Q+b*y)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,i){const s=this.elements;return t.isVector3?(s[12]=t.x,s[13]=t.y,s[14]=t.z):(s[12]=t,s[13]=e,s[14]=i),this}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],n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t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,s))}makeTranslation(t,e,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,a=t.y,A=t.z,o=n*r,h=n*a;return this.set(o*r+i,o*a-s*A,o*A+s*a,0,o*a+s*A,h*a+i,h*A-s*r,0,o*A-s*a,h*A+s*r,n*A*A+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,s,n,r){return this.set(1,i,n,0,t,1,r,0,e,s,1,0,0,0,0,1),this}compose(t,e,i){const s=this.elements,n=e._x,r=e._y,a=e._z,A=e._w,o=n+n,h=r+r,c=a+a,d=n*o,u=n*h,g=n*c,p=r*h,b=r*c,f=a*c,m=A*o,B=A*h,I=A*c,E=i.x,Q=i.y,y=i.z;return s[0]=(1-(p+f))*E,s[1]=(u+I)*E,s[2]=(g-B)*E,s[3]=0,s[4]=(u-I)*Q,s[5]=(1-(d+f))*Q,s[6]=(b+m)*Q,s[7]=0,s[8]=(g+B)*y,s[9]=(b-m)*y,s[10]=(1-(d+p))*y,s[11]=0,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=1,this}decompose(t,e,i){const s=this.elements;if(t.x=s[12],t.y=s[13],t.z=s[14],this.determinant()===0)return i.set(1,1,1),e.identity(),this;let n=ue.set(s[0],s[1],s[2]).length();const r=ue.set(s[4],s[5],s[6]).length(),a=ue.set(s[8],s[9],s[10]).length();this.determinant()<0&&(n=-n),lt.copy(this);const o=1/n,h=1/r,c=1/a;return lt.elements[0]*=o,lt.elements[1]*=o,lt.elements[2]*=o,lt.elements[4]*=h,lt.elements[5]*=h,lt.elements[6]*=h,lt.elements[8]*=c,lt.elements[9]*=c,lt.elements[10]*=c,e.setFromRotationMatrix(lt),i.x=n,i.y=r,i.z=a,this}makePerspective(t,e,i,s,n,r,a=Xt,A=!1){const o=this.elements,h=2*n/(e-t),c=2*n/(i-s),d=(e+t)/(e-t),u=(i+s)/(i-s);let g,p;if(A)g=n/(r-n),p=r*n/(r-n);else if(a===Xt)g=-(r+n)/(r-n),p=-2*r*n/(r-n);else if(a===Pi)g=-r/(r-n),p=-r*n/(r-n);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return o[0]=h,o[4]=0,o[8]=d,o[12]=0,o[1]=0,o[5]=c,o[9]=u,o[13]=0,o[2]=0,o[6]=0,o[10]=g,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,i,s,n,r,a=Xt,A=!1){const o=this.elements,h=2/(e-t),c=2/(i-s),d=-(e+t)/(e-t),u=-(i+s)/(i-s);let g,p;if(A)g=1/(r-n),p=r/(r-n);else if(a===Xt)g=-2/(r-n),p=-(r+n)/(r-n);else if(a===Pi)g=-1/(r-n),p=-n/(r-n);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return o[0]=h,o[4]=0,o[8]=0,o[12]=d,o[1]=0,o[5]=c,o[9]=0,o[13]=u,o[2]=0,o[6]=0,o[10]=g,o[14]=p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<16;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}const ue=new C,lt=new D,$a=new C(0,0,0),tA=new C(1,1,1),Pt=new C,Ai=new C,et=new C,Qn=new D,xn=new vt;class ge{constructor(t=0,e=0,i=0,s=ge.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=i,this._order=s}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,s=this._order){return this._x=t,this._y=e,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){const s=t.elements,n=s[0],r=s[4],a=s[8],A=s[1],o=s[5],h=s[9],c=s[2],d=s[6],u=s[10];switch(e){case"XYZ":this._y=Math.asin(M(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,u),this._z=Math.atan2(-r,n)):(this._x=Math.atan2(d,o),this._z=0);break;case"YXZ":this._x=Math.asin(-M(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,u),this._z=Math.atan2(A,o)):(this._y=Math.atan2(-c,n),this._z=0);break;case"ZXY":this._x=Math.asin(M(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-c,u),this._z=Math.atan2(-r,o)):(this._y=0,this._z=Math.atan2(A,n));break;case"ZYX":this._y=Math.asin(-M(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(d,u),this._z=Math.atan2(A,n)):(this._x=0,this._z=Math.atan2(-r,o));break;case"YZX":this._z=Math.asin(M(A,-1,1)),Math.abs(A)<.9999999?(this._x=Math.atan2(-h,o),this._y=Math.atan2(-c,n)):(this._x=0,this._y=Math.atan2(a,u));break;case"XZY":this._z=Math.asin(-M(r,-1,1)),Math.abs(r)<.9999999?(this._x=Math.atan2(d,o),this._y=Math.atan2(a,n)):(this._x=Math.atan2(-h,u),this._y=0);break;default:L("Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,i===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return Qn.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Qn,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return xn.setFromEuler(this),this.setFromQuaternion(xn,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}ge.DEFAULT_ORDER="XYZ";class eA{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}}let iA=0;const wn=new C,pe=new vt,St=new D,oi=new C,Oe=new C,sA=new C,nA=new vt,Mn=new C(1,0,0),Sn=new C(0,1,0),Fn=new C(0,0,1),kn={type:"added"},rA={type:"removed"},fe={type:"childadded",child:null},is={type:"childremoved",child:null};class v extends ti{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:iA++}),this.uuid=ot(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=v.DEFAULT_UP.clone();const t=new C,e=new ge,i=new vt,s=new C(1,1,1);function n(){i.setFromEuler(e,!1)}function r(){e.setFromQuaternion(i,void 0,!1)}e._onChange(n),i._onChange(r),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new D},normalMatrix:{value:new Et}}),this.matrix=new D,this.matrixWorld=new D,this.matrixAutoUpdate=v.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=v.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new eA,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return pe.setFromAxisAngle(t,e),this.quaternion.multiply(pe),this}rotateOnWorldAxis(t,e){return pe.setFromAxisAngle(t,e),this.quaternion.premultiply(pe),this}rotateX(t){return this.rotateOnAxis(Mn,t)}rotateY(t){return this.rotateOnAxis(Sn,t)}rotateZ(t){return this.rotateOnAxis(Fn,t)}translateOnAxis(t,e){return wn.copy(t).applyQuaternion(this.quaternion),this.position.add(wn.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(Mn,t)}translateY(t){return this.translateOnAxis(Sn,t)}translateZ(t){return this.translateOnAxis(Fn,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(St.copy(this.matrixWorld).invert())}lookAt(t,e,i){t.isVector3?oi.copy(t):oi.set(t,e,i);const s=this.parent;this.updateWorldMatrix(!0,!1),Oe.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?St.lookAt(Oe,oi,this.up):St.lookAt(oi,Oe,this.up),this.quaternion.setFromRotationMatrix(St),s&&(St.extractRotation(s.matrixWorld),pe.setFromRotationMatrix(St),this.quaternion.premultiply(pe.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(U("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(kn),fe.child=t,this.dispatchEvent(fe),fe.child=null):U("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(rA),is.child=t,this.dispatchEvent(is),is.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),St.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),St.multiply(t.parent.matrixWorld)),t.applyMatrix4(St),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(kn),fe.child=t,this.dispatchEvent(fe),fe.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let i=0,s=this.children.length;i<s;i++){const r=this.children[i].getObjectByProperty(t,e);if(r!==void 0)return r}}getObjectsByProperty(t,e,i=[]){this[t]===e&&i.push(this);const s=this.children;for(let n=0,r=s.length;n<r;n++)s[n].getObjectsByProperty(t,e,i);return i}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Oe,t,sA),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Oe,nA,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].updateMatrixWorld(t)}updateWorldMatrix(t,e){const i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),e===!0){const s=this.children;for(let n=0,r=s.length;n<r;n++)s[n].updateWorldMatrix(!1,!0)}}toJSON(t){const e=t===void 0||typeof t=="string",i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const s={};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(a=>({...a})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(t),s.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function n(a,A){return a[A.uuid]===void 0&&(a[A.uuid]=A.toJSON(t)),A.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=n(t.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const A=a.shapes;if(Array.isArray(A))for(let o=0,h=A.length;o<h;o++){const c=A[o];n(t.shapes,c)}else n(t.shapes,A)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(n(t.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let A=0,o=this.material.length;A<o;A++)a.push(n(t.materials,this.material[A]));s.material=a}else s.material=n(t.materials,this.material);if(this.children.length>0){s.children=[];for(let a=0;a<this.children.length;a++)s.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){s.animations=[];for(let a=0;a<this.animations.length;a++){const A=this.animations[a];s.animations.push(n(t.animations,A))}}if(e){const a=r(t.geometries),A=r(t.materials),o=r(t.textures),h=r(t.images),c=r(t.shapes),d=r(t.skeletons),u=r(t.animations),g=r(t.nodes);a.length>0&&(i.geometries=a),A.length>0&&(i.materials=A),o.length>0&&(i.textures=o),h.length>0&&(i.images=h),c.length>0&&(i.shapes=c),d.length>0&&(i.skeletons=d),u.length>0&&(i.animations=u),g.length>0&&(i.nodes=g)}return i.object=s,i;function r(a){const A=[];for(const o in a){const h=a[o];delete h.metadata,A.push(h)}return A}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let i=0;i<t.children.length;i++){const s=t.children[i];this.add(s.clone())}return this}}v.DEFAULT_UP=new C(0,1,0),v.DEFAULT_MATRIX_AUTO_UPDATE=!0,v.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const dt=new C,Ft=new C,ss=new C,kt=new C,be=new C,me=new C,Dn=new C,ns=new C,rs=new C,as=new C,As=new Qt,os=new Qt,hs=new Qt;class ut{constructor(t=new C,e=new C,i=new C){this.a=t,this.b=e,this.c=i}static getNormal(t,e,i,s){s.subVectors(i,e),dt.subVectors(t,e),s.cross(dt);const n=s.lengthSq();return n>0?s.multiplyScalar(1/Math.sqrt(n)):s.set(0,0,0)}static getBarycoord(t,e,i,s,n){dt.subVectors(s,e),Ft.subVectors(i,e),ss.subVectors(t,e);const r=dt.dot(dt),a=dt.dot(Ft),A=dt.dot(ss),o=Ft.dot(Ft),h=Ft.dot(ss),c=r*o-a*a;if(c===0)return n.set(0,0,0),null;const d=1/c,u=(o*A-a*h)*d,g=(r*h-a*A)*d;return n.set(1-u-g,g,u)}static containsPoint(t,e,i,s){return this.getBarycoord(t,e,i,s,kt)===null?!1:kt.x>=0&&kt.y>=0&&kt.x+kt.y<=1}static getInterpolation(t,e,i,s,n,r,a,A){return this.getBarycoord(t,e,i,s,kt)===null?(A.x=0,A.y=0,"z"in A&&(A.z=0),"w"in A&&(A.w=0),null):(A.setScalar(0),A.addScaledVector(n,kt.x),A.addScaledVector(r,kt.y),A.addScaledVector(a,kt.z),A)}static getInterpolatedAttribute(t,e,i,s,n,r){return As.setScalar(0),os.setScalar(0),hs.setScalar(0),As.fromBufferAttribute(t,e),os.fromBufferAttribute(t,i),hs.fromBufferAttribute(t,s),r.setScalar(0),r.addScaledVector(As,n.x),r.addScaledVector(os,n.y),r.addScaledVector(hs,n.z),r}static isFrontFacing(t,e,i,s){return dt.subVectors(i,e),Ft.subVectors(t,e),dt.cross(Ft).dot(s)<0}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,s){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[s]),this}setFromAttributeAndIndices(t,e,i,s){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,s),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return dt.subVectors(this.c,this.b),Ft.subVectors(this.a,this.b),dt.cross(Ft).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return ut.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return ut.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,i,s,n){return ut.getInterpolation(t,this.a,this.b,this.c,e,i,s,n)}containsPoint(t){return ut.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return ut.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const i=this.a,s=this.b,n=this.c;let r,a;be.subVectors(s,i),me.subVectors(n,i),ns.subVectors(t,i);const A=be.dot(ns),o=me.dot(ns);if(A<=0&&o<=0)return e.copy(i);rs.subVectors(t,s);const h=be.dot(rs),c=me.dot(rs);if(h>=0&&c<=h)return e.copy(s);const d=A*c-h*o;if(d<=0&&A>=0&&h<=0)return r=A/(A-h),e.copy(i).addScaledVector(be,r);as.subVectors(t,n);const u=be.dot(as),g=me.dot(as);if(g>=0&&u<=g)return e.copy(n);const p=u*o-A*g;if(p<=0&&o>=0&&g<=0)return a=o/(o-g),e.copy(i).addScaledVector(me,a);const b=h*g-u*c;if(b<=0&&c-h>=0&&u-g>=0)return Dn.subVectors(n,s),a=(c-h)/(c-h+(u-g)),e.copy(s).addScaledVector(Dn,a);const f=1/(b+p+d);return r=p*f,a=d*f,e.copy(i).addScaledVector(be,r).addScaledVector(me,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const _n={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},jt={h:0,s:0,l:0},hi={h:0,s:0,l:0};function cs(l,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?l+(t-l)*6*e:e<1/2?t:e<2/3?l+(t-l)*6*(2/3-e):l}class H{constructor(t,e,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,i)}set(t,e,i){if(e===void 0&&i===void 0){const s=t;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(t,e,i);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=z){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,W.colorSpaceToWorking(this,e),this}setRGB(t,e,i,s=W.workingColorSpace){return this.r=t,this.g=e,this.b=i,W.colorSpaceToWorking(this,s),this}setHSL(t,e,i,s=W.workingColorSpace){if(t=Ji(t,1),e=M(e,0,1),i=M(i,0,1),e===0)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+e):i+e-i*e,r=2*i-n;this.r=cs(r,n,t+1/3),this.g=cs(r,n,t),this.b=cs(r,n,t-1/3)}return W.colorSpaceToWorking(this,s),this}setStyle(t,e=z){function i(n){n!==void 0&&parseFloat(n)<1&&L("Color: Alpha component of "+t+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(t)){let n;const r=s[1],a=s[2];switch(r){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(n[4]),this.setRGB(Math.min(255,parseInt(n[1],10))/255,Math.min(255,parseInt(n[2],10))/255,Math.min(255,parseInt(n[3],10))/255,e);if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(n[4]),this.setRGB(Math.min(100,parseInt(n[1],10))/100,Math.min(100,parseInt(n[2],10))/100,Math.min(100,parseInt(n[3],10))/100,e);break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(n[4]),this.setHSL(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,e);break;default:L("Color: Unknown color model "+t)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=s[1],r=n.length;if(r===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,e);if(r===6)return this.setHex(parseInt(n,16),e);L("Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=z){const i=_n[t.toLowerCase()];return i!==void 0?this.setHex(i,e):L("Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=yt(t.r),this.g=yt(t.g),this.b=yt(t.b),this}copyLinearToSRGB(t){return this.r=oe(t.r),this.g=oe(t.g),this.b=oe(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=z){return W.workingToColorSpace(Y.copy(this),t),Math.round(M(Y.r*255,0,255))*65536+Math.round(M(Y.g*255,0,255))*256+Math.round(M(Y.b*255,0,255))}getHexString(t=z){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=W.workingColorSpace){W.workingToColorSpace(Y.copy(this),e);const i=Y.r,s=Y.g,n=Y.b,r=Math.max(i,s,n),a=Math.min(i,s,n);let A,o;const h=(a+r)/2;if(a===r)A=0,o=0;else{const c=r-a;switch(o=h<=.5?c/(r+a):c/(2-r-a),r){case i:A=(s-n)/c+(s<n?6:0);break;case s:A=(n-i)/c+2;break;case n:A=(i-s)/c+4;break}A/=6}return t.h=A,t.s=o,t.l=h,t}getRGB(t,e=W.workingColorSpace){return W.workingToColorSpace(Y.copy(this),e),t.r=Y.r,t.g=Y.g,t.b=Y.b,t}getStyle(t=z){W.workingToColorSpace(Y.copy(this),t);const e=Y.r,i=Y.g,s=Y.b;return t!==z?`color(${t} ${e.toFixed(3)} ${i.toFixed(3)} ${s.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(i*255)},${Math.round(s*255)})`}offsetHSL(t,e,i){return this.getHSL(jt),this.setHSL(jt.h+t,jt.s+e,jt.l+i)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,i){return this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}lerpHSL(t,e){this.getHSL(jt),t.getHSL(hi);const i=Ue(jt.h,hi.h,e),s=Ue(jt.s,hi.s,e),n=Ue(jt.l,hi.l,e);return this.setHSL(i,s,n),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,i=this.g,s=this.b,n=t.elements;return this.r=n[0]*e+n[3]*i+n[6]*s,this.g=n[1]*e+n[4]*i+n[7]*s,this.b=n[2]*e+n[5]*i+n[8]*s,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Y=new H;H.NAMES=_n;let aA=0;class te extends ti{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:aA++}),this.uuid=ot(),this.name="",this.type="Material",this.blending=Ys,this.side=Xe,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Xs,this.blendDst=Zs,this.blendEquation=Ws,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new H(0,0,0),this.blendAlpha=0,this.depthFunc=$s,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=fn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ae,this.stencilZFail=Ae,this.stencilZPass=Ae,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const e in t){const i=t[e];if(i===void 0){L(`Material: parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){L(`Material: '${e}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[e]=i}}toJSON(t){const e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(t).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(t).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Ys&&(i.blending=this.blending),this.side!==Xe&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Xs&&(i.blendSrc=this.blendSrc),this.blendDst!==Zs&&(i.blendDst=this.blendDst),this.blendEquation!==Ws&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==$s&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==fn&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ae&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Ae&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Ae&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.allowOverride===!1&&(i.allowOverride=!1),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(n){const r=[];for(const a in n){const A=n[a];delete A.metadata,r.push(A)}return r}if(e){const n=s(t.textures),r=s(t.images);n.length>0&&(i.textures=n),r.length>0&&(i.images=r)}return i}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let i=null;if(e!==null){const s=e.length;i=new Array(s);for(let n=0;n!==s;++n)i[n]=e[n].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.allowOverride=t.allowOverride,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}class Ie extends te{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new H(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ge,this.combine=Aa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const q=new C,ci=new O;let AA=0;class it{constructor(t,e,i=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:AA++}),this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=i,this.usage=qi,this.updateRanges=[],this.gpuType=Ut,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,i){t*=this.itemSize,i*=e.itemSize;for(let s=0,n=this.itemSize;s<n;s++)this.array[t+s]=e.array[i+s];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,i=this.count;e<i;e++)ci.fromBufferAttribute(this,e),ci.applyMatrix3(t),this.setXY(e,ci.x,ci.y);else if(this.itemSize===3)for(let e=0,i=this.count;e<i;e++)q.fromBufferAttribute(this,e),q.applyMatrix3(t),this.setXYZ(e,q.x,q.y,q.z);return this}applyMatrix4(t){for(let e=0,i=this.count;e<i;e++)q.fromBufferAttribute(this,e),q.applyMatrix4(t),this.setXYZ(e,q.x,q.y,q.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)q.fromBufferAttribute(this,e),q.applyNormalMatrix(t),this.setXYZ(e,q.x,q.y,q.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)q.fromBufferAttribute(this,e),q.transformDirection(t),this.setXYZ(e,q.x,q.y,q.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let i=this.array[t*this.itemSize+e];return this.normalized&&(i=ht(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=T(i,this.array)),this.array[t*this.itemSize+e]=i,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=ht(e,this.array)),e}setX(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=ht(e,this.array)),e}setY(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=ht(e,this.array)),e}setZ(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=ht(e,this.array)),e}setW(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,i){return t*=this.itemSize,this.normalized&&(e=T(e,this.array),i=T(i,this.array)),this.array[t+0]=e,this.array[t+1]=i,this}setXYZ(t,e,i,s){return t*=this.itemSize,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this}setXYZW(t,e,i,s,n){return t*=this.itemSize,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array),n=T(n,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this.array[t+3]=n,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==qi&&(t.usage=this.usage),t}}class oA extends it{constructor(t,e,i){super(new Uint16Array(t),e,i)}}class hA extends it{constructor(t,e,i){super(new Uint32Array(t),e,i)}}class ls extends it{constructor(t,e,i){super(new Float32Array(t),e,i)}}let cA=0;const rt=new D,ds=new v,Be=new C,st=new xt,He=new xt,j=new C;class ee extends ti{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:cA++}),this.uuid=ot(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(Ma(t)?hA:oA)(t,1):this.index=t,this}setIndirect(t,e=0){return this.indirect=t,this.indirectOffset=e,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,i=0){this.groups.push({start:t,count:e,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const n=new Et().getNormalMatrix(t);i.applyNormalMatrix(n),i.needsUpdate=!0}const s=this.attributes.tangent;return s!==void 0&&(s.transformDirection(t),s.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return rt.makeRotationFromQuaternion(t),this.applyMatrix4(rt),this}rotateX(t){return rt.makeRotationX(t),this.applyMatrix4(rt),this}rotateY(t){return rt.makeRotationY(t),this.applyMatrix4(rt),this}rotateZ(t){return rt.makeRotationZ(t),this.applyMatrix4(rt),this}translate(t,e,i){return rt.makeTranslation(t,e,i),this.applyMatrix4(rt),this}scale(t,e,i){return rt.makeScale(t,e,i),this.applyMatrix4(rt),this}lookAt(t){return ds.lookAt(t),ds.updateMatrix(),this.applyMatrix4(ds.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Be).negate(),this.translate(Be.x,Be.y,Be.z),this}setFromPoints(t){const e=this.getAttribute("position");if(e===void 0){const i=[];for(let s=0,n=t.length;s<n;s++){const r=t[s];i.push(r.x,r.y,r.z||0)}this.setAttribute("position",new ls(i,3))}else{const i=Math.min(t.length,e.count);for(let s=0;s<i;s++){const n=t[s];e.setXYZ(s,n.x,n.y,n.z||0)}t.length>e.count&&L("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new xt);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){U("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new C(-1/0,-1/0,-1/0),new C(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let i=0,s=e.length;i<s;i++){const n=e[i];st.setFromBufferAttribute(n),this.morphTargetsRelative?(j.addVectors(this.boundingBox.min,st.min),this.boundingBox.expandByPoint(j),j.addVectors(this.boundingBox.max,st.max),this.boundingBox.expandByPoint(j)):(this.boundingBox.expandByPoint(st.min),this.boundingBox.expandByPoint(st.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&U('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new ft);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){U("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new C,1/0);return}if(t){const i=this.boundingSphere.center;if(st.setFromBufferAttribute(t),e)for(let n=0,r=e.length;n<r;n++){const a=e[n];He.setFromBufferAttribute(a),this.morphTargetsRelative?(j.addVectors(st.min,He.min),st.expandByPoint(j),j.addVectors(st.max,He.max),st.expandByPoint(j)):(st.expandByPoint(He.min),st.expandByPoint(He.max))}st.getCenter(i);let s=0;for(let n=0,r=t.count;n<r;n++)j.fromBufferAttribute(t,n),s=Math.max(s,i.distanceToSquared(j));if(e)for(let n=0,r=e.length;n<r;n++){const a=e[n],A=this.morphTargetsRelative;for(let o=0,h=a.count;o<h;o++)j.fromBufferAttribute(a,o),A&&(Be.fromBufferAttribute(t,o),j.add(Be)),s=Math.max(s,i.distanceToSquared(j))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&U('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){U("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=e.position,s=e.normal,n=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new it(new Float32Array(4*i.count),4));const r=this.getAttribute("tangent"),a=[],A=[];for(let x=0;x<i.count;x++)a[x]=new C,A[x]=new C;const o=new C,h=new C,c=new C,d=new O,u=new O,g=new O,p=new C,b=new C;function f(x,F,w){o.fromBufferAttribute(i,x),h.fromBufferAttribute(i,F),c.fromBufferAttribute(i,w),d.fromBufferAttribute(n,x),u.fromBufferAttribute(n,F),g.fromBufferAttribute(n,w),h.sub(o),c.sub(o),u.sub(d),g.sub(d);const _=1/(u.x*g.y-g.x*u.y);isFinite(_)&&(p.copy(h).multiplyScalar(g.y).addScaledVector(c,-u.y).multiplyScalar(_),b.copy(c).multiplyScalar(u.x).addScaledVector(h,-g.x).multiplyScalar(_),a[x].add(p),a[F].add(p),a[w].add(p),A[x].add(b),A[F].add(b),A[w].add(b))}let m=this.groups;m.length===0&&(m=[{start:0,count:t.count}]);for(let x=0,F=m.length;x<F;++x){const w=m[x],_=w.start,J=w.count;for(let G=_,V=_+J;G<V;G+=3)f(t.getX(G+0),t.getX(G+1),t.getX(G+2))}const B=new C,I=new C,E=new C,Q=new C;function y(x){E.fromBufferAttribute(s,x),Q.copy(E);const F=a[x];B.copy(F),B.sub(E.multiplyScalar(E.dot(F))).normalize(),I.crossVectors(Q,F);const _=I.dot(A[x])<0?-1:1;r.setXYZW(x,B.x,B.y,B.z,_)}for(let x=0,F=m.length;x<F;++x){const w=m[x],_=w.start,J=w.count;for(let G=_,V=_+J;G<V;G+=3)y(t.getX(G+0)),y(t.getX(G+1)),y(t.getX(G+2))}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(e!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new it(new Float32Array(e.count*3),3),this.setAttribute("normal",i);else for(let d=0,u=i.count;d<u;d++)i.setXYZ(d,0,0,0);const s=new C,n=new C,r=new C,a=new C,A=new C,o=new C,h=new C,c=new C;if(t)for(let d=0,u=t.count;d<u;d+=3){const g=t.getX(d+0),p=t.getX(d+1),b=t.getX(d+2);s.fromBufferAttribute(e,g),n.fromBufferAttribute(e,p),r.fromBufferAttribute(e,b),h.subVectors(r,n),c.subVectors(s,n),h.cross(c),a.fromBufferAttribute(i,g),A.fromBufferAttribute(i,p),o.fromBufferAttribute(i,b),a.add(h),A.add(h),o.add(h),i.setXYZ(g,a.x,a.y,a.z),i.setXYZ(p,A.x,A.y,A.z),i.setXYZ(b,o.x,o.y,o.z)}else for(let d=0,u=e.count;d<u;d+=3)s.fromBufferAttribute(e,d+0),n.fromBufferAttribute(e,d+1),r.fromBufferAttribute(e,d+2),h.subVectors(r,n),c.subVectors(s,n),h.cross(c),i.setXYZ(d+0,h.x,h.y,h.z),i.setXYZ(d+1,h.x,h.y,h.z),i.setXYZ(d+2,h.x,h.y,h.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,i=t.count;e<i;e++)j.fromBufferAttribute(t,e),j.normalize(),t.setXYZ(e,j.x,j.y,j.z)}toNonIndexed(){function t(a,A){const o=a.array,h=a.itemSize,c=a.normalized,d=new o.constructor(A.length*h);let u=0,g=0;for(let p=0,b=A.length;p<b;p++){a.isInterleavedBufferAttribute?u=A[p]*a.data.stride+a.offset:u=A[p]*h;for(let f=0;f<h;f++)d[g++]=o[u++]}return new it(d,h,c)}if(this.index===null)return L("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new ee,i=this.index.array,s=this.attributes;for(const a in s){const A=s[a],o=t(A,i);e.setAttribute(a,o)}const n=this.morphAttributes;for(const a in n){const A=[],o=n[a];for(let h=0,c=o.length;h<c;h++){const d=o[h],u=t(d,i);A.push(u)}e.morphAttributes[a]=A}e.morphTargetsRelative=this.morphTargetsRelative;const r=this.groups;for(let a=0,A=r.length;a<A;a++){const o=r[a];e.addGroup(o.start,o.count,o.materialIndex)}return e}toJSON(){const t={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){const A=this.parameters;for(const o in A)A[o]!==void 0&&(t[o]=A[o]);return t}t.data={attributes:{}};const e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const i=this.attributes;for(const A in i){const o=i[A];t.data.attributes[A]=o.toJSON(t.data)}const s={};let n=!1;for(const A in this.morphAttributes){const o=this.morphAttributes[A],h=[];for(let c=0,d=o.length;c<d;c++){const u=o[c];h.push(u.toJSON(t.data))}h.length>0&&(s[A]=h,n=!0)}n&&(t.data.morphAttributes=s,t.data.morphTargetsRelative=this.morphTargetsRelative);const r=this.groups;r.length>0&&(t.data.groups=JSON.parse(JSON.stringify(r)));const a=this.boundingSphere;return a!==null&&(t.data.boundingSphere=a.toJSON()),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const i=t.index;i!==null&&this.setIndex(i.clone());const s=t.attributes;for(const o in s){const h=s[o];this.setAttribute(o,h.clone(e))}const n=t.morphAttributes;for(const o in n){const h=[],c=n[o];for(let d=0,u=c.length;d<u;d++)h.push(c[d].clone(e));this.morphAttributes[o]=h}this.morphTargetsRelative=t.morphTargetsRelative;const r=t.groups;for(let o=0,h=r.length;o<h;o++){const c=r[o];this.addGroup(c.start,c.count,c.materialIndex)}const a=t.boundingBox;a!==null&&(this.boundingBox=a.clone());const A=t.boundingSphere;return A!==null&&(this.boundingSphere=A.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Tn=new D,ie=new ai,li=new ft,Rn=new C,di=new C,ui=new C,gi=new C,us=new C,pi=new C,Ln=new C,fi=new C;class bi extends v{constructor(t=new ee,e=new Ie){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const a=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=n}}}}getVertexPosition(t,e){const i=this.geometry,s=i.attributes.position,n=i.morphAttributes.position,r=i.morphTargetsRelative;e.fromBufferAttribute(s,t);const a=this.morphTargetInfluences;if(n&&a){pi.set(0,0,0);for(let A=0,o=n.length;A<o;A++){const h=a[A],c=n[A];h!==0&&(us.fromBufferAttribute(c,t),r?pi.addScaledVector(us,h):pi.addScaledVector(us.sub(e),h))}e.add(pi)}return e}raycast(t,e){const i=this.geometry,s=this.material,n=this.matrixWorld;s!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),li.copy(i.boundingSphere),li.applyMatrix4(n),ie.copy(t.ray).recast(t.near),!(li.containsPoint(ie.origin)===!1&&(ie.intersectSphere(li,Rn)===null||ie.origin.distanceToSquared(Rn)>(t.far-t.near)**2))&&(Tn.copy(n).invert(),ie.copy(t.ray).applyMatrix4(Tn),!(i.boundingBox!==null&&ie.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(t,e,ie)))}_computeIntersections(t,e,i){let s;const n=this.geometry,r=this.material,a=n.index,A=n.attributes.position,o=n.attributes.uv,h=n.attributes.uv1,c=n.attributes.normal,d=n.groups,u=n.drawRange;if(a!==null)if(Array.isArray(r))for(let g=0,p=d.length;g<p;g++){const b=d[g],f=r[b.materialIndex],m=Math.max(b.start,u.start),B=Math.min(a.count,Math.min(b.start+b.count,u.start+u.count));for(let I=m,E=B;I<E;I+=3){const Q=a.getX(I),y=a.getX(I+1),x=a.getX(I+2);s=mi(this,f,t,i,o,h,c,Q,y,x),s&&(s.faceIndex=Math.floor(I/3),s.face.materialIndex=b.materialIndex,e.push(s))}}else{const g=Math.max(0,u.start),p=Math.min(a.count,u.start+u.count);for(let b=g,f=p;b<f;b+=3){const m=a.getX(b),B=a.getX(b+1),I=a.getX(b+2);s=mi(this,r,t,i,o,h,c,m,B,I),s&&(s.faceIndex=Math.floor(b/3),e.push(s))}}else if(A!==void 0)if(Array.isArray(r))for(let g=0,p=d.length;g<p;g++){const b=d[g],f=r[b.materialIndex],m=Math.max(b.start,u.start),B=Math.min(A.count,Math.min(b.start+b.count,u.start+u.count));for(let I=m,E=B;I<E;I+=3){const Q=I,y=I+1,x=I+2;s=mi(this,f,t,i,o,h,c,Q,y,x),s&&(s.faceIndex=Math.floor(I/3),s.face.materialIndex=b.materialIndex,e.push(s))}}else{const g=Math.max(0,u.start),p=Math.min(A.count,u.start+u.count);for(let b=g,f=p;b<f;b+=3){const m=b,B=b+1,I=b+2;s=mi(this,r,t,i,o,h,c,m,B,I),s&&(s.faceIndex=Math.floor(b/3),e.push(s))}}}}function lA(l,t,e,i,s,n,r,a){let A;if(t.side===ra?A=i.intersectTriangle(r,n,s,!0,a):A=i.intersectTriangle(s,n,r,t.side===Xe,a),A===null)return null;fi.copy(a),fi.applyMatrix4(l.matrixWorld);const o=e.ray.origin.distanceTo(fi);return o<e.near||o>e.far?null:{distance:o,point:fi.clone(),object:l}}function mi(l,t,e,i,s,n,r,a,A,o){l.getVertexPosition(a,di),l.getVertexPosition(A,ui),l.getVertexPosition(o,gi);const h=lA(l,t,e,i,di,ui,gi,Ln);if(h){const c=new C;ut.getBarycoord(Ln,di,ui,gi,c),s&&(h.uv=ut.getInterpolatedAttribute(s,a,A,o,c,new O)),n&&(h.uv1=ut.getInterpolatedAttribute(n,a,A,o,c,new O)),r&&(h.normal=ut.getInterpolatedAttribute(r,a,A,o,c,new C),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const d={a,b:A,c:o,normal:new C,materialIndex:0};ut.getNormal(di,ui,gi,d.normal),h.face=d,h.barycoord=c}return h}class Gn extends v{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new D,this.projectionMatrix=new D,this.projectionMatrixInverse=new D,this.coordinateSystem=Xt,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Jt=new C,Nn=new O,Un=new O;class gs extends Gn{constructor(t=50,e=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=Ne*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(Ge*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return Ne*2*Math.atan(Math.tan(Ge*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,i){Jt.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Jt.x,Jt.y).multiplyScalar(-t/Jt.z),Jt.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Jt.x,Jt.y).multiplyScalar(-t/Jt.z)}getViewSize(t,e){return this.getViewBounds(t,Nn,Un),e.subVectors(Un,Nn)}setViewOffset(t,e,i,s,n,r){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=n,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(Ge*.5*this.fov)/this.zoom,i=2*e,s=this.aspect*i,n=-.5*s;const r=this.view;if(this.view!==null&&this.view.enabled){const A=r.fullWidth,o=r.fullHeight;n+=r.offsetX*s/A,e-=r.offsetY*i/o,s*=r.width/A,i*=r.height/o}const a=this.filmOffset;a!==0&&(n+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(n,n+s,e,e-i,t,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}class ps extends v{constructor(){super(),this.isGroup=!0,this.type="Group"}}class zn{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.usage=qi,this.updateRanges=[],this.version=0,this.uuid=ot()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let s=0,n=this.stride;s<n;s++)this.array[t+s]=e.array[i+s];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ot()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(e,this.stride);return i.setUsage(this.usage),i}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ot()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const X=new C;class Ii{constructor(t,e,i,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=t,this.itemSize=e,this.offset=i,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,i=this.data.count;e<i;e++)X.fromBufferAttribute(this,e),X.applyMatrix4(t),this.setXYZ(e,X.x,X.y,X.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)X.fromBufferAttribute(this,e),X.applyNormalMatrix(t),this.setXYZ(e,X.x,X.y,X.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)X.fromBufferAttribute(this,e),X.transformDirection(t),this.setXYZ(e,X.x,X.y,X.z);return this}getComponent(t,e){let i=this.array[t*this.data.stride+this.offset+e];return this.normalized&&(i=ht(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=T(i,this.array)),this.data.array[t*this.data.stride+this.offset+e]=i,this}setX(t,e){return this.normalized&&(e=T(e,this.array)),this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.normalized&&(e=T(e,this.array)),this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.normalized&&(e=T(e,this.array)),this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.normalized&&(e=T(e,this.array)),this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){let e=this.data.array[t*this.data.stride+this.offset];return this.normalized&&(e=ht(e,this.array)),e}getY(t){let e=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(e=ht(e,this.array)),e}getZ(t){let e=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(e=ht(e,this.array)),e}getW(t){let e=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(e=ht(e,this.array)),e}setXY(t,e,i){return t=t*this.data.stride+this.offset,this.normalized&&(e=T(e,this.array),i=T(i,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this}setXYZ(t,e,i,s){return t=t*this.data.stride+this.offset,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this}setXYZW(t,e,i,s,n){return t=t*this.data.stride+this.offset,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array),n=T(n,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this.data.array[t+3]=n,this}clone(t){if(t===void 0){mn("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let n=0;n<this.itemSize;n++)e.push(this.data.array[s+n])}return new it(new this.array.constructor(e),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new Ii(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){mn("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let n=0;n<this.itemSize;n++)e.push(this.data.array[s+n])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const vn=new C,On=new Qt,Hn=new Qt,dA=new C,qn=new D,Bi=new C,fs=new ft,Pn=new D,bs=new ai;class uA extends bi{constructor(t,e){super(t,e),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=tn,this.bindMatrix=new D,this.bindMatrixInverse=new D,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const t=this.geometry;this.boundingBox===null&&(this.boundingBox=new xt),this.boundingBox.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,Bi),this.boundingBox.expandByPoint(Bi)}computeBoundingSphere(){const t=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new ft),this.boundingSphere.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,Bi),this.boundingSphere.expandByPoint(Bi)}copy(t,e){return super.copy(t,e),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}raycast(t,e){const i=this.material,s=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),fs.copy(this.boundingSphere),fs.applyMatrix4(s),t.ray.intersectsSphere(fs)!==!1&&(Pn.copy(s).invert(),bs.copy(t.ray).applyMatrix4(Pn),!(this.boundingBox!==null&&bs.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(t,e,bs)))}getVertexPosition(t,e){return super.getVertexPosition(t,e),this.applyBoneTransform(t,e),e}bind(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const t=new Qt,e=this.geometry.attributes.skinWeight;for(let i=0,s=e.count;i<s;i++){t.fromBufferAttribute(e,i);const n=1/t.manhattanLength();n!==1/0?t.multiplyScalar(n):t.set(1,0,0,0),e.setXYZW(i,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.bindMode===tn?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===oa?this.bindMatrixInverse.copy(this.bindMatrix).invert():L("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(t,e){const i=this.skeleton,s=this.geometry;On.fromBufferAttribute(s.attributes.skinIndex,t),Hn.fromBufferAttribute(s.attributes.skinWeight,t),vn.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let n=0;n<4;n++){const r=Hn.getComponent(n);if(r!==0){const a=On.getComponent(n);qn.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),e.addScaledVector(dA.copy(vn).applyMatrix4(qn),r)}}return e.applyMatrix4(this.bindMatrixInverse)}}class jn extends v{constructor(){super(),this.isBone=!0,this.type="Bone"}}class ms extends tt{constructor(t=null,e=1,i=1,s,n,r,a,A,o=Gt,h=Gt,c,d){super(null,r,a,A,o,h,s,n,c,d),this.isDataTexture=!0,this.image={data:t,width:e,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Jn=new D,gA=new D;class Is{constructor(t=[],e=[]){this.uuid=ot(),this.bones=t.slice(0),this.boneInverses=e,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){const t=this.bones,e=this.boneInverses;if(this.boneMatrices=new Float32Array(t.length*16),e.length===0)this.calculateInverses();else if(t.length!==e.length){L("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,s=this.bones.length;i<s;i++)this.boneInverses.push(new D)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,e=this.bones.length;t<e;t++){const i=new D;this.bones[t]&&i.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&i.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const t=this.bones,e=this.boneInverses,i=this.boneMatrices,s=this.boneTexture;for(let n=0,r=t.length;n<r;n++){const a=t[n]?t[n].matrixWorld:gA;Jn.multiplyMatrices(a,e[n]),Jn.toArray(i,n*16)}s!==null&&(s.needsUpdate=!0)}clone(){return new Is(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(this.bones.length*4);t=Math.ceil(t/4)*4,t=Math.max(t,4);const e=new Float32Array(t*t*4);e.set(this.boneMatrices);const i=new ms(e,t,t,zt,Ut);return i.needsUpdate=!0,this.boneMatrices=e,this.boneTexture=i,this}getBoneByName(t){for(let e=0,i=this.bones.length;e<i;e++){const s=this.bones[e];if(s.name===t)return s}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,e){this.uuid=t.uuid;for(let i=0,s=t.bones.length;i<s;i++){const n=t.bones[i];let r=e[n];r===void 0&&(L("Skeleton: No bone found with UUID:",n),r=new jn),this.bones.push(r),this.boneInverses.push(new D().fromArray(t.boneInverses[i]))}return this.init(),this}toJSON(){const t={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const e=this.bones,i=this.boneInverses;for(let s=0,n=e.length;s<n;s++){const r=e[s];t.bones.push(r.uuid);const a=i[s];t.boneInverses.push(a.toArray())}return t}}class Bs extends it{constructor(t,e,i,s=1){super(t,e,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=s}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}const Ce=new D,Vn=new D,Ci=[],Kn=new xt,pA=new D,qe=new bi,Pe=new ft;class fA extends bi{constructor(t,e,i){super(t,e),this.isInstancedMesh=!0,this.instanceMatrix=new Bs(new Float32Array(i*16),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let s=0;s<i;s++)this.setMatrixAt(s,pA)}computeBoundingBox(){const t=this.geometry,e=this.count;this.boundingBox===null&&(this.boundingBox=new xt),t.boundingBox===null&&t.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,Ce),Kn.copy(t.boundingBox).applyMatrix4(Ce),this.boundingBox.union(Kn)}computeBoundingSphere(){const t=this.geometry,e=this.count;this.boundingSphere===null&&(this.boundingSphere=new ft),t.boundingSphere===null&&t.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,Ce),Pe.copy(t.boundingSphere).applyMatrix4(Ce),this.boundingSphere.union(Pe)}copy(t,e){return super.copy(t,e),this.instanceMatrix.copy(t.instanceMatrix),t.morphTexture!==null&&(this.morphTexture=t.morphTexture.clone()),t.instanceColor!==null&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}getColorAt(t,e){e.fromArray(this.instanceColor.array,t*3)}getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,t*16)}getMorphAt(t,e){const i=e.morphTargetInfluences,s=this.morphTexture.source.data.data,n=i.length+1,r=t*n+1;for(let a=0;a<i.length;a++)i[a]=s[r+a]}raycast(t,e){const i=this.matrixWorld,s=this.count;if(qe.geometry=this.geometry,qe.material=this.material,qe.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Pe.copy(this.boundingSphere),Pe.applyMatrix4(i),t.ray.intersectsSphere(Pe)!==!1))for(let n=0;n<s;n++){this.getMatrixAt(n,Ce),Vn.multiplyMatrices(i,Ce),qe.matrixWorld=Vn,qe.raycast(t,Ci);for(let r=0,a=Ci.length;r<a;r++){const A=Ci[r];A.instanceId=n,A.object=this,e.push(A)}Ci.length=0}}setColorAt(t,e){this.instanceColor===null&&(this.instanceColor=new Bs(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),e.toArray(this.instanceColor.array,t*3)}setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,t*16)}setMorphAt(t,e){const i=e.morphTargetInfluences,s=i.length+1;this.morphTexture===null&&(this.morphTexture=new ms(new Float32Array(s*this.count),s,this.count,ae,Ut));const n=this.morphTexture.source.data.data;let r=0;for(let o=0;o<i.length;o++)r+=i[o];const a=this.geometry.morphTargetsRelative?1:1-r,A=s*t;n[A]=a,n.set(i,A+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const Cs=new C,bA=new C,mA=new Et;class Ee{constructor(t=new C(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,i,s){return this.normal.set(t,e,i),this.constant=s,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,i){const s=Cs.subVectors(i,e).cross(bA.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(s,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const i=t.delta(Cs),s=this.normal.dot(i);if(s===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;const n=-(t.start.dot(this.normal)+this.constant)/s;return n<0||n>1?null:e.copy(t.start).addScaledVector(i,n)}intersectsLine(t){const e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const i=e||mA.getNormalMatrix(t),s=this.coplanarPoint(Cs).applyMatrix4(t),n=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(n),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const se=new ft,IA=new O(.5,.5),Ei=new C;class BA{constructor(t=new Ee,e=new Ee,i=new Ee,s=new Ee,n=new Ee,r=new Ee){this.planes=[t,e,i,s,n,r]}set(t,e,i,s,n,r){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(i),a[3].copy(s),a[4].copy(n),a[5].copy(r),this}copy(t){const e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t,e=Xt,i=!1){const s=this.planes,n=t.elements,r=n[0],a=n[1],A=n[2],o=n[3],h=n[4],c=n[5],d=n[6],u=n[7],g=n[8],p=n[9],b=n[10],f=n[11],m=n[12],B=n[13],I=n[14],E=n[15];if(s[0].setComponents(o-r,u-h,f-g,E-m).normalize(),s[1].setComponents(o+r,u+h,f+g,E+m).normalize(),s[2].setComponents(o+a,u+c,f+p,E+B).normalize(),s[3].setComponents(o-a,u-c,f-p,E-B).normalize(),i)s[4].setComponents(A,d,b,I).normalize(),s[5].setComponents(o-A,u-d,f-b,E-I).normalize();else if(s[4].setComponents(o-A,u-d,f-b,E-I).normalize(),e===Xt)s[5].setComponents(o+A,u+d,f+b,E+I).normalize();else if(e===Pi)s[5].setComponents(A,d,b,I).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),se.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),se.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(se)}intersectsSprite(t){se.center.set(0,0,0);const e=IA.distanceTo(t.center);return se.radius=.7071067811865476+e,se.applyMatrix4(t.matrixWorld),this.intersectsSphere(se)}intersectsSphere(t){const e=this.planes,i=t.center,s=-t.radius;for(let n=0;n<6;n++)if(e[n].distanceToPoint(i)<s)return!1;return!0}intersectsBox(t){const e=this.planes;for(let i=0;i<6;i++){const s=e[i];if(Ei.x=s.normal.x>0?t.max.x:t.min.x,Ei.y=s.normal.y>0?t.max.y:t.min.y,Ei.z=s.normal.z>0?t.max.z:t.min.z,s.distanceToPoint(Ei)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class Yn extends te{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new H(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const yi=new C,Qi=new C,Wn=new D,je=new ai,xi=new ft,Es=new C,Xn=new C;class ys extends v{constructor(t=new ee,e=new Yn){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[0];for(let s=1,n=e.count;s<n;s++)yi.fromBufferAttribute(e,s-1),Qi.fromBufferAttribute(e,s),i[s]=i[s-1],i[s]+=yi.distanceTo(Qi);t.setAttribute("lineDistance",new ls(i,1))}else L("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,e){const i=this.geometry,s=this.matrixWorld,n=t.params.Line.threshold,r=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),xi.copy(i.boundingSphere),xi.applyMatrix4(s),xi.radius+=n,t.ray.intersectsSphere(xi)===!1)return;Wn.copy(s).invert(),je.copy(t.ray).applyMatrix4(Wn);const a=n/((this.scale.x+this.scale.y+this.scale.z)/3),A=a*a,o=this.isLineSegments?2:1,h=i.index,d=i.attributes.position;if(h!==null){const u=Math.max(0,r.start),g=Math.min(h.count,r.start+r.count);for(let p=u,b=g-1;p<b;p+=o){const f=h.getX(p),m=h.getX(p+1),B=wi(this,t,je,A,f,m,p);B&&e.push(B)}if(this.isLineLoop){const p=h.getX(g-1),b=h.getX(u),f=wi(this,t,je,A,p,b,g-1);f&&e.push(f)}}else{const u=Math.max(0,r.start),g=Math.min(d.count,r.start+r.count);for(let p=u,b=g-1;p<b;p+=o){const f=wi(this,t,je,A,p,p+1,p);f&&e.push(f)}if(this.isLineLoop){const p=wi(this,t,je,A,g-1,u,g-1);p&&e.push(p)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const a=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=n}}}}}function wi(l,t,e,i,s,n,r){const a=l.geometry.attributes.position;if(yi.fromBufferAttribute(a,s),Qi.fromBufferAttribute(a,n),e.distanceSqToSegment(yi,Qi,Es,Xn)>i)return;Es.applyMatrix4(l.matrixWorld);const o=t.ray.origin.distanceTo(Es);if(!(o<t.near||o>t.far))return{distance:o,point:Xn.clone().applyMatrix4(l.matrixWorld),index:r,face:null,faceIndex:null,barycoord:null,object:l}}const Zn=new C,$n=new C;class CA extends ys{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[];for(let s=0,n=e.count;s<n;s+=2)Zn.fromBufferAttribute(e,s),$n.fromBufferAttribute(e,s+1),i[s]=s===0?0:i[s-1],i[s+1]=i[s]+Zn.distanceTo($n);t.setAttribute("lineDistance",new ls(i,1))}else L("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class EA extends ys{constructor(t,e){super(t,e),this.isLineLoop=!0,this.type="LineLoop"}}class tr extends te{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new H(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}const er=new D,Qs=new ai,Mi=new ft,Si=new C;class yA extends v{constructor(t=new ee,e=new tr){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}raycast(t,e){const i=this.geometry,s=this.matrixWorld,n=t.params.Points.threshold,r=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Mi.copy(i.boundingSphere),Mi.applyMatrix4(s),Mi.radius+=n,t.ray.intersectsSphere(Mi)===!1)return;er.copy(s).invert(),Qs.copy(t.ray).applyMatrix4(er);const a=n/((this.scale.x+this.scale.y+this.scale.z)/3),A=a*a,o=i.index,c=i.attributes.position;if(o!==null){const d=Math.max(0,r.start),u=Math.min(o.count,r.start+r.count);for(let g=d,p=u;g<p;g++){const b=o.getX(g);Si.fromBufferAttribute(c,b),ir(Si,b,A,s,t,e,this)}}else{const d=Math.max(0,r.start),u=Math.min(c.count,r.start+r.count);for(let g=d,p=u;g<p;g++)Si.fromBufferAttribute(c,g),ir(Si,g,A,s,t,e,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const a=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=n}}}}}function ir(l,t,e,i,s,n,r){const a=Qs.distanceSqToPoint(l);if(a<e){const A=new C;Qs.closestPointToPoint(l,A),A.applyMatrix4(i);const o=s.ray.origin.distanceTo(A);if(o<s.near||o>s.far)return;n.push({distance:o,distanceToRay:Math.sqrt(a),point:A,index:t,face:null,faceIndex:null,barycoord:null,object:r})}}class Fi extends tt{constructor(t,e,i,s,n,r,a,A,o,h,c,d){super(null,r,a,A,o,h,s,n,c,d),this.isCompressedTexture=!0,this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class QA extends Fi{constructor(t,e,i,s,n,r){super(t,e,i,n,r),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=Yt,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class xA extends Fi{constructor(t,e,i){super(void 0,t[0].width,t[0].height,e,i,ha),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class xs extends te{constructor(t){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new H(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wa,this.normalScale=new O(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ge,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.envMapIntensity=t.envMapIntensity,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class bt extends xs{constructor(t){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new O(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return M(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new H(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new H(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new H(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(t)}get anisotropy(){return this._anisotropy}set anisotropy(t){this._anisotropy>0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.dispersion=t.dispersion,this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}function ki(l,t){return!l||l.constructor===t?l:typeof t.BYTES_PER_ELEMENT=="number"?new t(l):Array.prototype.slice.call(l)}function wA(l){function t(s,n){return l[s]-l[n]}const e=l.length,i=new Array(e);for(let s=0;s!==e;++s)i[s]=s;return i.sort(t),i}function sr(l,t,e){const i=l.length,s=new l.constructor(i);for(let n=0,r=0;r!==i;++n){const a=e[n]*t;for(let A=0;A!==t;++A)s[r++]=l[a+A]}return s}function nr(l,t,e,i){let s=1,n=l[0];for(;n!==void 0&&n[i]===void 0;)n=l[s++];if(n===void 0)return;let r=n[i];if(r!==void 0)if(Array.isArray(r))do r=n[i],r!==void 0&&(t.push(n.time),e.push(...r)),n=l[s++];while(n!==void 0);else if(r.toArray!==void 0)do r=n[i],r!==void 0&&(t.push(n.time),r.toArray(e,e.length)),n=l[s++];while(n!==void 0);else do r=n[i],r!==void 0&&(t.push(n.time),e.push(r)),n=l[s++];while(n!==void 0)}class Je{constructor(t,e,i,s){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new e.constructor(i),this.sampleValues=e,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let i=this._cachedIndex,s=e[i],n=e[i-1];i:{t:{let r;e:{s:if(!(t<s)){for(let a=i+2;;){if(s===void 0){if(t<n)break s;return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(n=s,s=e[++i],t<s)break t}r=e.length;break e}if(!(t>=n)){const a=e[1];t<a&&(i=2,n=a);for(let A=i-2;;){if(n===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===A)break;if(s=n,n=e[--i-1],t>=n)break t}r=i,i=0;break e}break i}for(;i<r;){const a=i+r>>>1;t<e[a]?r=a:i=a+1}if(s=e[i],n=e[i-1],n===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(s===void 0)return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,n,s)}return this.interpolate_(i,n,t,s)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,s=this.valueSize,n=t*s;for(let r=0;r!==s;++r)e[r]=i[n+r];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class MA extends Je{constructor(t,e,i,s){super(t,e,i,s),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:ln,endingEnd:ln}}intervalChanged_(t,e,i){const s=this.parameterPositions;let n=t-2,r=t+1,a=s[n],A=s[r];if(a===void 0)switch(this.getSettings_().endingStart){case dn:n=t,a=2*e-i;break;case un:n=s.length-2,a=e+s[n]-s[n+1];break;default:n=t,a=i}if(A===void 0)switch(this.getSettings_().endingEnd){case dn:r=t,A=2*i-e;break;case un:r=1,A=i+s[1]-s[0];break;default:r=t-1,A=e}const o=(i-e)*.5,h=this.valueSize;this._weightPrev=o/(e-a),this._weightNext=o/(A-i),this._offsetPrev=n*h,this._offsetNext=r*h}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,A=t*a,o=A-a,h=this._offsetPrev,c=this._offsetNext,d=this._weightPrev,u=this._weightNext,g=(i-e)/(s-e),p=g*g,b=p*g,f=-d*b+2*d*p-d*g,m=(1+d)*b+(-1.5-2*d)*p+(-.5+d)*g+1,B=(-1-u)*b+(1.5+u)*p+.5*g,I=u*b-u*p;for(let E=0;E!==a;++E)n[E]=f*r[h+E]+m*r[o+E]+B*r[A+E]+I*r[c+E];return n}}class SA extends Je{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,A=t*a,o=A-a,h=(i-e)/(s-e),c=1-h;for(let d=0;d!==a;++d)n[d]=r[o+d]*c+r[A+d]*h;return n}}class FA extends Je{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t){return this.copySampleValue_(t-1)}}class gt{constructor(t,e,i,s){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=ki(e,this.TimeBufferType),this.values=ki(i,this.ValueBufferType),this.setInterpolation(s||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let i;if(e.toJSON!==this.toJSON)i=e.toJSON(t);else{i={name:t.name,times:ki(t.times,Array),values:ki(t.values,Array)};const s=t.getInterpolation();s!==t.DefaultInterpolation&&(i.interpolation=s)}return i.type=t.ValueTypeName,i}InterpolantFactoryMethodDiscrete(t){return new FA(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new SA(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new MA(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case Re:e=this.InterpolantFactoryMethodDiscrete;break;case Le:e=this.InterpolantFactoryMethodLinear;break;case vi:e=this.InterpolantFactoryMethodSmooth;break}if(e===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return L("KeyframeTrack:",i),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Re;case this.InterpolantFactoryMethodLinear:return Le;case this.InterpolantFactoryMethodSmooth:return vi}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]+=t}return this}scale(t){if(t!==1){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]*=t}return this}trim(t,e){const i=this.times,s=i.length;let n=0,r=s-1;for(;n!==s&&i[n]<t;)++n;for(;r!==-1&&i[r]>e;)--r;if(++r,n!==0||r!==s){n>=r&&(r=Math.max(r,1),n=r-1);const a=this.getValueSize();this.times=i.slice(n,r),this.values=this.values.slice(n*a,r*a)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!==0&&(U("KeyframeTrack: Invalid value size in track.",this),t=!1);const i=this.times,s=this.values,n=i.length;n===0&&(U("KeyframeTrack: Track is empty.",this),t=!1);let r=null;for(let a=0;a!==n;a++){const A=i[a];if(typeof A=="number"&&isNaN(A)){U("KeyframeTrack: Time is not a valid number.",this,a,A),t=!1;break}if(r!==null&&r>A){U("KeyframeTrack: Out of order keys.",this,a,A,r),t=!1;break}r=A}if(s!==void 0&&Sa(s))for(let a=0,A=s.length;a!==A;++a){const o=s[a];if(isNaN(o)){U("KeyframeTrack: Value is not a valid number.",this,a,o),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===vi,n=t.length-1;let r=1;for(let a=1;a<n;++a){let A=!1;const o=t[a],h=t[a+1];if(o!==h&&(a!==1||o!==t[0]))if(s)A=!0;else{const c=a*i,d=c-i,u=c+i;for(let g=0;g!==i;++g){const p=e[c+g];if(p!==e[d+g]||p!==e[u+g]){A=!0;break}}}if(A){if(a!==r){t[r]=t[a];const c=a*i,d=r*i;for(let u=0;u!==i;++u)e[d+u]=e[c+u]}++r}}if(n>0){t[r]=t[n];for(let a=n*i,A=r*i,o=0;o!==i;++o)e[A+o]=e[a+o];++r}return r!==t.length?(this.times=t.slice(0,r),this.values=e.slice(0,r*i)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),i=this.constructor,s=new i(this.name,t,e);return s.createInterpolant=this.createInterpolant,s}}gt.prototype.ValueTypeName="",gt.prototype.TimeBufferType=Float32Array,gt.prototype.ValueBufferType=Float32Array,gt.prototype.DefaultInterpolation=Le;class ye extends gt{constructor(t,e,i){super(t,e,i)}}ye.prototype.ValueTypeName="bool",ye.prototype.ValueBufferType=Array,ye.prototype.DefaultInterpolation=Re,ye.prototype.InterpolantFactoryMethodLinear=void 0,ye.prototype.InterpolantFactoryMethodSmooth=void 0;class rr extends gt{constructor(t,e,i,s){super(t,e,i,s)}}rr.prototype.ValueTypeName="color";class Qe extends gt{constructor(t,e,i,s){super(t,e,i,s)}}Qe.prototype.ValueTypeName="number";class kA extends Je{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,A=(i-e)/(s-e);let o=t*a;for(let h=o+a;o!==h;o+=4)vt.slerpFlat(n,0,r,o-a,r,o,A);return n}}class xe extends gt{constructor(t,e,i,s){super(t,e,i,s)}InterpolantFactoryMethodLinear(t){return new kA(this.times,this.values,this.getValueSize(),t)}}xe.prototype.ValueTypeName="quaternion",xe.prototype.InterpolantFactoryMethodSmooth=void 0;class we extends gt{constructor(t,e,i){super(t,e,i)}}we.prototype.ValueTypeName="string",we.prototype.ValueBufferType=Array,we.prototype.DefaultInterpolation=Re,we.prototype.InterpolantFactoryMethodLinear=void 0,we.prototype.InterpolantFactoryMethodSmooth=void 0;class Me extends gt{constructor(t,e,i,s){super(t,e,i,s)}}Me.prototype.ValueTypeName="vector";class DA{constructor(t="",e=-1,i=[],s=Qa){this.name=t,this.tracks=i,this.duration=e,this.blendMode=s,this.uuid=ot(),this.userData={},this.duration<0&&this.resetDuration()}static parse(t){const e=[],i=t.tracks,s=1/(t.fps||1);for(let r=0,a=i.length;r!==a;++r)e.push(TA(i[r]).scale(s));const n=new this(t.name,t.duration,e,t.blendMode);return n.uuid=t.uuid,n.userData=JSON.parse(t.userData||"{}"),n}static toJSON(t){const e=[],i=t.tracks,s={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode,userData:JSON.stringify(t.userData)};for(let n=0,r=i.length;n!==r;++n)e.push(gt.toJSON(i[n]));return s}static CreateFromMorphTargetSequence(t,e,i,s){const n=e.length,r=[];for(let a=0;a<n;a++){let A=[],o=[];A.push((a+n-1)%n,a,(a+1)%n),o.push(0,1,0);const h=wA(A);A=sr(A,1,h),o=sr(o,1,h),!s&&A[0]===0&&(A.push(n),o.push(o[0])),r.push(new Qe(".morphTargetInfluences["+e[a].name+"]",A,o).scale(1/i))}return new this(t,-1,r)}static findByName(t,e){let i=t;if(!Array.isArray(t)){const s=t;i=s.geometry&&s.geometry.animations||s.animations}for(let s=0;s<i.length;s++)if(i[s].name===e)return i[s];return null}static CreateClipsFromMorphTargetSequences(t,e,i){const s={},n=/^([\w-]*?)([\d]+)$/;for(let a=0,A=t.length;a<A;a++){const o=t[a],h=o.name.match(n);if(h&&h.length>1){const c=h[1];let d=s[c];d||(s[c]=d=[]),d.push(o)}}const r=[];for(const a in s)r.push(this.CreateFromMorphTargetSequence(a,s[a],e,i));return r}static parseAnimation(t,e){if(L("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!t)return U("AnimationClip: No animation in JSONLoader data."),null;const i=function(c,d,u,g,p){if(u.length!==0){const b=[],f=[];nr(u,b,f,g),b.length!==0&&p.push(new c(d,b,f))}},s=[],n=t.name||"default",r=t.fps||30,a=t.blendMode;let A=t.length||-1;const o=t.hierarchy||[];for(let c=0;c<o.length;c++){const d=o[c].keys;if(!(!d||d.length===0))if(d[0].morphTargets){const u={};let g;for(g=0;g<d.length;g++)if(d[g].morphTargets)for(let p=0;p<d[g].morphTargets.length;p++)u[d[g].morphTargets[p]]=-1;for(const p in u){const b=[],f=[];for(let m=0;m!==d[g].morphTargets.length;++m){const B=d[g];b.push(B.time),f.push(B.morphTarget===p?1:0)}s.push(new Qe(".morphTargetInfluence["+p+"]",b,f))}A=u.length*r}else{const u=".bones["+e[c].name+"]";i(Me,u+".position",d,"pos",s),i(xe,u+".quaternion",d,"rot",s),i(Me,u+".scale",d,"scl",s)}}return s.length===0?null:new this(n,A,s,a)}resetDuration(){const t=this.tracks;let e=0;for(let i=0,s=t.length;i!==s;++i){const n=this.tracks[i];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){const t=[];for(let i=0;i<this.tracks.length;i++)t.push(this.tracks[i].clone());const e=new this.constructor(this.name,this.duration,t,this.blendMode);return e.userData=JSON.parse(JSON.stringify(this.userData)),e}toJSON(){return this.constructor.toJSON(this)}}function _A(l){switch(l.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Qe;case"vector":case"vector2":case"vector3":case"vector4":return Me;case"color":return rr;case"quaternion":return xe;case"bool":case"boolean":return ye;case"string":return we}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+l)}function TA(l){if(l.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=_A(l.type);if(l.times===void 0){const e=[],i=[];nr(l.keys,e,i,"value"),l.times=e,l.values=i}return t.parse!==void 0?t.parse(l):new t(l.name,l.times,l.values,l.interpolation)}const Dt={enabled:!1,files:{},add:function(l,t){this.enabled!==!1&&(this.files[l]=t)},get:function(l){if(this.enabled!==!1)return this.files[l]},remove:function(l){delete this.files[l]},clear:function(){this.files={}}};class RA{constructor(t,e,i){const s=this;let n=!1,r=0,a=0,A;const o=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this._abortController=null,this.itemStart=function(h){a++,n===!1&&s.onStart!==void 0&&s.onStart(h,r,a),n=!0},this.itemEnd=function(h){r++,s.onProgress!==void 0&&s.onProgress(h,r,a),r===a&&(n=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(h){s.onError!==void 0&&s.onError(h)},this.resolveURL=function(h){return A?A(h):h},this.setURLModifier=function(h){return A=h,this},this.addHandler=function(h,c){return o.push(h,c),this},this.removeHandler=function(h){const c=o.indexOf(h);return c!==-1&&o.splice(c,2),this},this.getHandler=function(h){for(let c=0,d=o.length;c<d;c+=2){const u=o[c],g=o[c+1];if(u.global&&(u.lastIndex=0),u.test(h))return g}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const LA=new RA;class Vt{constructor(t){this.manager=t!==void 0?t:LA,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const i=this;return new Promise(function(s,n){i.load(t,s,e,n)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}abort(){return this}}Vt.DEFAULT_MATERIAL_NAME="__DEFAULT";const _t={};class GA extends Error{constructor(t,e){super(t),this.response=e}}class ne extends Vt{constructor(t){super(t),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=Dt.get(`file:${t}`);if(n!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(n),this.manager.itemEnd(t)},0),n;if(_t[t]!==void 0){_t[t].push({onLoad:e,onProgress:i,onError:s});return}_t[t]=[],_t[t].push({onLoad:e,onProgress:i,onError:s});const r=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),a=this.mimeType,A=this.responseType;fetch(r).then(o=>{if(o.status===200||o.status===0){if(o.status===0&&L("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||o.body===void 0||o.body.getReader===void 0)return o;const h=_t[t],c=o.body.getReader(),d=o.headers.get("X-File-Size")||o.headers.get("Content-Length"),u=d?parseInt(d):0,g=u!==0;let p=0;const b=new ReadableStream({start(f){m();function m(){c.read().then(({done:B,value:I})=>{if(B)f.close();else{p+=I.byteLength;const E=new ProgressEvent("progress",{lengthComputable:g,loaded:p,total:u});for(let Q=0,y=h.length;Q<y;Q++){const x=h[Q];x.onProgress&&x.onProgress(E)}f.enqueue(I),m()}},B=>{f.error(B)})}}});return new Response(b)}else throw new GA(`fetch for "${o.url}" responded with ${o.status}: ${o.statusText}`,o)}).then(o=>{switch(A){case"arraybuffer":return o.arrayBuffer();case"blob":return o.blob();case"document":return o.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return o.json();default:if(a==="")return o.text();{const c=/charset="?([^;"\s]*)"?/i.exec(a),d=c&&c[1]?c[1].toLowerCase():void 0,u=new TextDecoder(d);return o.arrayBuffer().then(g=>u.decode(g))}}}).then(o=>{Dt.add(`file:${t}`,o);const h=_t[t];delete _t[t];for(let c=0,d=h.length;c<d;c++){const u=h[c];u.onLoad&&u.onLoad(o)}}).catch(o=>{const h=_t[t];if(h===void 0)throw this.manager.itemError(t),o;delete _t[t];for(let c=0,d=h.length;c<d;c++){const u=h[c];u.onError&&u.onError(o)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const Se=new WeakMap;class NA extends Vt{constructor(t){super(t)}load(t,e,i,s){this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=this,r=Dt.get(`image:${t}`);if(r!==void 0){if(r.complete===!0)n.manager.itemStart(t),setTimeout(function(){e&&e(r),n.manager.itemEnd(t)},0);else{let c=Se.get(r);c===void 0&&(c=[],Se.set(r,c)),c.push({onLoad:e,onError:s})}return r}const a=ji("img");function A(){h(),e&&e(this);const c=Se.get(this)||[];for(let d=0;d<c.length;d++){const u=c[d];u.onLoad&&u.onLoad(this)}Se.delete(this),n.manager.itemEnd(t)}function o(c){h(),s&&s(c),Dt.remove(`image:${t}`);const d=Se.get(this)||[];for(let u=0;u<d.length;u++){const g=d[u];g.onError&&g.onError(c)}Se.delete(this),n.manager.itemError(t),n.manager.itemEnd(t)}function h(){a.removeEventListener("load",A,!1),a.removeEventListener("error",o,!1)}return a.addEventListener("load",A,!1),a.addEventListener("error",o,!1),t.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),Dt.add(`image:${t}`,a),n.manager.itemStart(t),a.src=t,a}}class UA extends Vt{constructor(t){super(t)}load(t,e,i,s){const n=new tt,r=new NA(this.manager);return r.setCrossOrigin(this.crossOrigin),r.setPath(this.path),r.load(t,function(a){n.image=a,n.needsUpdate=!0,e!==void 0&&e(n)},i,s),n}}class ws extends v{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new H(t),this.intensity=e}dispose(){this.dispatchEvent({type:"dispose"})}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,e}}const Ms=new D,ar=new C,Ar=new C;class Ss{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new O(512,512),this.mapType=k,this.map=null,this.mapPass=null,this.matrix=new D,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new BA,this._frameExtents=new O(1,1),this._viewportCount=1,this._viewports=[new Qt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,i=this.matrix;ar.setFromMatrixPosition(t.matrixWorld),e.position.copy(ar),Ar.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(Ar),e.updateMatrixWorld(),Ms.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ms,e.coordinateSystem,e.reversedDepth),e.reversedDepth?i.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(Ms)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.intensity=t.intensity,this.bias=t.bias,this.radius=t.radius,this.autoUpdate=t.autoUpdate,this.needsUpdate=t.needsUpdate,this.normalBias=t.normalBias,this.blurSamples=t.blurSamples,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const t={};return this.intensity!==1&&(t.intensity=this.intensity),this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class zA extends Ss{constructor(){super(new gs(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(t){const e=this.camera,i=Ne*2*t.angle*this.focus,s=this.mapSize.width/this.mapSize.height*this.aspect,n=t.distance||e.far;(i!==e.fov||s!==e.aspect||n!==e.far)&&(e.fov=i,e.aspect=s,e.far=n,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class vA extends ws{constructor(t,e,i=0,s=Math.PI/3,n=0,r=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(v.DEFAULT_UP),this.updateMatrix(),this.target=new v,this.distance=i,this.angle=s,this.penumbra=n,this.decay=r,this.map=null,this.shadow=new zA}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.map=t.map,this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.distance=this.distance,e.object.angle=this.angle,e.object.decay=this.decay,e.object.penumbra=this.penumbra,e.object.target=this.target.uuid,this.map&&this.map.isTexture&&(e.object.map=this.map.toJSON(t).uuid),e.object.shadow=this.shadow.toJSON(),e}}class OA extends Ss{constructor(){super(new gs(90,1,.5,500)),this.isPointLightShadow=!0}}class HA extends ws{constructor(t,e,i=0,s=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new OA}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.distance=this.distance,e.object.decay=this.decay,e.object.shadow=this.shadow.toJSON(),e}}class or extends Gn{constructor(t=-1,e=1,i=1,s=-1,n=.1,r=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=s,this.near=n,this.far=r,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,i,s,n,r){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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=n,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let n=i-t,r=i+t,a=s+e,A=s-e;if(this.view!==null&&this.view.enabled){const o=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;n+=o*this.view.offsetX,r=n+o*this.view.width,a-=h*this.view.offsetY,A=a-h*this.view.height}this.projectionMatrix.makeOrthographic(n,r,a,A,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}}class qA extends Ss{constructor(){super(new or(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class PA extends ws{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(v.DEFAULT_UP),this.updateMatrix(),this.target=new v,this.shadow=new qA}dispose(){super.dispose(),this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.shadow=this.shadow.toJSON(),e.object.target=this.target.uuid,e}}class Ve{static extractUrlBase(t){const e=t.lastIndexOf("/");return e===-1?"./":t.slice(0,e+1)}static resolveURL(t,e){return typeof t!="string"||t===""?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}}const Fs=new WeakMap;class jA extends Vt{constructor(t){super(t),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&L("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&L("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(t){return this.options=t,this}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=this,r=Dt.get(`image-bitmap:${t}`);if(r!==void 0){if(n.manager.itemStart(t),r.then){r.then(o=>{if(Fs.has(r)===!0)s&&s(Fs.get(r)),n.manager.itemError(t),n.manager.itemEnd(t);else return e&&e(o),n.manager.itemEnd(t),o});return}return setTimeout(function(){e&&e(r),n.manager.itemEnd(t)},0),r}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,a.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const A=fetch(t,a).then(function(o){return o.blob()}).then(function(o){return createImageBitmap(o,Object.assign(n.options,{colorSpaceConversion:"none"}))}).then(function(o){return Dt.add(`image-bitmap:${t}`,o),e&&e(o),n.manager.itemEnd(t),o}).catch(function(o){s&&s(o),Fs.set(A,o),Dt.remove(`image-bitmap:${t}`),n.manager.itemError(t),n.manager.itemEnd(t)});Dt.add(`image-bitmap:${t}`,A),n.manager.itemStart(t)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const ks="\\[\\]\\.:\\/",JA=new RegExp("["+ks+"]","g"),Ds="[^"+ks+"]",VA="[^"+ks.replace("\\.","")+"]",KA=/((?:WC+[\/:])*)/.source.replace("WC",Ds),YA=/(WCOD+)?/.source.replace("WCOD",VA),WA=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Ds),XA=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Ds),ZA=new RegExp("^"+KA+YA+WA+XA+"$"),$A=["material","materials","bones","map"];class to{constructor(t,e,i){const s=i||R.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,s)}getValue(t,e){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(t,e)}setValue(t,e){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,n=i.length;s!==n;++s)i[s].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}class R{constructor(t,e,i){this.path=e,this.parsedPath=i||R.parseTrackName(e),this.node=R.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,i){return t&&t.isAnimationObjectGroup?new R.Composite(t,e,i):new R(t,e,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(JA,"")}static parseTrackName(t){const e=ZA.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const n=i.nodeName.substring(s+1);$A.indexOf(n)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=n)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){const i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){const i=function(n){for(let r=0;r<n.length;r++){const a=n[r];if(a.name===e||a.uuid===e)return a;const A=i(a.children);if(A)return A}return null},s=i(t.children);if(s)return s}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)t[e++]=i[s]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,i=e.objectName,s=e.propertyName;let n=e.propertyIndex;if(t||(t=R.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){L("PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let o=e.objectIndex;switch(i){case"materials":if(!t.material){U("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){U("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){U("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let h=0;h<t.length;h++)if(t[h].name===o){o=h;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){U("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){U("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[i]===void 0){U("PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(o!==void 0){if(t[o]===void 0){U("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[o]}}const r=t[s];if(r===void 0){const o=e.nodeName;U("PropertyBinding: Trying to update property for track: "+o+"."+s+" but it wasn't found.",t);return}let a=this.Versioning.None;this.targetObject=t,t.isMaterial===!0?a=this.Versioning.NeedsUpdate:t.isObject3D===!0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let A=this.BindingType.Direct;if(n!==void 0){if(s==="morphTargetInfluences"){if(!t.geometry){U("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!t.geometry.morphAttributes){U("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[n]!==void 0&&(n=t.morphTargetDictionary[n])}A=this.BindingType.ArrayElement,this.resolvedProperty=r,this.propertyIndex=n}else r.fromArray!==void 0&&r.toArray!==void 0?(A=this.BindingType.HasFromToArray,this.resolvedProperty=r):Array.isArray(r)?(A=this.BindingType.EntireArray,this.resolvedProperty=r):this.propertyName=s;this.getValue=this.GetterByBindingType[A],this.setValue=this.SetterByBindingTypeAndVersioning[A][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}R.Composite=to,R.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},R.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},R.prototype.GetterByBindingType=[R.prototype._getValue_direct,R.prototype._getValue_array,R.prototype._getValue_arrayElement,R.prototype._getValue_toArray],R.prototype.SetterByBindingTypeAndVersioning=[[R.prototype._setValue_direct,R.prototype._setValue_direct_setNeedsUpdate,R.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[R.prototype._setValue_array,R.prototype._setValue_array_setNeedsUpdate,R.prototype._setValue_array_setMatrixWorldNeedsUpdate],[R.prototype._setValue_arrayElement,R.prototype._setValue_arrayElement_setNeedsUpdate,R.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[R.prototype._setValue_fromArray,R.prototype._setValue_fromArray_setNeedsUpdate,R.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]],typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Ks}})),typeof window<"u"&&(window.__THREE__?L("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Ks);const _s=new WeakMap;class eo extends Vt{constructor(t){super(t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(t){return this.decoderPath=t,this}setDecoderConfig(t){return this.decoderConfig=t,this}setWorkerLimit(t){return this.workerLimit=t,this}load(t,e,i,s){const n=new ne(this.manager);n.setPath(this.path),n.setResponseType("arraybuffer"),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials),n.load(t,r=>{this.parse(r,e,s)},i,s)}parse(t,e,i=()=>{}){this.decodeDracoFile(t,e,null,null,z,i).catch(i)}decodeDracoFile(t,e,i,s,n=$,r=()=>{}){const a={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:n};return this.decodeGeometry(t,a).then(e).catch(r)}decodeGeometry(t,e){const i=JSON.stringify(e);if(_s.has(t)){const A=_s.get(t);if(A.key===i)return A.promise;if(t.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const n=this.workerNextTaskID++,r=t.byteLength,a=this._getWorker(n,r).then(A=>(s=A,new Promise((o,h)=>{s._callbacks[n]={resolve:o,reject:h},s.postMessage({type:"decode",id:n,taskConfig:e,buffer:t},[t])}))).then(A=>this._createGeometry(A.geometry));return a.catch(()=>!0).then(()=>{s&&n&&this._releaseTask(s,n)}),_s.set(t,{key:i,promise:a}),a}_createGeometry(t){const e=new ee;t.index&&e.setIndex(new it(t.index.array,1));for(let i=0;i<t.attributes.length;i++){const{name:s,array:n,itemSize:r,stride:a,vertexColorSpace:A}=t.attributes[i];let o;if(r===a)o=new it(n,r);else{const h=new zn(n,a);o=new Ii(h,r,0)}s==="color"&&(this._assignVertexColorSpace(o,A),o.normalized=!(n instanceof Float32Array)),e.setAttribute(s,o)}return e}_assignVertexColorSpace(t,e){if(e!==z)return;const i=new H;for(let s=0,n=t.count;s<n;s++)i.fromBufferAttribute(t,s),W.colorSpaceToWorking(i,z),t.setXYZ(s,i.r,i.g,i.b)}_loadLibrary(t,e){const i=new ne(this.manager);return i.setPath(this.decoderPath),i.setResponseType(e),i.setWithCredentials(this.withCredentials),new Promise((s,n)=>{i.load(t,s,void 0,n)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const t=typeof WebAssembly!="object"||this.decoderConfig.type==="js",e=[];return t?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then(i=>{const s=i[0];t||(this.decoderConfig.wasmBinary=i[1]);const n=io.toString(),r=["/* draco decoder */",s,"","/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join(`
|
|
6
|
+
`);this.workerSourceURL=URL.createObjectURL(new Blob([r]))}),this.decoderPending}_getWorker(t,e){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const s=new Worker(this.workerSourceURL);s._callbacks={},s._taskCosts={},s._taskLoad=0,s.postMessage({type:"init",decoderConfig:this.decoderConfig}),s.onmessage=function(n){const r=n.data;switch(r.type){case"decode":s._callbacks[r.id].resolve(r);break;case"error":s._callbacks[r.id].reject(r);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+r.type+'"')}},this.workerPool.push(s)}else this.workerPool.sort(function(s,n){return s._taskLoad>n._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[t]=e,i._taskLoad+=e,i})}_releaseTask(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}debug(){console.log("Task load: ",this.workerPool.map(t=>t._taskLoad))}dispose(){for(let t=0;t<this.workerPool.length;++t)this.workerPool[t].terminate();return this.workerPool.length=0,this.workerSourceURL!==""&&URL.revokeObjectURL(this.workerSourceURL),this}}function io(){let l,t;onmessage=function(r){const a=r.data;switch(a.type){case"init":l=a.decoderConfig,t=new Promise(function(h){l.onModuleLoaded=function(c){h({draco:c})},DracoDecoderModule(l)});break;case"decode":const A=a.buffer,o=a.taskConfig;t.then(h=>{const c=h.draco,d=new c.Decoder;try{const u=e(c,d,new Int8Array(A),o),g=u.attributes.map(p=>p.array.buffer);u.index&&g.push(u.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:u},g)}catch(u){console.error(u),self.postMessage({type:"error",id:a.id,error:u.message})}finally{c.destroy(d)}});break}};function e(r,a,A,o){const h=o.attributeIDs,c=o.attributeTypes;let d,u;const g=a.GetEncodedGeometryType(A);if(g===r.TRIANGULAR_MESH)d=new r.Mesh,u=a.DecodeArrayToMesh(A,A.byteLength,d);else if(g===r.POINT_CLOUD)d=new r.PointCloud,u=a.DecodeArrayToPointCloud(A,A.byteLength,d);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!u.ok()||d.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+u.error_msg());const p={index:null,attributes:[]};for(const b in h){const f=self[c[b]];let m,B;if(o.useUniqueIDs)B=h[b],m=a.GetAttributeByUniqueId(d,B);else{if(B=a.GetAttributeId(d,r[h[b]]),B===-1)continue;m=a.GetAttribute(d,B)}const I=s(r,a,d,b,f,m);b==="color"&&(I.vertexColorSpace=o.vertexColorSpace),p.attributes.push(I)}return g===r.TRIANGULAR_MESH&&(p.index=i(r,a,d)),r.destroy(d),p}function i(r,a,A){const h=A.num_faces()*3,c=h*4,d=r._malloc(c);a.GetTrianglesUInt32Array(A,c,d);const u=new Uint32Array(r.HEAPF32.buffer,d,h).slice();return r._free(d),{array:u,itemSize:1}}function s(r,a,A,o,h,c){const d=A.num_points(),u=c.num_components(),g=n(r,h),p=u*h.BYTES_PER_ELEMENT,b=Math.ceil(p/4)*4,f=b/h.BYTES_PER_ELEMENT,m=d*p,B=d*b,I=r._malloc(m);a.GetAttributeDataArrayForAllPoints(A,c,g,m,I);const E=new h(r.HEAPF32.buffer,I,m/h.BYTES_PER_ELEMENT);let Q;if(p===b)Q=E.slice();else{Q=new h(B/h.BYTES_PER_ELEMENT);let y=0;for(let x=0,F=E.length;x<F;x++){for(let w=0;w<u;w++)Q[y+w]=E[x*u+w];y+=f}}return r._free(I),{name:o,count:d,itemSize:u,array:Q,stride:f}}function n(r,a){switch(a){case Float32Array:return r.DT_FLOAT32;case Int8Array:return r.DT_INT8;case Int16Array:return r.DT_INT16;case Int32Array:return r.DT_INT32;case Uint8Array:return r.DT_UINT8;case Uint16Array:return r.DT_UINT16;case Uint32Array:return r.DT_UINT32}}}function hr(l,t){if(t===xa)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),l;if(t===Oi||t===gn){let e=l.getIndex();if(e===null){const r=[],a=l.getAttribute("position");if(a!==void 0){for(let A=0;A<a.count;A++)r.push(A);l.setIndex(r),e=l.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),l}const i=e.count-2,s=[];if(t===Oi)for(let r=1;r<=i;r++)s.push(e.getX(0)),s.push(e.getX(r)),s.push(e.getX(r+1));else for(let r=0;r<i;r++)r%2===0?(s.push(e.getX(r)),s.push(e.getX(r+1)),s.push(e.getX(r+2))):(s.push(e.getX(r+2)),s.push(e.getX(r+1)),s.push(e.getX(r)));s.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const n=l.clone();return n.setIndex(s),n.clearGroups(),n}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),l}class so extends Vt{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new oo(e)}),this.register(function(e){return new ho(e)}),this.register(function(e){return new Io(e)}),this.register(function(e){return new Bo(e)}),this.register(function(e){return new Co(e)}),this.register(function(e){return new lo(e)}),this.register(function(e){return new uo(e)}),this.register(function(e){return new go(e)}),this.register(function(e){return new po(e)}),this.register(function(e){return new Ao(e)}),this.register(function(e){return new fo(e)}),this.register(function(e){return new co(e)}),this.register(function(e){return new mo(e)}),this.register(function(e){return new bo(e)}),this.register(function(e){return new ro(e)}),this.register(function(e){return new Eo(e)}),this.register(function(e){return new yo(e)})}load(t,e,i,s){const n=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const o=Ve.extractUrlBase(t);r=Ve.resolveURL(o,this.path)}else r=Ve.extractUrlBase(t);this.manager.itemStart(t);const a=function(o){s?s(o):console.error(o),n.manager.itemError(t),n.manager.itemEnd(t)},A=new ne(this.manager);A.setPath(this.path),A.setResponseType("arraybuffer"),A.setRequestHeader(this.requestHeader),A.setWithCredentials(this.withCredentials),A.load(t,function(o){try{n.parse(o,r,function(h){e(h),n.manager.itemEnd(t)},a)}catch(h){a(h)}},i,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,i,s){let n;const r={},a={},A=new TextDecoder;if(typeof t=="string")n=JSON.parse(t);else if(t instanceof ArrayBuffer)if(A.decode(new Uint8Array(t,0,4))===cr){try{r[S.KHR_BINARY_GLTF]=new Qo(t)}catch(c){s&&s(c);return}n=JSON.parse(r[S.KHR_BINARY_GLTF].content)}else n=JSON.parse(A.decode(t));else n=t;if(n.asset===void 0||n.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const o=new No(n,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});o.fileLoader.setRequestHeader(this.requestHeader);for(let h=0;h<this.pluginCallbacks.length;h++){const c=this.pluginCallbacks[h](o);c.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[c.name]=c,r[c.name]=!0}if(n.extensionsUsed)for(let h=0;h<n.extensionsUsed.length;++h){const c=n.extensionsUsed[h],d=n.extensionsRequired||[];switch(c){case S.KHR_MATERIALS_UNLIT:r[c]=new ao;break;case S.KHR_DRACO_MESH_COMPRESSION:r[c]=new xo(n,this.dracoLoader);break;case S.KHR_TEXTURE_TRANSFORM:r[c]=new wo;break;case S.KHR_MESH_QUANTIZATION:r[c]=new Mo;break;default:d.indexOf(c)>=0&&a[c]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+c+'".')}}o.setExtensions(r),o.setPlugins(a),o.parse(i,s)}parseAsync(t,e){const i=this;return new Promise(function(s,n){i.parse(t,e,s,n)})}}function no(){let l={};return{get:function(t){return l[t]},add:function(t,e){l[t]=e},remove:function(t){delete l[t]},removeAll:function(){l={}}}}const S={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ro{constructor(t){this.parser=t,this.name=S.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let i=0,s=e.length;i<s;i++){const n=e[i];n.extensions&&n.extensions[this.name]&&n.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,n.extensions[this.name].light)}}_loadLight(t){const e=this.parser,i="light:"+t;let s=e.cache.get(i);if(s)return s;const n=e.json,A=((n.extensions&&n.extensions[this.name]||{}).lights||[])[t];let o;const h=new H(16777215);A.color!==void 0&&h.setRGB(A.color[0],A.color[1],A.color[2],$);const c=A.range!==void 0?A.range:0;switch(A.type){case"directional":o=new PA(h),o.target.position.set(0,0,-1),o.add(o.target);break;case"point":o=new HA(h),o.distance=c;break;case"spot":o=new vA(h),o.distance=c,A.spot=A.spot||{},A.spot.innerConeAngle=A.spot.innerConeAngle!==void 0?A.spot.innerConeAngle:0,A.spot.outerConeAngle=A.spot.outerConeAngle!==void 0?A.spot.outerConeAngle:Math.PI/4,o.angle=A.spot.outerConeAngle,o.penumbra=1-A.spot.innerConeAngle/A.spot.outerConeAngle,o.target.position.set(0,0,-1),o.add(o.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+A.type)}return o.position.set(0,0,0),mt(o,A),A.intensity!==void 0&&(o.intensity=A.intensity),o.name=e.createUniqueName(A.name||"light_"+t),s=Promise.resolve(o),e.cache.add(i,s),s}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,i=this.parser,n=i.json.nodes[t],a=(n.extensions&&n.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(A){return i._getNodeRef(e.cache,a,A)})}}class ao{constructor(){this.name=S.KHR_MATERIALS_UNLIT}getMaterialType(){return Ie}extendParams(t,e,i){const s=[];t.color=new H(1,1,1),t.opacity=1;const n=e.pbrMetallicRoughness;if(n){if(Array.isArray(n.baseColorFactor)){const r=n.baseColorFactor;t.color.setRGB(r[0],r[1],r[2],$),t.opacity=r[3]}n.baseColorTexture!==void 0&&s.push(i.assignTexture(t,"map",n.baseColorTexture,z))}return Promise.all(s)}}class Ao{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=s.extensions[this.name].emissiveStrength;return n!==void 0&&(e.emissiveIntensity=n),Promise.resolve()}}class oo{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];if(r.clearcoatFactor!==void 0&&(e.clearcoat=r.clearcoatFactor),r.clearcoatTexture!==void 0&&n.push(i.assignTexture(e,"clearcoatMap",r.clearcoatTexture)),r.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=r.clearcoatRoughnessFactor),r.clearcoatRoughnessTexture!==void 0&&n.push(i.assignTexture(e,"clearcoatRoughnessMap",r.clearcoatRoughnessTexture)),r.clearcoatNormalTexture!==void 0&&(n.push(i.assignTexture(e,"clearcoatNormalMap",r.clearcoatNormalTexture)),r.clearcoatNormalTexture.scale!==void 0)){const a=r.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new O(a,a)}return Promise.all(n)}}class ho{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_DISPERSION}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=s.extensions[this.name];return e.dispersion=n.dispersion!==void 0?n.dispersion:0,Promise.resolve()}}class co{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return r.iridescenceFactor!==void 0&&(e.iridescence=r.iridescenceFactor),r.iridescenceTexture!==void 0&&n.push(i.assignTexture(e,"iridescenceMap",r.iridescenceTexture)),r.iridescenceIor!==void 0&&(e.iridescenceIOR=r.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),r.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=r.iridescenceThicknessMinimum),r.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=r.iridescenceThicknessMaximum),r.iridescenceThicknessTexture!==void 0&&n.push(i.assignTexture(e,"iridescenceThicknessMap",r.iridescenceThicknessTexture)),Promise.all(n)}}class lo{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_SHEEN}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[];e.sheenColor=new H(0,0,0),e.sheenRoughness=0,e.sheen=1;const r=s.extensions[this.name];if(r.sheenColorFactor!==void 0){const a=r.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],$)}return r.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=r.sheenRoughnessFactor),r.sheenColorTexture!==void 0&&n.push(i.assignTexture(e,"sheenColorMap",r.sheenColorTexture,z)),r.sheenRoughnessTexture!==void 0&&n.push(i.assignTexture(e,"sheenRoughnessMap",r.sheenRoughnessTexture)),Promise.all(n)}}class uo{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return r.transmissionFactor!==void 0&&(e.transmission=r.transmissionFactor),r.transmissionTexture!==void 0&&n.push(i.assignTexture(e,"transmissionMap",r.transmissionTexture)),Promise.all(n)}}class go{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_VOLUME}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];e.thickness=r.thicknessFactor!==void 0?r.thicknessFactor:0,r.thicknessTexture!==void 0&&n.push(i.assignTexture(e,"thicknessMap",r.thicknessTexture)),e.attenuationDistance=r.attenuationDistance||1/0;const a=r.attenuationColor||[1,1,1];return e.attenuationColor=new H().setRGB(a[0],a[1],a[2],$),Promise.all(n)}}class po{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_IOR}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=s.extensions[this.name];return e.ior=n.ior!==void 0?n.ior:1.5,Promise.resolve()}}class fo{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_SPECULAR}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];e.specularIntensity=r.specularFactor!==void 0?r.specularFactor:1,r.specularTexture!==void 0&&n.push(i.assignTexture(e,"specularIntensityMap",r.specularTexture));const a=r.specularColorFactor||[1,1,1];return e.specularColor=new H().setRGB(a[0],a[1],a[2],$),r.specularColorTexture!==void 0&&n.push(i.assignTexture(e,"specularColorMap",r.specularColorTexture,z)),Promise.all(n)}}class bo{constructor(t){this.parser=t,this.name=S.EXT_MATERIALS_BUMP}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return e.bumpScale=r.bumpFactor!==void 0?r.bumpFactor:1,r.bumpTexture!==void 0&&n.push(i.assignTexture(e,"bumpMap",r.bumpTexture)),Promise.all(n)}}class mo{constructor(t){this.parser=t,this.name=S.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:bt}extendMaterialParams(t,e){const i=this.parser,s=i.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return r.anisotropyStrength!==void 0&&(e.anisotropy=r.anisotropyStrength),r.anisotropyRotation!==void 0&&(e.anisotropyRotation=r.anisotropyRotation),r.anisotropyTexture!==void 0&&n.push(i.assignTexture(e,"anisotropyMap",r.anisotropyTexture)),Promise.all(n)}}class Io{constructor(t){this.parser=t,this.name=S.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,i=e.json,s=i.textures[t];if(!s.extensions||!s.extensions[this.name])return null;const n=s.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,n.source,r)}}class Bo{constructor(t){this.parser=t,this.name=S.EXT_TEXTURE_WEBP}loadTexture(t){const e=this.name,i=this.parser,s=i.json,n=s.textures[t];if(!n.extensions||!n.extensions[e])return null;const r=n.extensions[e],a=s.images[r.source];let A=i.textureLoader;if(a.uri){const o=i.options.manager.getHandler(a.uri);o!==null&&(A=o)}return i.loadTextureImage(t,r.source,A)}}class Co{constructor(t){this.parser=t,this.name=S.EXT_TEXTURE_AVIF}loadTexture(t){const e=this.name,i=this.parser,s=i.json,n=s.textures[t];if(!n.extensions||!n.extensions[e])return null;const r=n.extensions[e],a=s.images[r.source];let A=i.textureLoader;if(a.uri){const o=i.options.manager.getHandler(a.uri);o!==null&&(A=o)}return i.loadTextureImage(t,r.source,A)}}class Eo{constructor(t){this.name=S.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,i=e.bufferViews[t];if(i.extensions&&i.extensions[this.name]){const s=i.extensions[this.name],n=this.parser.getDependency("buffer",s.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return n.then(function(a){const A=s.byteOffset||0,o=s.byteLength||0,h=s.count,c=s.byteStride,d=new Uint8Array(a,A,o);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(h,c,d,s.mode,s.filter).then(function(u){return u.buffer}):r.ready.then(function(){const u=new ArrayBuffer(h*c);return r.decodeGltfBuffer(new Uint8Array(u),h,c,d,s.mode,s.filter),u})})}else return null}}class yo{constructor(t){this.name=S.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,i=e.nodes[t];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const s=e.meshes[i.mesh];for(const o of s.primitives)if(o.mode!==at.TRIANGLES&&o.mode!==at.TRIANGLE_STRIP&&o.mode!==at.TRIANGLE_FAN&&o.mode!==void 0)return null;const r=i.extensions[this.name].attributes,a=[],A={};for(const o in r)a.push(this.parser.getDependency("accessor",r[o]).then(h=>(A[o]=h,A[o])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(o=>{const h=o.pop(),c=h.isGroup?h.children:[h],d=o[0].count,u=[];for(const g of c){const p=new D,b=new C,f=new vt,m=new C(1,1,1),B=new fA(g.geometry,g.material,d);for(let I=0;I<d;I++)A.TRANSLATION&&b.fromBufferAttribute(A.TRANSLATION,I),A.ROTATION&&f.fromBufferAttribute(A.ROTATION,I),A.SCALE&&m.fromBufferAttribute(A.SCALE,I),B.setMatrixAt(I,p.compose(b,f,m));for(const I in A)if(I==="_COLOR_0"){const E=A[I];B.instanceColor=new Bs(E.array,E.itemSize,E.normalized)}else I!=="TRANSLATION"&&I!=="ROTATION"&&I!=="SCALE"&&g.geometry.setAttribute(I,A[I]);v.prototype.copy.call(B,g),this.parser.assignFinalMaterial(B),u.push(B)}return h.isGroup?(h.clear(),h.add(...u),h):u[0]}))}}const cr="glTF",Ke=12,lr={JSON:1313821514,BIN:5130562};class Qo{constructor(t){this.name=S.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,Ke),i=new TextDecoder;if(this.header={magic:i.decode(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==cr)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-Ke,n=new DataView(t,Ke);let r=0;for(;r<s;){const a=n.getUint32(r,!0);r+=4;const A=n.getUint32(r,!0);if(r+=4,A===lr.JSON){const o=new Uint8Array(t,Ke+r,a);this.content=i.decode(o)}else if(A===lr.BIN){const o=Ke+r;this.body=t.slice(o,o+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class xo{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=S.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const i=this.json,s=this.dracoLoader,n=t.extensions[this.name].bufferView,r=t.extensions[this.name].attributes,a={},A={},o={};for(const h in r){const c=Rs[h]||h.toLowerCase();a[c]=r[h]}for(const h in t.attributes){const c=Rs[h]||h.toLowerCase();if(r[h]!==void 0){const d=i.accessors[t.attributes[h]],u=Fe[d.componentType];o[c]=u.name,A[c]=d.normalized===!0}}return e.getDependency("bufferView",n).then(function(h){return new Promise(function(c,d){s.decodeDracoFile(h,function(u){for(const g in u.attributes){const p=u.attributes[g],b=A[g];b!==void 0&&(p.normalized=b)}c(u)},a,o,$,d)})})}}class wo{constructor(){this.name=S.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class Mo{constructor(){this.name=S.KHR_MESH_QUANTIZATION}}class dr extends Je{constructor(t,e,i,s){super(t,e,i,s)}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,s=this.valueSize,n=t*s*3+s;for(let r=0;r!==s;r++)e[r]=i[n+r];return e}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,A=a*2,o=a*3,h=s-e,c=(i-e)/h,d=c*c,u=d*c,g=t*o,p=g-o,b=-2*u+3*d,f=u-d,m=1-b,B=f-d+c;for(let I=0;I!==a;I++){const E=r[p+I+a],Q=r[p+I+A]*h,y=r[g+I+a],x=r[g+I]*h;n[I]=m*E+B*Q+b*y+f*x}return n}}const So=new vt;class Fo extends dr{interpolate_(t,e,i,s){const n=super.interpolate_(t,e,i,s);return So.fromArray(n).normalize().toArray(n),n}}const at={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Fe={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ur={9728:Gt,9729:Nt,9984:sn,9985:la,9986:ca,9987:_e},gr={33071:Yt,33648:Ri,10497:De},Ts={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Rs={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Kt={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},ko={CUBICSPLINE:void 0,LINEAR:Le,STEP:Re},Ls={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Do(l){return l.DefaultMaterial===void 0&&(l.DefaultMaterial=new xs({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Xe})),l.DefaultMaterial}function re(l,t,e){for(const i in e.extensions)l[i]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[i]=e.extensions[i])}function mt(l,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(l.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function _o(l,t,e){let i=!1,s=!1,n=!1;for(let o=0,h=t.length;o<h;o++){const c=t[o];if(c.POSITION!==void 0&&(i=!0),c.NORMAL!==void 0&&(s=!0),c.COLOR_0!==void 0&&(n=!0),i&&s&&n)break}if(!i&&!s&&!n)return Promise.resolve(l);const r=[],a=[],A=[];for(let o=0,h=t.length;o<h;o++){const c=t[o];if(i){const d=c.POSITION!==void 0?e.getDependency("accessor",c.POSITION):l.attributes.position;r.push(d)}if(s){const d=c.NORMAL!==void 0?e.getDependency("accessor",c.NORMAL):l.attributes.normal;a.push(d)}if(n){const d=c.COLOR_0!==void 0?e.getDependency("accessor",c.COLOR_0):l.attributes.color;A.push(d)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(A)]).then(function(o){const h=o[0],c=o[1],d=o[2];return i&&(l.morphAttributes.position=h),s&&(l.morphAttributes.normal=c),n&&(l.morphAttributes.color=d),l.morphTargetsRelative=!0,l})}function To(l,t){if(l.updateMorphTargets(),t.weights!==void 0)for(let e=0,i=t.weights.length;e<i;e++)l.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(l.morphTargetInfluences.length===e.length){l.morphTargetDictionary={};for(let i=0,s=e.length;i<s;i++)l.morphTargetDictionary[e[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Ro(l){let t;const e=l.extensions&&l.extensions[S.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+Gs(e.attributes):t=l.indices+":"+Gs(l.attributes)+":"+l.mode,l.targets!==void 0)for(let i=0,s=l.targets.length;i<s;i++)t+=":"+Gs(l.targets[i]);return t}function Gs(l){let t="";const e=Object.keys(l).sort();for(let i=0,s=e.length;i<s;i++)t+=e[i]+":"+l[e[i]]+";";return t}function Ns(l){switch(l){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Lo(l){return l.search(/\.jpe?g($|\?)/i)>0||l.search(/^data\:image\/jpeg/)===0?"image/jpeg":l.search(/\.webp($|\?)/i)>0||l.search(/^data\:image\/webp/)===0?"image/webp":l.search(/\.ktx2($|\?)/i)>0||l.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const Go=new D;class No{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new no,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,s=-1,n=!1,r=-1;if(typeof navigator<"u"){const a=navigator.userAgent;i=/^((?!chrome|android).)*safari/i.test(a)===!0;const A=a.match(/Version\/(\d+)/);s=i&&A?parseInt(A[1],10):-1,n=a.indexOf("Firefox")>-1,r=n?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||i&&s<17||n&&r<98?this.textureLoader=new UA(this.options.manager):this.textureLoader=new jA(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ne(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const i=this,s=this.json,n=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(r){const a={scene:r[0][s.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:s.asset,parser:i,userData:{}};return re(n,a,s),mt(a,s),Promise.all(i._invokeAll(function(A){return A.afterRoot&&A.afterRoot(a)})).then(function(){for(const A of a.scenes)A.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],i=this.json.meshes||[];for(let s=0,n=e.length;s<n;s++){const r=e[s].joints;for(let a=0,A=r.length;a<A;a++)t[r[a]].isBone=!0}for(let s=0,n=t.length;s<n;s++){const r=t[s];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(i[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,i){if(t.refs[e]<=1)return i;const s=i.clone(),n=(r,a)=>{const A=this.associations.get(r);A!=null&&this.associations.set(a,A);for(const[o,h]of r.children.entries())n(h,a.children[o])};return n(i,s),s.name+="_instance_"+t.uses[e]++,s}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let i=0;i<e.length;i++){const s=t(e[i]);if(s)return s}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const i=[];for(let s=0;s<e.length;s++){const n=t(e[s]);n&&i.push(n)}return i}getDependency(t,e){const i=t+":"+e;let s=this.cache.get(i);if(!s){switch(t){case"scene":s=this.loadScene(e);break;case"node":s=this._invokeOne(function(n){return n.loadNode&&n.loadNode(e)});break;case"mesh":s=this._invokeOne(function(n){return n.loadMesh&&n.loadMesh(e)});break;case"accessor":s=this.loadAccessor(e);break;case"bufferView":s=this._invokeOne(function(n){return n.loadBufferView&&n.loadBufferView(e)});break;case"buffer":s=this.loadBuffer(e);break;case"material":s=this._invokeOne(function(n){return n.loadMaterial&&n.loadMaterial(e)});break;case"texture":s=this._invokeOne(function(n){return n.loadTexture&&n.loadTexture(e)});break;case"skin":s=this.loadSkin(e);break;case"animation":s=this._invokeOne(function(n){return n.loadAnimation&&n.loadAnimation(e)});break;case"camera":s=this.loadCamera(e);break;default:if(s=this._invokeOne(function(n){return n!=this&&n.getDependency&&n.getDependency(t,e)}),!s)throw new Error("Unknown type: "+t);break}this.cache.add(i,s)}return s}getDependencies(t){let e=this.cache.get(t);if(!e){const i=this,s=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(s.map(function(n,r){return i.getDependency(t,r)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],i=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[S.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(n,r){i.load(Ve.resolveURL(e.uri,s.path),n,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(i){const s=e.byteLength||0,n=e.byteOffset||0;return i.slice(n,n+s)})}loadAccessor(t){const e=this,i=this.json,s=this.json.accessors[t];if(s.bufferView===void 0&&s.sparse===void 0){const r=Ts[s.type],a=Fe[s.componentType],A=s.normalized===!0,o=new a(s.count*r);return Promise.resolve(new it(o,r,A))}const n=[];return s.bufferView!==void 0?n.push(this.getDependency("bufferView",s.bufferView)):n.push(null),s.sparse!==void 0&&(n.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),n.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(n).then(function(r){const a=r[0],A=Ts[s.type],o=Fe[s.componentType],h=o.BYTES_PER_ELEMENT,c=h*A,d=s.byteOffset||0,u=s.bufferView!==void 0?i.bufferViews[s.bufferView].byteStride:void 0,g=s.normalized===!0;let p,b;if(u&&u!==c){const f=Math.floor(d/u),m="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+f+":"+s.count;let B=e.cache.get(m);B||(p=new o(a,f*u,s.count*u/h),B=new zn(p,u/h),e.cache.add(m,B)),b=new Ii(B,A,d%u/h,g)}else a===null?p=new o(s.count*A):p=new o(a,d,s.count*A),b=new it(p,A,g);if(s.sparse!==void 0){const f=Ts.SCALAR,m=Fe[s.sparse.indices.componentType],B=s.sparse.indices.byteOffset||0,I=s.sparse.values.byteOffset||0,E=new m(r[1],B,s.sparse.count*f),Q=new o(r[2],I,s.sparse.count*A);a!==null&&(b=new it(b.array.slice(),b.itemSize,b.normalized)),b.normalized=!1;for(let y=0,x=E.length;y<x;y++){const F=E[y];if(b.setX(F,Q[y*A]),A>=2&&b.setY(F,Q[y*A+1]),A>=3&&b.setZ(F,Q[y*A+2]),A>=4&&b.setW(F,Q[y*A+3]),A>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}b.normalized=g}return b})}loadTexture(t){const e=this.json,i=this.options,n=e.textures[t].source,r=e.images[n];let a=this.textureLoader;if(r.uri){const A=i.manager.getHandler(r.uri);A!==null&&(a=A)}return this.loadTextureImage(t,n,a)}loadTextureImage(t,e,i){const s=this,n=this.json,r=n.textures[t],a=n.images[e],A=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[A])return this.textureCache[A];const o=this.loadImageSource(e,i).then(function(h){h.flipY=!1,h.name=r.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);const d=(n.samplers||{})[r.sampler]||{};return h.magFilter=ur[d.magFilter]||Nt,h.minFilter=ur[d.minFilter]||_e,h.wrapS=gr[d.wrapS]||De,h.wrapT=gr[d.wrapT]||De,h.generateMipmaps=!h.isCompressedTexture&&h.minFilter!==Gt&&h.minFilter!==Nt,s.associations.set(h,{textures:t}),h}).catch(function(){return null});return this.textureCache[A]=o,o}loadImageSource(t,e){const i=this,s=this.json,n=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(c=>c.clone());const r=s.images[t],a=self.URL||self.webkitURL;let A=r.uri||"",o=!1;if(r.bufferView!==void 0)A=i.getDependency("bufferView",r.bufferView).then(function(c){o=!0;const d=new Blob([c],{type:r.mimeType});return A=a.createObjectURL(d),A});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const h=Promise.resolve(A).then(function(c){return new Promise(function(d,u){let g=d;e.isImageBitmapLoader===!0&&(g=function(p){const b=new tt(p);b.needsUpdate=!0,d(b)}),e.load(Ve.resolveURL(c,n.path),g,void 0,u)})}).then(function(c){return o===!0&&a.revokeObjectURL(A),mt(c,r),c.userData.mimeType=r.mimeType||Lo(r.uri),c}).catch(function(c){throw console.error("THREE.GLTFLoader: Couldn't load texture",A),c});return this.sourceCache[t]=h,h}assignTexture(t,e,i,s){const n=this;return this.getDependency("texture",i.index).then(function(r){if(!r)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(r=r.clone(),r.channel=i.texCoord),n.extensions[S.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[S.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const A=n.associations.get(r);r=n.extensions[S.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),n.associations.set(r,A)}}return s!==void 0&&(r.colorSpace=s),t[e]=r,r})}assignFinalMaterial(t){const e=t.geometry;let i=t.material;const s=e.attributes.tangent===void 0,n=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+i.uuid;let A=this.cache.get(a);A||(A=new tr,te.prototype.copy.call(A,i),A.color.copy(i.color),A.map=i.map,A.sizeAttenuation=!1,this.cache.add(a,A)),i=A}else if(t.isLine){const a="LineBasicMaterial:"+i.uuid;let A=this.cache.get(a);A||(A=new Yn,te.prototype.copy.call(A,i),A.color.copy(i.color),A.map=i.map,this.cache.add(a,A)),i=A}if(s||n||r){let a="ClonedMaterial:"+i.uuid+":";s&&(a+="derivative-tangents:"),n&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let A=this.cache.get(a);A||(A=i.clone(),n&&(A.vertexColors=!0),r&&(A.flatShading=!0),s&&(A.normalScale&&(A.normalScale.y*=-1),A.clearcoatNormalScale&&(A.clearcoatNormalScale.y*=-1)),this.cache.add(a,A),this.associations.set(A,this.associations.get(i))),i=A}t.material=i}getMaterialType(){return xs}loadMaterial(t){const e=this,i=this.json,s=this.extensions,n=i.materials[t];let r;const a={},A=n.extensions||{},o=[];if(A[S.KHR_MATERIALS_UNLIT]){const c=s[S.KHR_MATERIALS_UNLIT];r=c.getMaterialType(),o.push(c.extendParams(a,n,e))}else{const c=n.pbrMetallicRoughness||{};if(a.color=new H(1,1,1),a.opacity=1,Array.isArray(c.baseColorFactor)){const d=c.baseColorFactor;a.color.setRGB(d[0],d[1],d[2],$),a.opacity=d[3]}c.baseColorTexture!==void 0&&o.push(e.assignTexture(a,"map",c.baseColorTexture,z)),a.metalness=c.metallicFactor!==void 0?c.metallicFactor:1,a.roughness=c.roughnessFactor!==void 0?c.roughnessFactor:1,c.metallicRoughnessTexture!==void 0&&(o.push(e.assignTexture(a,"metalnessMap",c.metallicRoughnessTexture)),o.push(e.assignTexture(a,"roughnessMap",c.metallicRoughnessTexture))),r=this._invokeOne(function(d){return d.getMaterialType&&d.getMaterialType(t)}),o.push(Promise.all(this._invokeAll(function(d){return d.extendMaterialParams&&d.extendMaterialParams(t,a)})))}n.doubleSided===!0&&(a.side=aa);const h=n.alphaMode||Ls.OPAQUE;if(h===Ls.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===Ls.MASK&&(a.alphaTest=n.alphaCutoff!==void 0?n.alphaCutoff:.5)),n.normalTexture!==void 0&&r!==Ie&&(o.push(e.assignTexture(a,"normalMap",n.normalTexture)),a.normalScale=new O(1,1),n.normalTexture.scale!==void 0)){const c=n.normalTexture.scale;a.normalScale.set(c,c)}if(n.occlusionTexture!==void 0&&r!==Ie&&(o.push(e.assignTexture(a,"aoMap",n.occlusionTexture)),n.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=n.occlusionTexture.strength)),n.emissiveFactor!==void 0&&r!==Ie){const c=n.emissiveFactor;a.emissive=new H().setRGB(c[0],c[1],c[2],$)}return n.emissiveTexture!==void 0&&r!==Ie&&o.push(e.assignTexture(a,"emissiveMap",n.emissiveTexture,z)),Promise.all(o).then(function(){const c=new r(a);return n.name&&(c.name=n.name),mt(c,n),e.associations.set(c,{materials:t}),n.extensions&&re(s,c,n),c})}createUniqueName(t){const e=R.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,i=this.extensions,s=this.primitiveCache;function n(a){return i[S.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(A){return pr(A,a,e)})}const r=[];for(let a=0,A=t.length;a<A;a++){const o=t[a],h=Ro(o),c=s[h];if(c)r.push(c.promise);else{let d;o.extensions&&o.extensions[S.KHR_DRACO_MESH_COMPRESSION]?d=n(o):d=pr(new ee,o,e),s[h]={primitive:o,promise:d},r.push(d)}}return Promise.all(r)}loadMesh(t){const e=this,i=this.json,s=this.extensions,n=i.meshes[t],r=n.primitives,a=[];for(let A=0,o=r.length;A<o;A++){const h=r[A].material===void 0?Do(this.cache):this.getDependency("material",r[A].material);a.push(h)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(A){const o=A.slice(0,A.length-1),h=A[A.length-1],c=[];for(let u=0,g=h.length;u<g;u++){const p=h[u],b=r[u];let f;const m=o[u];if(b.mode===at.TRIANGLES||b.mode===at.TRIANGLE_STRIP||b.mode===at.TRIANGLE_FAN||b.mode===void 0)f=n.isSkinnedMesh===!0?new uA(p,m):new bi(p,m),f.isSkinnedMesh===!0&&f.normalizeSkinWeights(),b.mode===at.TRIANGLE_STRIP?f.geometry=hr(f.geometry,gn):b.mode===at.TRIANGLE_FAN&&(f.geometry=hr(f.geometry,Oi));else if(b.mode===at.LINES)f=new CA(p,m);else if(b.mode===at.LINE_STRIP)f=new ys(p,m);else if(b.mode===at.LINE_LOOP)f=new EA(p,m);else if(b.mode===at.POINTS)f=new yA(p,m);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+b.mode);Object.keys(f.geometry.morphAttributes).length>0&&To(f,n),f.name=e.createUniqueName(n.name||"mesh_"+t),mt(f,n),b.extensions&&re(s,f,b),e.assignFinalMaterial(f),c.push(f)}for(let u=0,g=c.length;u<g;u++)e.associations.set(c[u],{meshes:t,primitives:u});if(c.length===1)return n.extensions&&re(s,c[0],n),c[0];const d=new ps;n.extensions&&re(s,d,n),e.associations.set(d,{meshes:t});for(let u=0,g=c.length;u<g;u++)d.add(c[u]);return d})}loadCamera(t){let e;const i=this.json.cameras[t],s=i[i.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?e=new gs(ja.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):i.type==="orthographic"&&(e=new or(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),i.name&&(e.name=this.createUniqueName(i.name)),mt(e,i),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],i=[];for(let s=0,n=e.joints.length;s<n;s++)i.push(this._loadNodeShallow(e.joints[s]));return e.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",e.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(s){const n=s.pop(),r=s,a=[],A=[];for(let o=0,h=r.length;o<h;o++){const c=r[o];if(c){a.push(c);const d=new D;n!==null&&d.fromArray(n.array,o*16),A.push(d)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[o])}return new Is(a,A)})}loadAnimation(t){const e=this.json,i=this,s=e.animations[t],n=s.name?s.name:"animation_"+t,r=[],a=[],A=[],o=[],h=[];for(let c=0,d=s.channels.length;c<d;c++){const u=s.channels[c],g=s.samplers[u.sampler],p=u.target,b=p.node,f=s.parameters!==void 0?s.parameters[g.input]:g.input,m=s.parameters!==void 0?s.parameters[g.output]:g.output;p.node!==void 0&&(r.push(this.getDependency("node",b)),a.push(this.getDependency("accessor",f)),A.push(this.getDependency("accessor",m)),o.push(g),h.push(p))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(A),Promise.all(o),Promise.all(h)]).then(function(c){const d=c[0],u=c[1],g=c[2],p=c[3],b=c[4],f=[];for(let B=0,I=d.length;B<I;B++){const E=d[B],Q=u[B],y=g[B],x=p[B],F=b[B];if(E===void 0)continue;E.updateMatrix&&E.updateMatrix();const w=i._createAnimationTracks(E,Q,y,x,F);if(w)for(let _=0;_<w.length;_++)f.push(w[_])}const m=new DA(n,void 0,f);return mt(m,s),m})}createNodeMesh(t){const e=this.json,i=this,s=e.nodes[t];return s.mesh===void 0?null:i.getDependency("mesh",s.mesh).then(function(n){const r=i._getNodeRef(i.meshCache,s.mesh,n);return s.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let A=0,o=s.weights.length;A<o;A++)a.morphTargetInfluences[A]=s.weights[A]}),r})}loadNode(t){const e=this.json,i=this,s=e.nodes[t],n=i._loadNodeShallow(t),r=[],a=s.children||[];for(let o=0,h=a.length;o<h;o++)r.push(i.getDependency("node",a[o]));const A=s.skin===void 0?Promise.resolve(null):i.getDependency("skin",s.skin);return Promise.all([n,Promise.all(r),A]).then(function(o){const h=o[0],c=o[1],d=o[2];d!==null&&h.traverse(function(u){u.isSkinnedMesh&&u.bind(d,Go)});for(let u=0,g=c.length;u<g;u++)h.add(c[u]);return h})}_loadNodeShallow(t){const e=this.json,i=this.extensions,s=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const n=e.nodes[t],r=n.name?s.createUniqueName(n.name):"",a=[],A=s._invokeOne(function(o){return o.createNodeMesh&&o.createNodeMesh(t)});return A&&a.push(A),n.camera!==void 0&&a.push(s.getDependency("camera",n.camera).then(function(o){return s._getNodeRef(s.cameraCache,n.camera,o)})),s._invokeAll(function(o){return o.createNodeAttachment&&o.createNodeAttachment(t)}).forEach(function(o){a.push(o)}),this.nodeCache[t]=Promise.all(a).then(function(o){let h;if(n.isBone===!0?h=new jn:o.length>1?h=new ps:o.length===1?h=o[0]:h=new v,h!==o[0])for(let c=0,d=o.length;c<d;c++)h.add(o[c]);if(n.name&&(h.userData.name=n.name,h.name=r),mt(h,n),n.extensions&&re(i,h,n),n.matrix!==void 0){const c=new D;c.fromArray(n.matrix),h.applyMatrix4(c)}else n.translation!==void 0&&h.position.fromArray(n.translation),n.rotation!==void 0&&h.quaternion.fromArray(n.rotation),n.scale!==void 0&&h.scale.fromArray(n.scale);if(!s.associations.has(h))s.associations.set(h,{});else if(n.mesh!==void 0&&s.meshCache.refs[n.mesh]>1){const c=s.associations.get(h);s.associations.set(h,{...c})}return s.associations.get(h).nodes=t,h}),this.nodeCache[t]}loadScene(t){const e=this.extensions,i=this.json.scenes[t],s=this,n=new ps;i.name&&(n.name=s.createUniqueName(i.name)),mt(n,i),i.extensions&&re(e,n,i);const r=i.nodes||[],a=[];for(let A=0,o=r.length;A<o;A++)a.push(s.getDependency("node",r[A]));return Promise.all(a).then(function(A){for(let h=0,c=A.length;h<c;h++)n.add(A[h]);const o=h=>{const c=new Map;for(const[d,u]of s.associations)(d instanceof te||d instanceof tt)&&c.set(d,u);return h.traverse(d=>{const u=s.associations.get(d);u!=null&&c.set(d,u)}),c};return s.associations=o(n),n})}_createAnimationTracks(t,e,i,s,n){const r=[],a=t.name?t.name:t.uuid,A=[];Kt[n.path]===Kt.weights?t.traverse(function(d){d.morphTargetInfluences&&A.push(d.name?d.name:d.uuid)}):A.push(a);let o;switch(Kt[n.path]){case Kt.weights:o=Qe;break;case Kt.rotation:o=xe;break;case Kt.translation:case Kt.scale:o=Me;break;default:switch(i.itemSize){case 1:o=Qe;break;case 2:case 3:default:o=Me;break}break}const h=s.interpolation!==void 0?ko[s.interpolation]:Le,c=this._getArrayFromAccessor(i);for(let d=0,u=A.length;d<u;d++){const g=new o(A[d]+"."+Kt[n.path],e.array,c,h);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(g),r.push(g)}return r}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const i=Ns(e.constructor),s=new Float32Array(e.length);for(let n=0,r=e.length;n<r;n++)s[n]=e[n]*i;e=s}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(i){const s=this instanceof xe?Fo:dr;return new s(this.times,this.values,this.getValueSize()/3,i)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Uo(l,t,e){const i=t.attributes,s=new xt;if(i.POSITION!==void 0){const a=e.json.accessors[i.POSITION],A=a.min,o=a.max;if(A!==void 0&&o!==void 0){if(s.set(new C(A[0],A[1],A[2]),new C(o[0],o[1],o[2])),a.normalized){const h=Ns(Fe[a.componentType]);s.min.multiplyScalar(h),s.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const n=t.targets;if(n!==void 0){const a=new C,A=new C;for(let o=0,h=n.length;o<h;o++){const c=n[o];if(c.POSITION!==void 0){const d=e.json.accessors[c.POSITION],u=d.min,g=d.max;if(u!==void 0&&g!==void 0){if(A.setX(Math.max(Math.abs(u[0]),Math.abs(g[0]))),A.setY(Math.max(Math.abs(u[1]),Math.abs(g[1]))),A.setZ(Math.max(Math.abs(u[2]),Math.abs(g[2]))),d.normalized){const p=Ns(Fe[d.componentType]);A.multiplyScalar(p)}a.max(A)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(a)}l.boundingBox=s;const r=new ft;s.getCenter(r.center),r.radius=s.min.distanceTo(s.max)/2,l.boundingSphere=r}function pr(l,t,e){const i=t.attributes,s=[];function n(r,a){return e.getDependency("accessor",r).then(function(A){l.setAttribute(a,A)})}for(const r in i){const a=Rs[r]||r.toLowerCase();a in l.attributes||s.push(n(i[r],a))}if(t.indices!==void 0&&!l.index){const r=e.getDependency("accessor",t.indices).then(function(a){l.setIndex(a)});s.push(r)}return W.workingColorSpace!==$&&"COLOR_0"in i&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${W.workingColorSpace}" not supported.`),mt(l,t),Uo(l,t,e),Promise.all(s).then(function(){return t.targets!==void 0?_o(l,t.targets,e):l})}class zo{constructor(t=4){this.pool=t,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0,this.workerCreator=null}_initWorker(t){if(!this.workers[t]){const e=this.workerCreator();e.addEventListener("message",this._onMessage.bind(this,t)),this.workers[t]=e}}_getIdleWorker(){for(let t=0;t<this.pool;t++)if(!(this.workerStatus&1<<t))return t;return-1}_onMessage(t,e){const i=this.workersResolve[t];if(i&&i(e),this.queue.length){const{resolve:s,msg:n,transfer:r}=this.queue.shift();this.workersResolve[t]=s,this.workers[t].postMessage(n,r)}else this.workerStatus^=1<<t}setWorkerCreator(t){this.workerCreator=t}setWorkerLimit(t){this.pool=t}postMessage(t,e){return new Promise(i=>{const s=this._getIdleWorker();s!==-1?(this._initWorker(s),this.workerStatus|=1<<s,this.workersResolve[s]=i,this.workers[s].postMessage(t,e)):this.queue.push({resolve:i,msg:t,transfer:e})})}dispose(){this.workers.forEach(t=>t.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const vo=0,fr=2,Oo=1,br=2,Ho=0,qo=1,Po=10,jo=0,mr=9,Ir=15,Br=16,Cr=22,Er=37,yr=43,Qr=76,xr=83,wr=97,Mr=100,Sr=103,Fr=109,kr=122,Dr=123,_r=131,Tr=132,Rr=133,Lr=134,Gr=137,Nr=138,Ur=139,zr=140,vr=141,Or=142,Hr=145,qr=146,Pr=148,jr=152,Us=153,Jo=154,zs=155,Vo=156,Jr=157,Vr=158,Kr=165,Yr=166,Wr=1000054e3,Xr=1000054001,Zr=1000054004,$r=1000054005,vs=1000066e3,ta=1000066004;class Ye{constructor(t,e,i,s){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(t.buffer,t.byteOffset+e,i),this._littleEndian=s,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint8Array(t){const e=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,t);return this._offset+=t,e}_skip(t){return this._offset+=t,this}_scan(t,e=0){const i=this._offset;let s=0;for(;this._dataView.getUint8(this._offset)!==e&&s<t;)s++,this._offset++;return s<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+i,s)}}const Z=[171,75,84,88,32,50,48,187,13,10,26,10];function ea(l){return new TextDecoder().decode(l)}function Ko(l){const t=new Uint8Array(l.buffer,l.byteOffset,Z.length);if(t[0]!==Z[0]||t[1]!==Z[1]||t[2]!==Z[2]||t[3]!==Z[3]||t[4]!==Z[4]||t[5]!==Z[5]||t[6]!==Z[6]||t[7]!==Z[7]||t[8]!==Z[8]||t[9]!==Z[9]||t[10]!==Z[10]||t[11]!==Z[11])throw new Error("Missing KTX 2.0 identifier.");const e={vkFormat:0,typeSize:1,pixelWidth:0,pixelHeight:0,pixelDepth:0,layerCount:0,faceCount:1,levelCount:0,supercompressionScheme:0,levels:[],dataFormatDescriptor:[{vendorId:0,descriptorType:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],keyValue:{},globalData:null},i=17*Uint32Array.BYTES_PER_ELEMENT,s=new Ye(l,Z.length,i,!0);e.vkFormat=s._nextUint32(),e.typeSize=s._nextUint32(),e.pixelWidth=s._nextUint32(),e.pixelHeight=s._nextUint32(),e.pixelDepth=s._nextUint32(),e.layerCount=s._nextUint32(),e.faceCount=s._nextUint32(),e.levelCount=s._nextUint32(),e.supercompressionScheme=s._nextUint32();const n=s._nextUint32(),r=s._nextUint32(),a=s._nextUint32(),A=s._nextUint32(),o=s._nextUint64(),h=s._nextUint64(),c=3*Math.max(e.levelCount,1)*8,d=new Ye(l,Z.length+i,c,!0);for(let N=0,P=Math.max(e.levelCount,1);N<P;N++)e.levels.push({levelData:new Uint8Array(l.buffer,l.byteOffset+d._nextUint64(),d._nextUint64()),uncompressedByteLength:d._nextUint64()});const u=new Ye(l,n,r,!0);u._skip(4);const g=u._nextUint16(),p=u._nextUint16(),b=u._nextUint16(),f=u._nextUint16(),m={vendorId:g,descriptorType:p,versionNumber:b,colorModel:u._nextUint8(),colorPrimaries:u._nextUint8(),transferFunction:u._nextUint8(),flags:u._nextUint8(),texelBlockDimension:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],bytesPlane:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],samples:[]},B=(f/4-6)/4;for(let N=0;N<B;N++){const P={bitOffset:u._nextUint16(),bitLength:u._nextUint8(),channelType:u._nextUint8(),samplePosition:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],sampleLower:Number.NEGATIVE_INFINITY,sampleUpper:Number.POSITIVE_INFINITY};64&P.channelType?(P.sampleLower=u._nextInt32(),P.sampleUpper=u._nextInt32()):(P.sampleLower=u._nextUint32(),P.sampleUpper=u._nextUint32()),m.samples[N]=P}e.dataFormatDescriptor.length=0,e.dataFormatDescriptor.push(m);const I=new Ye(l,a,A,!0);for(;I._offset<A;){const N=I._nextUint32(),P=I._scan(N),pt=ea(P);if(e.keyValue[pt]=I._nextUint8Array(N-P.byteLength-1),pt.match(/^ktx/i)){const Ti=ea(e.keyValue[pt]);e.keyValue[pt]=Ti.substring(0,Ti.lastIndexOf("\0"))}I._skip(N%4?4-N%4:0)}if(h<=0)return e;const E=new Ye(l,o,h,!0),Q=E._nextUint16(),y=E._nextUint16(),x=E._nextUint32(),F=E._nextUint32(),w=E._nextUint32(),_=E._nextUint32(),J=[];for(let N=0,P=Math.max(e.levelCount,1);N<P;N++)J.push({imageFlags:E._nextUint32(),rgbSliceByteOffset:E._nextUint32(),rgbSliceByteLength:E._nextUint32(),alphaSliceByteOffset:E._nextUint32(),alphaSliceByteLength:E._nextUint32()});const G=o+E._offset,V=G+x,It=V+F,nt=It+w,Rt=new Uint8Array(l.buffer,l.byteOffset+G,x),Bt=new Uint8Array(l.buffer,l.byteOffset+V,F),Ct=new Uint8Array(l.buffer,l.byteOffset+It,w),Lt=new Uint8Array(l.buffer,l.byteOffset+nt,_);return e.globalData={endpointCount:Q,selectorCount:y,imageDescs:J,endpointsData:Rt,selectorsData:Bt,tablesData:Ct,extendedData:Lt},e}let Os,Tt,Hs;const qs={env:{emscripten_notify_memory_growth:function(l){Hs=new Uint8Array(Tt.exports.memory.buffer)}}};class Yo{init(){return Os||(Os=typeof fetch<"u"?fetch("data:application/wasm;base64,"+ia).then(t=>t.arrayBuffer()).then(t=>WebAssembly.instantiate(t,qs)).then(this._init):WebAssembly.instantiate(Buffer.from(ia,"base64"),qs).then(this._init),Os)}_init(t){Tt=t.instance,qs.env.emscripten_notify_memory_growth(0)}decode(t,e=0){if(!Tt)throw new Error("ZSTDDecoder: Await .init() before decoding.");const i=t.byteLength,s=Tt.exports.malloc(i);Hs.set(t,s),e=e||Number(Tt.exports.ZSTD_findDecompressedSize(s,i));const n=Tt.exports.malloc(e),r=Tt.exports.ZSTD_decompress(n,e,s,i),a=Hs.slice(n,n+r);return Tt.exports.free(s),Tt.exports.free(n),a}}const ia="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggAC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IAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFk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EoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIo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QBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBi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tCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABa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AAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",Wo="display-p3",Xo="display-p3-linear";({...W.spaces[z]});const Ps=new WeakMap;let js=0,Js;class At extends Vt{constructor(t){super(t),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new zo,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(t){return this.transcoderPath=t,this}setWorkerLimit(t){return this.workerPool.setWorkerLimit(t),this}async detectSupportAsync(t){return console.warn('KTX2Loader: "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.'),await t.init(),this.detectSupport(t)}detectSupport(t){return t.isWebGPURenderer===!0?this.workerConfig={astcSupported:t.hasFeature("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:t.hasFeature("texture-compression-etc1"),etc2Supported:t.hasFeature("texture-compression-etc2"),dxtSupported:t.hasFeature("texture-compression-s3tc"),bptcSupported:t.hasFeature("texture-compression-bc"),pvrtcSupported:t.hasFeature("texture-compression-pvrtc")}:(this.workerConfig={astcSupported:t.extensions.has("WEBGL_compressed_texture_astc"),astcHDRSupported:t.extensions.has("WEBGL_compressed_texture_astc")&&t.extensions.get("WEBGL_compressed_texture_astc").getSupportedProfiles().includes("hdr"),etc1Supported:t.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:t.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:t.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:t.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:t.extensions.has("WEBGL_compressed_texture_pvrtc")||t.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},typeof navigator<"u"&&navigator.platform.indexOf("Linux")>=0&&navigator.userAgent.indexOf("Firefox")>=0&&this.workerConfig.astcSupported&&this.workerConfig.etc2Supported&&this.workerConfig.bptcSupported&&this.workerConfig.dxtSupported&&(this.workerConfig.astcSupported=!1,this.workerConfig.etc2Supported=!1)),this}init(){if(!this.transcoderPending){const t=new ne(this.manager);t.setPath(this.transcoderPath),t.setWithCredentials(this.withCredentials);const e=t.loadAsync("basis_transcoder.js"),i=new ne(this.manager);i.setPath(this.transcoderPath),i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials);const s=i.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([e,s]).then(([n,r])=>{const a=At.BasisWorker.toString(),A=["/* constants */","let _EngineFormat = "+JSON.stringify(At.EngineFormat),"let _EngineType = "+JSON.stringify(At.EngineType),"let _TranscoderFormat = "+JSON.stringify(At.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(At.BasisFormat),"/* basis_transcoder.js */",n,"/* worker */",a.substring(a.indexOf("{")+1,a.lastIndexOf("}"))].join(`
|
|
7
|
+
`);this.workerSourceURL=URL.createObjectURL(new Blob([A])),this.transcoderBinary=r,this.workerPool.setWorkerCreator(()=>{const o=new Worker(this.workerSourceURL),h=this.transcoderBinary.slice(0);return o.postMessage({type:"init",config:this.workerConfig,transcoderBinary:h},[h]),o})}),js>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),js++}return this.transcoderPending}load(t,e,i,s){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const n=new ne(this.manager);n.setPath(this.path),n.setCrossOrigin(this.crossOrigin),n.setWithCredentials(this.withCredentials),n.setRequestHeader(this.requestHeader),n.setResponseType("arraybuffer"),n.load(t,r=>{this.parse(r,e,s)},i,s)}parse(t,e,i){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(Ps.has(t))return Ps.get(t).promise.then(e).catch(i);this._createTexture(t).then(s=>e?e(s):null).catch(i)}_createTextureFrom(t,e){const{type:i,error:s,data:{faces:n,width:r,height:a,format:A,type:o,dfdFlags:h}}=t;if(i==="error")return Promise.reject(s);let c;if(e.faceCount===6)c=new xA(n,A,o);else{const d=n[0].mipmaps;c=e.layerCount>1?new QA(d,r,a,e.layerCount,A,o):new Fi(d,r,a,A,o)}return c.minFilter=n[0].mipmaps.length===1?Nt:_e,c.magFilter=Nt,c.generateMipmaps=!1,c.needsUpdate=!0,c.colorSpace=sa(e),c.premultiplyAlpha=!!(h&Oo),c}async _createTexture(t,e={}){const i=Ko(new Uint8Array(t)),s=i.vkFormat===vs&&i.dataFormatDescriptor[0].colorModel===167;if(!(i.vkFormat===jo||s&&!this.workerConfig.astcHDRSupported))return $o(i);const r=e,a=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:t,taskConfig:r},[t])).then(A=>this._createTextureFrom(A.data,i));return Ps.set(t,{promise:a}),a}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),js--}}At.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2},At.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16,BC6H:22,RGB_HALF:24,RGBA_HALF:25},At.EngineFormat={RGBAFormat:zt,RGBA_ASTC_4x4_Format:Ze,RGB_BPTC_UNSIGNED_Format:Ia,RGBA_BPTC_Format:zi,RGBA_ETC2_EAC_Format:cn,RGBA_PVRTC_4BPPV1_Format:Ni,RGBA_S3TC_DXT5_Format:da,RGB_ETC1_Format:ga,RGB_ETC2_Format:hn,RGB_PVRTC_4BPPV1_Format:ua,RGBA_S3TC_DXT1_Format:Gi},At.EngineType={UnsignedByteType:k,HalfFloatType:Wt,FloatType:Ut},At.BasisWorker=function(){let l,t,e;const i=_EngineFormat,s=_EngineType,n=_TranscoderFormat,r=_BasisFormat;self.addEventListener("message",function(g){const p=g.data;switch(p.type){case"init":l=p.config,a(p.transcoderBinary);break;case"transcode":t.then(()=>{try{const{faces:b,buffers:f,width:m,height:B,hasAlpha:I,format:E,type:Q,dfdFlags:y}=A(p.buffer);self.postMessage({type:"transcode",id:p.id,data:{faces:b,width:m,height:B,hasAlpha:I,format:E,type:Q,dfdFlags:y}},f)}catch(b){console.error(b),self.postMessage({type:"error",id:p.id,error:b.message})}});break}});function a(g){t=new Promise(p=>{e={wasmBinary:g,onRuntimeInitialized:p},BASIS(e)}).then(()=>{e.initializeBasis(),e.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function A(g){const p=new e.KTX2File(new Uint8Array(g));function b(){p.close(),p.delete()}if(!p.isValid())throw b(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");let f;if(p.isUASTC())f=r.UASTC;else if(p.isETC1S())f=r.ETC1S;else if(p.isHDR())f=r.UASTC_HDR;else throw new Error("THREE.KTX2Loader: Unknown Basis encoding");const m=p.getWidth(),B=p.getHeight(),I=p.getLayers()||1,E=p.getLevels(),Q=p.getFaces(),y=p.getHasAlpha(),x=p.getDFDFlags(),{transcoderFormat:F,engineFormat:w,engineType:_}=c(f,m,B,y);if(!m||!B||!E)throw b(),new Error("THREE.KTX2Loader: Invalid texture");if(!p.startTranscoding())throw b(),new Error("THREE.KTX2Loader: .startTranscoding failed");const J=[],G=[];for(let V=0;V<Q;V++){const It=[];for(let nt=0;nt<E;nt++){const Rt=[];let Bt,Ct;for(let N=0;N<I;N++){const P=p.getImageLevelInfo(nt,N,V);V===0&&nt===0&&N===0&&(P.origWidth%4!==0||P.origHeight%4!==0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),E>1?(Bt=P.origWidth,Ct=P.origHeight):(Bt=P.width,Ct=P.height);let pt=new Uint8Array(p.getImageTranscodedSizeInBytes(nt,N,0,F));const Ti=p.transcodeImage(pt,nt,N,V,F,0,-1,-1);if(_===s.HalfFloatType&&(pt=new Uint16Array(pt.buffer,pt.byteOffset,pt.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!Ti)throw b(),new Error("THREE.KTX2Loader: .transcodeImage failed.");Rt.push(pt)}const Lt=u(Rt);It.push({data:Lt,width:Bt,height:Ct}),G.push(Lt.buffer)}J.push({mipmaps:It,width:m,height:B,format:w,type:_})}return b(),{faces:J,buffers:G,width:m,height:B,hasAlpha:y,dfdFlags:x,format:w,type:_}}const o=[{if:"astcSupported",basisFormat:[r.UASTC],transcoderFormat:[n.ASTC_4x4,n.ASTC_4x4],engineFormat:[i.RGBA_ASTC_4x4_Format,i.RGBA_ASTC_4x4_Format],engineType:[s.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.BC7_M5,n.BC7_M5],engineFormat:[i.RGBA_BPTC_Format,i.RGBA_BPTC_Format],engineType:[s.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.BC1,n.BC3],engineFormat:[i.RGBA_S3TC_DXT1_Format,i.RGBA_S3TC_DXT5_Format],engineType:[s.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.ETC1,n.ETC2],engineFormat:[i.RGB_ETC2_Format,i.RGBA_ETC2_EAC_Format],engineType:[s.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.ETC1],engineFormat:[i.RGB_ETC1_Format],engineType:[s.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.PVRTC1_4_RGB,n.PVRTC1_4_RGBA],engineFormat:[i.RGB_PVRTC_4BPPV1_Format,i.RGBA_PVRTC_4BPPV1_Format],engineType:[s.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[r.UASTC_HDR],transcoderFormat:[n.BC6H],engineFormat:[i.RGB_BPTC_UNSIGNED_Format],engineType:[s.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[r.ETC1S,r.UASTC],transcoderFormat:[n.RGBA32,n.RGBA32],engineFormat:[i.RGBAFormat,i.RGBAFormat],engineType:[s.UnsignedByteType,s.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[r.UASTC_HDR],transcoderFormat:[n.RGBA_HALF],engineFormat:[i.RGBAFormat],engineType:[s.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],h={[r.ETC1S]:o.filter(g=>g.basisFormat.includes(r.ETC1S)).sort((g,p)=>g.priorityETC1S-p.priorityETC1S),[r.UASTC]:o.filter(g=>g.basisFormat.includes(r.UASTC)).sort((g,p)=>g.priorityUASTC-p.priorityUASTC),[r.UASTC_HDR]:o.filter(g=>g.basisFormat.includes(r.UASTC_HDR)).sort((g,p)=>g.priorityHDR-p.priorityHDR)};function c(g,p,b,f){const m=h[g];for(let B=0;B<m.length;B++){const I=m[B];if(I.if&&!l[I.if]||!I.basisFormat.includes(g)||f&&I.transcoderFormat.length<2||I.needsPowerOfTwo&&!(d(p)&&d(b)))continue;const E=I.transcoderFormat[f?1:0],Q=I.engineFormat[f?1:0],y=I.engineType[0];return{transcoderFormat:E,engineFormat:Q,engineType:y}}throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.")}function d(g){return g<=2?!0:(g&g-1)===0&&g!==0}function u(g){if(g.length===1)return g[0];let p=0;for(let m=0;m<g.length;m++){const B=g[m];p+=B.byteLength}const b=new Uint8Array(p);let f=0;for(let m=0;m<g.length;m++){const B=g[m];b.set(B,f),f+=B.byteLength}return b}};const Zo=new Set([zt,Li,Te,ae]),Vs={[Fr]:zt,[Sr]:Te,[Mr]:ae,[wr]:zt,[xr]:Te,[Qr]:ae,[yr]:zt,[Er]:zt,[Cr]:Te,[Br]:Te,[Ir]:ae,[mr]:ae,[Dr]:Li,[kr]:Li,[jr]:cn,[Pr]:hn,[Us]:pa,[Jo]:fa,[zs]:ba,[Vo]:ma,[vs]:Ze,[Vr]:Ze,[Jr]:Ze,[ta]:Ui,[Yr]:Ui,[Kr]:Ui,[Lr]:Gi,[Rr]:Gi,[Tr]:an,[_r]:an,[Nr]:An,[Gr]:An,[zr]:Ca,[Ur]:Ba,[Or]:ya,[vr]:Ea,[qr]:zi,[Hr]:zi,[$r]:Ni,[Xr]:Ni,[Zr]:on,[Wr]:on},ke={[Fr]:Ut,[Sr]:Ut,[Mr]:Ut,[wr]:Wt,[xr]:Wt,[Qr]:Wt,[yr]:k,[Er]:k,[Cr]:k,[Br]:k,[Ir]:k,[mr]:k,[Dr]:nn,[kr]:rn,[jr]:k,[Pr]:k,[Us]:k,[Us]:k,[zs]:k,[zs]:k,[vs]:Wt,[Vr]:k,[Jr]:k,[ta]:Wt,[Yr]:k,[Kr]:k,[Lr]:k,[Rr]:k,[Tr]:k,[_r]:k,[Nr]:k,[Gr]:k,[zr]:k,[Ur]:k,[Or]:k,[vr]:k,[qr]:k,[Hr]:k,[$r]:k,[Xr]:k,[Zr]:k,[Wr]:k};async function $o(l){const{vkFormat:t}=l;if(Vs[t]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat: "+t);ke[t]===void 0&&console.warn('THREE.KTX2Loader: Missing ".type" for vkFormat: '+t);let e;l.supercompressionScheme===fr&&(Js||(Js=new Promise(async r=>{const a=new Yo;await a.init(),r(a)})),e=await Js);const i=[];for(let r=0;r<l.levels.length;r++){const a=Math.max(1,l.pixelWidth>>r),A=Math.max(1,l.pixelHeight>>r),o=l.pixelDepth?Math.max(1,l.pixelDepth>>r):0,h=l.levels[r];let c;if(l.supercompressionScheme===vo)c=h.levelData;else if(l.supercompressionScheme===fr)c=e.decode(h.levelData,h.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let d;ke[t]===Ut?d=new Float32Array(c.buffer,c.byteOffset,c.byteLength/Float32Array.BYTES_PER_ELEMENT):ke[t]===Wt?d=new Uint16Array(c.buffer,c.byteOffset,c.byteLength/Uint16Array.BYTES_PER_ELEMENT):ke[t]===nn||ke[t]===rn?d=new Uint32Array(c.buffer,c.byteOffset,c.byteLength/Uint32Array.BYTES_PER_ELEMENT):d=c,i.push({data:d,width:a,height:A,depth:o})}const s=l.levelCount===0||i.length>1;let n;if(Zo.has(Vs[t]))n=l.pixelDepth===0?new ms(i[0].data,l.pixelWidth,l.pixelHeight):new Xa(i[0].data,l.pixelWidth,l.pixelHeight,l.pixelDepth),n.minFilter=s?sn:Gt,n.magFilter=Gt,n.generateMipmaps=l.levelCount===0;else{if(l.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");n=new Fi(i,l.pixelWidth,l.pixelHeight),n.minFilter=s?_e:Nt,n.magFilter=Nt}return n.mipmaps=i,n.type=ke[t],n.format=Vs[t],n.colorSpace=sa(l),n.needsUpdate=!0,Promise.resolve(n)}function sa(l){const t=l.dataFormatDescriptor[0];return t.colorPrimaries===qo?t.transferFunction===br?z:$:t.colorPrimaries===Po?t.transferFunction===br?Wo:Xo:(t.colorPrimaries===Ho||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${t.colorPrimaries}"`),$e)}self.onmessage=l=>{const t=l.data;switch(t.type){case"init":break;case"load":eh(t);break;default:console.error("[Worker] Unknown message type:",t.type);break}},self.onerror=l=>{console.error("[Worker] Error:",l)};function th(l){self.postMessage(l)}let We=null,Di=null,_i=null;async function eh(l){We??(We=new so),We.setMeshoptDecoder(na),Di??(Di=new eo),Di.setDecoderConfig({type:"js"}),Di.setDecoderPath(l.dracoDecoderPath),We.setDRACOLoader(Di),_i??(_i=new At),_i.workerConfig=l.ktx2LoaderConfig,_i.setTranscoderPath(l.ktx2TranscoderPath),We.setKTX2Loader(_i),We.load(l.url,t=>{const e={type:"loaded-gltf",result:{url:l.url,geometries:[],textures:[]}};ih(t,e),th(e)})}function ih(l,t){const{result:e}=t;for(const i of l.parser.associations.keys()){const s=l.parser.associations.get(i);if(s)if("isTexture"in i&&i.isTexture){const n=i,r=l.parser.json.textures[s.textures??-1];e.textures.push({texture:n,textureIndex:s.textures??-1,extensions:(r==null?void 0:r.extensions)??{}})}else if("isMesh"in i&&i.isMesh){const n=i,r=s.meshes??-1,a=s.primitives??-1,A=l.parser.json.meshes[r];e.geometries.push({geometry:n.geometry,meshIndex:r,primitiveIndex:a,extensions:(A==null?void 0:A.extensions)??{}})}else"isMaterial"in i&&i.isMaterial}}})();
|